span view / trace view drop span details: trace-items schema mismatch
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
調査の方向性
issue では CLI の span 詳細リクエストとレスポンスのスキーマが特定されていますが、ソースファイルやテストは指定されていません。まず、/trace-items/ のレスポンスを解析するコードと、sentry span view または sentry trace view のテストを探します。値が文字列の int 属性を使って再現します。属性とセグメントイベントを含む 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
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).
- 主要言語
- TypeScript
- スター
- 938
- フォーク
- 166
- 平均マージ
- 1日 7時間
- マージ済み PR(30日)
- 156
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/toolkit のほかの issue
-
bug MCP
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
getsentry/toolkit#1600 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
getsentry/toolkit#1611 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement MCP
難易度 4/5 1〜2日 初心者へのやさしさ 55/100
getsentry/toolkit#1601 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Use typed detector schemas from @sentry/api for metric monitors対応中かも @MathurAditya724 が 1 日前に担当しました。 オープン
getsentry/toolkit#1595 · コメント 1 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 43/100
getsentry/toolkit#1564 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
getsentry/toolkit の issue をすべて見る
似ている issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
openclaw/openclaw#182077 · コメント 1 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
aikido high security
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
dequelabs/axe-linter-action#161 ·
-
[Feature Request] Update the DimCode agent icon to the 45:32 brand mark対応中かも @eric8810 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
lyswhut/lx-music-desktop#3026 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
abhigyanpatwari/GitNexus#3704 ·
メンテナーはふだん 1 日以内に返信