Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

`wrapMcpServerWithSentry` defaults `recordInputs` / `recordOutputs` to `true` (via `dataCollection.genAI`) |

オープン
#24,604 コメント 4 件 リアクション 0 件 担当者 1 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript

調査の方向性

Start in packages/core/src/integrations/mcp-server/transport.ts, especially resolveMcpOptions, and compare its capture defaults with dataCollection.genAI and the scrubbing posture in piiFiltering.ts. Clarify which explicit-option and genAI settings should enable capture, then verify that a bare MCP wrapper is metadata-only or emits the documented warning when both flags resolve true.

索引モデルが issue の本文から書いたものです。

説明

Static review of public source at commit b633c8153250. No traffic was sent to any Sentry environment.

MCP server instrumentation resolves capture flags like this:

packages/core/src/integrations/mcp-server/transport.ts:

function resolveMcpOptions(options: McpServerWrapperOptions): ResolvedMcpOptions {
  // ...
  const genAI = getClient()?.getDataCollectionOptions().genAI;
  return {
    recordInputs: options.recordInputs ?? genAI?.inputs ?? true,
    recordOutputs: options.recordOutputs ?? genAI?.outputs ?? true,
  };
}

dataCollection.genAI itself documents { inputs: true, outputs: true } as the default. So a bare Sentry.wrapMcpServerWithSentry(server) will put tool/prompt arguments and results on spans (tokens, file paths, user content, etc.) unless the operator remembers to pass { recordInputs: false, recordOutputs: false } or tighten dataCollection.genAI.

That is great for AI debugging; it is a surprising default for MCP servers that often proxy secrets and private data.

Suggested change:

  • Default MCP wrapper capture to false / metadata-only unless recordInputs/recordOutputs or dataCollection.genAI is explicitly enabled; or
  • Keep genAI defaults but make wrapMcpServerWithSentry() document and prefer explicit { recordInputs, recordOutputs } with a one-time startup log when both resolve to true.
  • Mirror the scrubbing posture already used for network PII in piiFiltering.ts.

Severity: low–medium / privacy & data-minimization defense-in-depth (parallel to the Python SDK EventScrubber recursive default discussion). Not claiming a Sentry platform vulnerability. No proof-of-concept.

Happy to send a focused PR if useful.

主要言語
TypeScript
スター
8.7k
フォーク
1.9k
平均マージ
1日 16時間
マージ済み PR(30日)
576

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

getsentry/sentry-javascript のほかの issue

getsentry/sentry-javascript の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。