Skip to content

Show span tree in issue view and event view #83

@betegon

Description

@betegon

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

Metadata

Metadata

Labels

enhancementNew feature or request
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions