Span status contains tool result content and exception messages
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 67/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- csharp
調査の方向性
issue では、span のステータス説明を設定する箇所として McpSessionHandler.AddResponseTags と AddExceptionTags が示されています。これらのメソッドと MCP エラーの tracing 規約を読み、その後、span のステータス説明に関連するテストを確認してください。ツール結果の内容と McpProtocolException 以外のメッセージが省略され、プロトコルエラーメッセージは残り、これらのケースをテストでカバーできていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
When a tool returns isError, the server span's status description is set to the whole content array as JSON (McpSessionHandler.AddResponseTags). When a handler throws, it's set to e.Message (AddExceptionTags).
We run two MCP servers on 1.4.2 and found confirmation tokens and customer data from tool results in our tracing backend because of this. It's the same on main after 2.4.0.
To Reproduce
- Listen to the
Experimental.ModelContextProtocolactivity source on the server. - Call a tool that returns
isError: truewith some content, or one that throws. - Look at the server span's status description.
Expected behavior
No description for isError results, since error.type=tool_error already marks them, and none for exceptions that aren't an McpProtocolException. The conventions only ask for the JSONRPCError.message, and the result content has its own opt-in attribute.
Additional context
For now we clear the description in a span processor before export.
Happy to open a PR for this. If you agree with the direction.
- 主要言語
- C#
- スター
- 4.7k
- フォーク
- 863
- 平均マージ
- 15時間 29分
- マージ済み PR(30日)
- 8
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
modelcontextprotocol/csharp-sdk のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
modelcontextprotocol/csharp-sdk#2061 ·
メンテナーはふだん 1 日以内に返信
-
Image/audio content in SamplingMessage and CreateMessageResult is base64-encoded twice対応中かも @atailakh が 8 日前に担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
modelcontextprotocol/csharp-sdk#2033 ·
メンテナーはふだん 1 日以内に返信
-
Docs: stateless.md says the stateful task store is "scoped per session", but Tasks are unavailable in strict Stateful mode対応中かも @FOWEPJF255 が 7 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
modelcontextprotocol/csharp-sdk#2031 ·
メンテナーはふだん 1 日以内に返信
-
Static resources whose URIs differ only in the fragment or user info collapse into one対応中かも @halter73 が 18 日前に担当しました。 オープンP2
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
modelcontextprotocol/csharp-sdk#1970 · コメント 4 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
POST /mcp with a missing or unparseable Content-Type returns HTTP 500 instead of a 4xx対応中かも @halter73 が 18 日前に担当しました。 オープンbug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
modelcontextprotocol/csharp-sdk#1966 · コメント 5 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
modelcontextprotocol/csharp-sdk の issue をすべて見る
似ている issue
-
kronos:develop:queued priority:P0
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
nopSolutions/nopCommerce#8512 ·
メンテナーはふだん 4 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
bug effort:S P3
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nightscout/nocturne#4767 ·
メンテナーはふだん 1 日以内に返信