Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン 初心者向け
#1,650 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
cli

調査の方向性

まず、issue に記載されている trace-items のレスポンスパーサーと属性スキーマを見つけ、提供された sentry api コマンドのレスポンスと比較します。sentry span view または sentry trace view --json で再現します。整数属性が文字列として返されても、属性や埋め込みイベントを含む span の詳細が失われなくなれば完了です。

索引モデルが issue の本文から書いたものです。

説明

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).

主要言語
TypeScript
スター
123
フォーク
14
平均マージ
1日 2時間
マージ済み PR(30日)
70

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

getsentry/cli のほかの issue

getsentry/cli の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。