Trace Visualization
Trace Visualization
Traces provide OpenTelemetry-style execution flow views for agent sessions. Each trace is built automatically from the events an agent publishes during a session.
How Traces Work
Traces are derived views — they are computed from your existing events by a background cron job that runs every 5 minutes. No additional instrumentation is needed beyond the standard session field in your event source:
hivemind_publish(
channel: "backend",
event_type: "task.created",
source: { agent: "claude-code", tool: "claude", session: "sess_abc123" },
data: { description: "Implementing auth module" }
)
Events with the same session ID are grouped into a trace. Each event becomes a span within the trace.
Span Types
Spans are classified automatically by event type:
| Event Pattern | Span Type | Color |
|---|---|---|
task.* | task | Blue |
decision.* | decision | Purple |
file.* | file_edit | Amber |
*.failed, *.blocked | error | Red |
approval.* | approval | Emerald |
| Everything else | other | Gray |
Waterfall Chart
The Traces page shows a waterfall chart where each span is rendered as a horizontal bar. Bars are:
- Offset from the trace start time (left position)
- Sized proportional to span duration (bar width)
- Nested by parent-child relationships (indentation)
- Color-coded by span type
REST API
GET /v1/traces?status=active&agent=claude-code&limit=20
GET /v1/traces/:traceId