Skip to content

bug: sentry span list returns empty for cross-project traces #735

@betegon

Description

@betegon

Description

sentry span list <trace-id> returns empty results for traces that span multiple projects, even though sentry trace view <trace-id> --json returns the full span tree.

Reproduction

Trace: e998143883414695ad5600a058581fcb
UI: https://sentry.sentry.io/explore/traces/trace/e998143883414695ad5600a058581fcb/

This trace spans 4 projects: cli, cli-server, sentry, release-registry with 463 spans.

sentry span list e998143883414695ad5600a058581fcb --json
# → { "data": [], "hasMore": false, "hasPrev": false }

sentry trace view e998143883414695ad5600a058581fcb --json
# → returns full span tree with all 463 spans (works correctly)

Expected behavior

sentry span list should return spans for the trace, or clearly indicate that a project scope is required for multi-project traces.

Workaround

Used sentry trace view --json and parsed the nested span tree with a script to find relevant spans. This works but is much harder than a flat span list.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions