You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Hi @tiagovilasboas, I need some clarifications on this issue:
are you reporting a bug, or requesting that the default values of dataCollection get changed?
dataCollection defaulting to true for recording inputs and outputs is expected behaviour, see docs
If your report is a bug, please provide a minimal reproduction, at least your SDK setup, used SDK and version. Also, please follow our bug template, because this issue looks completely AI-generated at the moment.
This is not a bug report against current dataCollection behavior. I agree with the docs: when dataCollection is used, genAI recording inputs/outputs defaults to true unless you opt out (Data Collected — LLM Inputs And Responses).
What I meant to file is an enhancement / secure-by-default request scoped to MCP instrumentation, not “dataCollection is broken.”
Evidence still on current main in packages/core/src/integrations/mcp-server/transport.ts:
Even when the operator never sets dataCollection / genAI, the wrapper still falls through to ?? true, so a bare Sentry.wrapMcpServerWithSentry(server) records tool/prompt args and results.
MCP payloads often carry secrets and private user content (tokens, file paths, messages), which is a harsher default surface than typical LLM chat spans — easy to miss if you only read the genAI docs in an AI-integration context.
Keep the current resolution, but require/encourage explicit { recordInputs, recordOutputs } on the wrapper and/or a clear startup note when both resolve to true.
No crash / incorrect-span reproduction — the concern is default posture for MCP. Happy to reframe/relabel as enhancement, or open a focused docs/PR if you’d rather keep the current defaults.
I still don't know the version you're on. In v11 (which is the code currently on our main branch develop), dataCollectionis used by default, and sendDefaultPii is removed. Hence, expected default behaviour is to record in- and outputs.
I will ask the dataCollection experts in the team though, if there should be differences between genAI and MCP, but I'm fairly confident this is the intended behaviour.
You can read more about the dataCollection changes in this blog post.
Thanks for raising this! Recording MCP inputs/outputs by default is intended under v11's dataCollection model. Since #25553 you can opt out for MCP specifically with dataCollection: { mcp: { inputs: false, outputs: false } }, or per server via wrapMcpServerWithSentry(server, { recordInputs: false, recordOutputs: false }). Closing.
Activity
linear-code commentedon Sep 22, 2026
JS-3752
Lms24 commentedon Sep 23, 2026
Hi @tiagovilasboas, I need some clarifications on this issue:
dataCollectionget changed?dataCollectiondefaulting totruefor recording inputs and outputs is expected behaviour, see docsIf your report is a bug, please provide a minimal reproduction, at least your SDK setup, used SDK and version. Also, please follow our bug template, because this issue looks completely AI-generated at the moment.
tiagovilasboas commentedon Sep 23, 2026
Hi @Lms24 — thanks for the clarification ask.
This is not a bug report against current
dataCollectionbehavior. I agree with the docs: whendataCollectionis used,genAIrecording inputs/outputs defaults totrueunless you opt out (Data Collected — LLM Inputs And Responses).What I meant to file is an enhancement / secure-by-default request scoped to MCP instrumentation, not “
dataCollectionis broken.”Evidence still on current
maininpackages/core/src/integrations/mcp-server/transport.ts:Two points that matter for MCP specifically:
dataCollection/genAI, the wrapper still falls through to?? true, so a bareSentry.wrapMcpServerWithSentry(server)records tool/prompt args and results.Concrete asks (any one is fine):
recordInputs/recordOutputsfalse unless explicitly set), or{ recordInputs, recordOutputs }on the wrapper and/or a clear startup note when both resolve totrue.No crash / incorrect-span reproduction — the concern is default posture for MCP. Happy to reframe/relabel as enhancement, or open a focused docs/PR if you’d rather keep the current defaults.
Lms24 commentedon Sep 23, 2026
I still don't know the version you're on. In v11 (which is the code currently on our main branch
develop),dataCollectionis used by default, andsendDefaultPiiis removed. Hence, expected default behaviour is to record in- and outputs.I will ask the dataCollection experts in the team though, if there should be differences between genAI and MCP, but I'm fairly confident this is the intended behaviour.
You can read more about the
dataCollectionchanges in this blog post.docs(js): Update dataCollection snippets for v10 and genAI (#19579)
docs(data-collection): Add `mcp` option, separate from `genAI` (#19657)
docs(data-collection): Add `mcp` option, separate from `genAI` (#19657)
feat(core): Add `dataCollection.mcp` option (#25553)
mydea commentedon Oct 23, 2026
Thanks for raising this! Recording MCP inputs/outputs by default is intended under v11's
dataCollectionmodel. Since #25553 you can opt out for MCP specifically withdataCollection: { mcp: { inputs: false, outputs: false } }, or per server viawrapMcpServerWithSentry(server, { recordInputs: false, recordOutputs: false }). Closing.