Bug: Streaming responses don't capture `response_id` or `model_version`
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 78/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- python
調査の方向性
sentry_sdk/integrations/google_genai/streaming.py の accumulate_streaming_response() から始め、次に utils.py:886-890 のレスポンスメタデータの処理と比較してください。各ストリーミングチャンクに response_id と model_version があるか確認し、ストリーミングレスポンスで両方の span フィールドが設定されることを検証するテストを追加してください。
索引モデルが issue の本文から書いたものです。
説明
Problem
In streaming.py, the accumulate_streaming_response() function initializes response_id and model to None (lines 53-54) but never populates them from the streaming chunks. The accumulation loop (lines 56-83) never reads chunk.response_id or chunk.model_version.
This means streaming responses will always have null for gen_ai.response.id and gen_ai.response.model.
The non-streaming path correctly captures both in utils.py:886-890:
if getattr(response, "response_id", None):
span.set_data(SPANDATA.GEN_AI_RESPONSE_ID, response.response_id)
if getattr(response, "model_version", None):
span.set_data(SPANDATA.GEN_AI_RESPONSE_MODEL, response.model_version)
Files
sentry_sdk/integrations/google_genai/streaming.py—accumulate_streaming_response()
Acceptance Criteria
- Streaming chunks are checked for
response_idandmodel_version gen_ai.response.idandgen_ai.response.modelare populated on streaming spans- Test added to verify streaming responses capture these fields
- 主要言語
- Python
- スター
- 2.2k
- フォーク
- 672
- 平均マージ
- 1日 13分
- マージ済み PR(30日)
- 212
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
getsentry/sentry-python のほかの issue
-
Waiting for: Product Owner
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
getsentry/sentry-python#7543 · コメント 1 件 ·
-
Python
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
getsentry/sentry-python#6992 · コメント 1 件 ·
-
Improvement Python
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
getsentry/sentry-python#6970 · コメント 1 件 ·
-
Bug Python
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
getsentry/sentry-python#6504 · コメント 1 件 ·
-
Improvement Python Spans
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
getsentry/sentry-python#5833 · コメント 1 件 ·
getsentry/sentry-python の issue をすべて見る
似ている issue
-
documentation help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
simonw/sqlite-utils#872 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100