Summary
When viewing an issue or event, display the span tree (trace structure) from the latest event to provide full debugging context.
Current behavior
issue view shows the latest event's basic info (event ID, timestamp, trace ID)
event view shows similar basic info
- Neither shows the actual span tree/trace structure
Desired behavior
Show a visual span tree representation:
─── Span Tree ───
[800ms] GET /api/users (http.server)
├─ [120ms] PostgreSQL SELECT (db)
├─ [450ms] Redis GET (cache)
│ └─ [50ms] Redis connection (cache)
└─ [200ms] render template (template)
Implementation notes
- Fetch trace data using
GET /api/0/organizations/{org}/events/{event_id}/ which includes spans
- Or use the traces API:
GET /api/0/organizations/{org}/events-trace/{trace_id}/
- Add a
formatSpanTree() function in formatters/human.ts
- Consider making it opt-in with
--spans flag if it's too verbose by default
Related
- Sentry MCP has
get_trace_details for this purpose
Summary
When viewing an issue or event, display the span tree (trace structure) from the latest event to provide full debugging context.
Current behavior
issue viewshows the latest event's basic info (event ID, timestamp, trace ID)event viewshows similar basic infoDesired behavior
Show a visual span tree representation:
Implementation notes
GET /api/0/organizations/{org}/events/{event_id}/which includes spansGET /api/0/organizations/{org}/events-trace/{trace_id}/formatSpanTree()function informatters/human.ts--spansflag if it's too verbose by defaultRelated
get_trace_detailsfor this purpose