Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

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

Aberta Para iniciantes
#1,650 0 comentários 0 reações 0 responsáveis Ver no GitHub

Mantenedores costumam responder em até 1 dia

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
2/5
Tempo estimado
1-3 horas
Facilidade para iniciantes
68/100
Tipo de issue
Bug
Clareza
Razoavelmente clara
Status de atividade
Ativa
Stack de tecnologia
typescript
Domínio
cli

Direção de pesquisa

Comece localizando o parser da resposta de trace-items e o esquema de atributos descrito na issue, depois compare-o com a resposta do comando sentry api fornecido. Reproduza com sentry span view ou sentry trace view --json; estará concluído quando atributos inteiros retornados como strings não fizerem mais com que os detalhes do span sejam perdidos, incluindo os atributos e o evento incorporado.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

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: #1564 (typed custom attributes break log list/view --fields, the same class of mismatch).

Linguagem predominante
TypeScript
Estrelas
124
Forks
14
Merge médio
2h 36min
PRs com merge (30d)
20

Preparar o ambiente

Este projeto não oferece contêiner de desenvolvimento, Dockerfile nem guia de contribuição, então a configuração fica por sua conta: comece pelo README e veja nosso guia da primeira contribuição para os passos gerais.

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de getsentry/cli

Todas as issues de getsentry/cli

Issues semelhantes

Mais issues de TypeScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.