Commands
span
List and view spans in projects or traces
Commands
Section titled “Commands”sentry span list <org/project/trace-id...>
Section titled “sentry span list <org/project/trace-id...>”List spans in a project or trace
Arguments:
| Argument | Description |
|---|---|
<org/project/trace-id...> |
[<org>/<project>] or [<org>/<project>/]<trace-id> |
Options:
| Option | Description |
|---|---|
-n, --limit <limit> |
Number of spans (<=1000) (default: "25") |
-q, --query <query> |
Filter spans (e.g., "op:db", "project:backend", "project:[cli,api]") |
-s, --sort <sort> |
Sort order: date, duration (default: "date") |
-t, --period <period> |
Time range: "7d", "2024-01-01..2024-02-01", ">=2024-01-01" (default: "7d") |
-f, --fresh |
Bypass cache, re-detect projects, and fetch fresh data |
-c, --cursor <cursor> |
Navigate pages: "next", "prev", "first" (or raw cursor string) |
Examples:
# List recent spans in the current projectsentry span list
# Find all DB spanssentry span list -q "op:db"
# Slow spans in the last 24 hourssentry span list -q "duration:>100ms" --period 24h
# Sort by slowest firstsentry span list --sort duration
# List spans within a specific tracesentry span list abc123def456abc123def456abc12345
# Show only spans from one project within a tracesentry span list my-org/cli-server/abc123def456abc123def456abc12345
# Filter a trace's spans to several projectssentry span list abc123def456abc123def456abc12345 -q "project:[cli-server,api]"
# Fetch the next pagesentry span list -c next
# List spans in an explicit projectsentry span list my-org/cli-server
# Find a project across organizations, then list a tracesentry span list cli-server abc123def456abc123def456abc12345
# Fetch the next page of a tracesentry span list abc123def456abc123def456abc12345 -c nextsentry span view <trace-id/span-id...>
Section titled “sentry span view <trace-id/span-id...>”View details of specific spans
Arguments:
| Argument | Description |
|---|---|
<trace-id/span-id...> |
[<org>/<project>/]<trace-id> <span-id> [<span-id>...] - Trace ID and one or more span IDs |
Options:
| Option | Description |
|---|---|
--spans <spans> |
Span tree depth limit (number, "all" for unlimited, "no" to disable) (default: "3") |
-f, --fresh |
Bypass cache, re-detect projects, and fetch fresh data |
Examples:
# View a single spansentry span view abc123def456abc123def456abc12345 a1b2c3d4e5f67890
# View multiple spans at oncesentry span view abc123def456abc123def456abc12345 a1b2c3d4e5f67890 b2c3d4e5f6789012
# Specify the organization and project explicitlysentry span view my-org/backend/abc123def456abc123def456abc12345 a1b2c3d4e5f67890All commands support --json for machine-readable output and --fields to select specific JSON fields.