Skip to content

feat(traces): show span events in the span panel and on the timeline - #1505

Merged
Makisuo merged 5 commits into
mainfrom
feat/span-events
Oct 15, 2026
Merged

Makisuo merged 5 commits into
mainfrom
feat/span-events

chore(lab): span events on the timeline lab fixture

892d627
Select commit
Loading
Failed to load commit list.
Maple Review Bot / Maple / review succeeded Oct 15, 2026 in 51s

Confidence 9/10 · No issues found

🟢 Confidence 9/10 · safe to merge
Changes since the last review are a dev-only lab fixture and page; the fixture's markers derive from its events and its span ids match its rows.
quality 100/100 · no findings · tests partial · risk low

Adds span events to the trace view: an events panel, timeline markers, and the queries behind them. The three files changed since the last review are dev-only lab scaffolding and are safe to merge. The open WarehouseInvalidInputError in warehouse-query-atoms.ts is not addressed — that file only gains a query-atom family.

  • TIMELINE_LAB_EVENTS/TIMELINE_LAB_MARKERS fixture the lab trace with span events
  • Timeline lab renders SpanEventsSection in an aside and passes markers to TraceViewTabs

Before merge

  • Manual · Benchmark spanEventsByTraceQuery with bun run bench:queries before the timeline markers ship to traces with many spans

Production impact

Open errors in the changed files
Issue Service Occurrences File
@maple/web/errors/WarehouseInvalidInputError maple-web 9 apps/web/src/lib/services/atoms/warehouse-query-atoms.ts

After this merges, Maple checks whether they stop.

Production traffic of the changed files (last 7 days)
File Calls/day Busiest operations
packages/query-engine/src/__sql_baseline__/catalog.sql 1.8k POST 834/day, 3.9% err
GET 640/day, 2.7% err
GET 148/day, 0.1% err
apps/ai/src/mcp/__evals__/fixtures.ts 979 POST 834/day, 3.9% err
POST 145/day, 0.5% err
packages/query-engine/src/benchmark/builders.ts 788 GET 640/day, 2.7% err
GET 148/day, 0.1% err
packages/domain/src/http/query-engine.ts 8 errorsByType 8/day, 1.7% err
apps/api/src/routes/queries.ts 3 spanDetail 3/day, 0.0% err
Telemetry this change adds and removes (1)
  • ➕ span name QueryEngine.getTraceSpanEvents · apps/web/src/api/warehouse/traces.ts:784
What was checked
  • Fixture span ids (root, svc0, svc3) match the ROWS ids the markers are keyed by (timeline-fixture.ts:83)
  • TIMELINE_LAB_MARKERS is derived from TIMELINE_LAB_EVENTS, so names/offsets cannot drift (timeline-fixture.ts:108)
  • Imports resolve: @maple/query-engine exports ./span-events (index.ts:14) and @maple/ui exports ./* to src/*

892d627 · Updated on every push. Reply "won't fix" to dismiss a finding, or mention @maple-review-bot to ask about one.