Skip to main content

sentry trace view

View detailed information about a distributed trace by its ID, including a hierarchical span tree.

Usage

Target Specification

The trace ID is the 32-character hexadecimal identifier.

Arguments

string
required
32-character hexadecimal trace identifierExample:
string
Optional target in format <org>/<project> or <project> (searches across orgs)If not provided, auto-detects from DSN in working directory or config defaults.

Flags

boolean
default:"false"
Output trace data as JSON including summary and spansExample:
boolean
default:"false"
Open the trace in your default web browser instead of displaying in terminalAlias: -wExample:
number
default:"10"
Maximum depth of span tree to display. Set to 0 or use --spans no to disable span tree display.Example:

Examples

View a trace (auto-detect context)

View trace with explicit org/project

View trace with project slug (searches across orgs)

Open trace in browser

View trace with deeper span tree

View trace without span tree

Output as JSON

Sample Output

Human-Readable Format

JSON Format

Notes

  • Organization and project context is required to fetch the trace. If not provided explicitly, it’s resolved from DSN detection or config defaults.
  • The trace API searches around the current timestamp to locate trace data.
  • Traces are typically retained for 90 days in Sentry.
  • The span tree shows a hierarchical view of all operations across services, helping identify performance bottlenecks.
  • Use --spans 0 to disable span tree fetching for faster output when you only need trace metadata.
  • The -w flag is useful for quickly jumping to the Sentry web UI for interactive trace exploration.
  • Cross-project traces show which services were involved in handling the request.

See Also