Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

span view / trace view drop span details: trace-items schema mismatch

Aperta Adatta ai principianti
#1,471 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
72/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
api, cli

Direzione di ricerca

L’issue identifica lo schema della richiesta e della risposta per i dettagli dello span nella CLI, ma non indica alcun file sorgente né alcun test. Inizia individuando il codice che analizza le risposte di /trace-items/ e i test per sentry span view o sentry trace view; riproduci il problema con un attributo int il cui valore è una stringa. Il lavoro è completato quando i dettagli dello span vengono caricati con gli attributi e l’evento del segmento, e un test copre la regressione.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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
  1. sentry span view <trace-id> <segment-span-id> (or sentry 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).

Lingua principale
TypeScript
Stelle
938
Fork
166
Merge medio
1g 7h
PR unite (30g)
156

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di getsentry/toolkit

Tutte le issue di getsentry/toolkit

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.