Missing parent trace activities (spans) when switching context between SDK and CLI
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 68/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- csharp
調査の方向性
Start in dotnet/src/Telemetry.cs at RestoreTraceContext and trace how the created Activity becomes the parent for tool activities. Compare that behavior with the ActivitySource and github.copilot source details mentioned in the issue, then verify that the resulting trace tree preserves the external_tool parent and sampled child spans when switching between SDK and CLI.
索引モデルが issue の本文から書いたものです。
説明
We are using Copilot SDK for .NET and it seems like the thinking behind RestoreTraceContext (this) is not entirely correct. It creates a new Activity without the ActivitySource, which, indeed, prevents it from being sampled, but it still carries its own id (span id), which is then used as a parent span id for all children activities. So in the trace tree (In Grafana, for example) we see unparented spans from the tool implementations, which I think should be parented under external_tool spans from the Copilot CLI:
the GET span (id d2c10abb001cb97a) has parent span id set to cabcf362cbf15a7a (which is nowhere to be found), where as external_tool span has an id of 2cd84acd8fb4e994. So, I think, the tree is:
external_tool (2cd84acd8fb4e994, from CLI)
\ copilot.tool_handler (cabcf362cbf15a7a, from SDK) <--- "invisible activity"
\ GET (d2c10abb001cb97a, from our tool code)
Why don't we just emit this span properly from ActivitySource (maybe matching SourceName/default github.copilot)?
I also think a similar problem exists in the CLI itself, because transitioning from SDK to CLI also leaves all "top-level" CLI spans unparented. CLI code doesn't seem to be open source, so I can't confirm, but my gut feeling is that a similar approach was used there in CLI, where it creates one span and doesn't attach it to a source that is being sampled/exported, so it never gets collected, leaving all other CLI spans unparented. 😞
- 主要言語
- Java
- スター
- 10.7k
- フォーク
- 1.5k
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/copilot-sdk のほかの issue
-
Rust: ElicitationRequest drops the tool call id from elicitation.requested再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
github/copilot-sdk#2900 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 84/100
github/copilot-sdk#2876 · コメント 1 件 · リアクション 1 件 ·
-
Python ModelLimits drops max_output_tokens from model metadata再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
github/copilot-sdk#2798 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
github/copilot-sdk#2759 ·
-
docs/AGENTS.md is repo authoring guidance, but everything in docs/ gets published再び着手できるかも このイシューのプルリクエストはマージされずにクローズされました。 オープンdocumentation
難易度 1/5 1時間未満 初心者へのやさしさ 85/100
github/copilot-sdk#2758 ·
github/copilot-sdk の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
ls1intum/thesis-management#1473 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
LunaDeerMC/Dominion#301 · コメント 1 件 ·
-
[FEATURE] Expose external refresh, node-level translog and warmer stats対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンuntriaged
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
opensearch-project/opensearch-prometheus-exporter#680 ·
メンテナーはふだん 2 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 85/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 66/100
メンテナーはふだん 2 日以内に返信