span view / trace view drop span details: trace-items schema mismatch
メンテナーはふだん 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
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: #1564 (typed custom attributes break log list/view --fields, the same class of mismatch).
- 主要言語
- TypeScript
- スター
- 123
- フォーク
- 14
- 平均マージ
- 1日 2時間
- マージ済み PR(30日)
- 70
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 52/100
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 64/100
メンテナーはふだん 1 日以内に返信
-
Evaluate Twinkleplop for terminal code highlighting対応中かも @MathurAditya724 が 11 日前に担当しました。 オープンjared
getsentry/cli#1633 · コメント 1 件 · リアクション 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
Evaluate Twinkleplop for local UI JSON highlighting対応中かも @MathurAditya724 が 11 日前に担当しました。 オープンjared
getsentry/cli#1632 · コメント 1 件 · リアクション 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
似ている issue
-
enhancement good first issue priority: low size: XS
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
streamplace/streamplace#1351 ·
メンテナーはふだん 2 日以内に返信
-
Link Checker Reportオープンautomated issue report
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
databendlabs/databend-docs#3511 ·
-
automated issue report
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100