Trace Waterfall
CSSNested spans on a shared timeline, so parallel work and slow steps show up at a glance.
- 2.84 s, starting at 0 ms
- plan220 ms, starting at 40 ms
- 960 ms, starting at 280 ms
- search.kb640 ms, starting at 300 ms
- search.tickets870 ms, starting at 310 ms
- rerank180 ms, starting at 1.05 s
- tool.refund_lookup130 ms, starting at 1.26 s
- answer1.44 s, starting at 1.40 s
Install
$ npx shadcn@latest add https://spotcheckui.com/r/trace-waterfall.jsonNo motion engine needed.
Usage
import { TraceWaterfall } from "@/components/spotcheck/trace-waterfall"
<TraceWaterfall
label="Support answer, 2.9 seconds in total"
spans={[
{ id: "run", name: "agent.run", start: 0, end: 2900 },
{ id: "search", parent: "run", name: "search", start: 120, end: 760 },
]}
/>Spans link through parent, and overlapping bars are work that ran in parallel.
Props
- label * Required
stringDefault —Names the chart for screen readers. - spans * Required
Span[]Default — - className
stringDefault —
Keyboard
| Tab | Reach the chart, then each parent span |
|---|---|
| Enter | Collapse or expand a parent span |
| ← → | Scroll the chart on small screens |
Reduced motion
Bars appear at full width, without growing.