span view / trace view drop span details: trace-items schema mismatch
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- typescript
Research direction
The issue identifies the span detail request and response schema in the CLI, but names no source file or test. Start by locating the code that parses /trace-items/ responses and the tests for sentry span view or sentry trace view; reproduce with an int attribute whose value is a string. Done when span details load with attributes and the segment event, and the regression is covered by a test.
Written by the indexing model from the issue text.
Description
Environment
sentry CLI 0.45.0 (Homebrew, macOS 27). Org on the de.sentry.io region, iOS project on sentry-cocoa 9.29.2. Same behaviour on 0.44.1.
Steps to Reproduce
sentry span view <trace-id> <segment-span-id>(orsentry trace view <trace-id> --json) on a trace with a transaction.
For comparison:
sentry api "projects/<org>/<project>/trace-items/<span>/?item_type=spans&trace_id=<trace>&statsPeriod=14d".
Expected Result
Step 1 shows the span's attributes and, for the segment span, the embedded transaction event (breadcrumbs, contexts, extra), the same data the web trace view shows for that span.
Actual Result
Step 1 logs [api.traces] WARN Could not fetch details for span <id> for every span and drops the item; with --json the spans carry no attributes and no event. Calling through the sentry api returns the full item (61 attributes plus event).
The cause seems to be in the CLI. The following is an AI analysis of the bundle code:
`R7()` requests `/projects/${org}/${project}/trace-items/${id}/` with `{trace_id, item_type}` and parses the response with `fq={itemId,timestamp,attributes:array(V_e)}`, where `V_e` is a discriminated union on `type`: `{type:"str",value:string}`, `{type:"int",value:number}`, `{type:"float",value:number}`, `{type:"bool",value:boolean}`, `{type:"array",value:array}`.
The API returns int attributes as strings, so the schema throws, and the code then catches every throw and logs a generic warning.
Attributes typed int with string values in the response for one segment span:
| name | type | value |
|---|---|---|
mobile.frozen_frames |
int | "0" |
mobile.slow_frames |
int | "10" |
mobile.total_frames |
int | "232" |
project_id |
int | "4510969405374544" |
tags[thread.id,number] |
int | "259" |
Related: getsentry/toolkit#1474 (typed custom attributes break log list/view --fields, the same class of mismatch).
- Dominant language
- TypeScript
- Stars
- 961
- Forks
- 179
- Avg merge
- 15h 33m
- Merged PRs (30d)
- 476
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from getsentry/toolkit
-
MCP mcp-feedback-pattern
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
getsentry/toolkit#2276 · 1 comment ·
Maintainers usually reply within 1 day
-
CLI enhancement MCP
Difficulty 2/5 1-3 hours Newbie friendliness 63/100
getsentry/toolkit#1908 · 1 comment ·
Maintainers usually reply within 1 day
-
get_sentry_resource gives no guidance for Explore > Errors list URLsPossibly taken @sentry-junior claimed this today. OpenMCP mcp-feedback-pattern
Difficulty 2/5 1-3 hours Newbie friendliness 32/100
getsentry/toolkit#2278 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
getsentry/toolkit#2275 · 1 comment ·
Maintainers usually reply within 1 day
-
MCP mcp-feedback-pattern
Difficulty 3/5 1-2 days Newbie friendliness 68/100
getsentry/toolkit#2273 · 1 comment ·
Maintainers usually reply within 1 day
All issues in getsentry/toolkit
Similar issues
-
Add: BOM CineOpenapproved check:passed streams:add
Difficulty 1/5 Under an hour Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 1 day
-
bug platform-android
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Termix-SSH/Mobile#146 · 1 comment ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
devswha/herdr-web-ui#3875 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100