Repository navigation
feat(core): Add dataCollection.mcp option - #25553
Open
sentry-junior[bot] wants to merge 2 commits into
Open
sentry-junior[bot] wants to merge 2 commits into
sentry-junior[bot] wants to merge 2 commits into
Conversation
1 of 6 tasks
Contributor
size-limit report 📦
|
Gate MCP request and response content on `dataCollection.mcp` instead of `dataCollection.genAI`, as defined in the data collection spec (0.14.0). Co-Authored-By: Jan Peer Stöcklmair <jan.peer@sentry.io>
Keeps the MCP server instrumentation non-breaking: `dataCollection.mcp` takes precedence per field, and unset fields fall back to `dataCollection.genAI` until v12. Co-Authored-By: Jan Peer Stöcklmair <jan.peer@sentry.io>
JPeer264
force-pushed
the
feat/data-collection-mcp
branch
from
October 20, 2026 13:09
4816208 to
582d9f9
Compare
JPeer264
marked this pull request as ready for review
October 20, 2026 13:16
JPeer264
requested review from
chargome and
s1gr1d
and removed request for
a team
October 20, 2026 13:16
JPeer264
requested review from
logaretm and
nicohrubec
and removed request for
chargome and
s1gr1d
October 20, 2026 13:17
s1gr1d
approved these changes
Oct 20, 2026
nicohrubec
approved these changes
Oct 20, 2026
sentry-junior
Bot
force-pushed
the
feat/data-collection-mcp
branch
from
October 20, 2026 13:33
582d9f9 to
974f4cf
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
dataCollection.mcp: { inputs, outputs }(both defaulttrue), as defined in data collection spec 0.14.0. The MCP server instrumentation now usesdataCollection.mcpwhenrecordInputs/recordOutputsaren't set onwrapMcpServerWithSentry.The spec makes
mcpindependent ofgenAI. Dropping thegenAIpath would be breaking, though: users who setgenAI: falseto silence MCP payloads would start recording them again. So until v12, the MCP server falls back togenAIper field when the matchingmcpfield isn't set. The precedence is: wrapper option >dataCollection.mcp>dataCollection.genAI>true. The resolvedmcpalways has defaults applied, so the instrumentation reads the rawdataCollection.mcpoption to tell whether the user set it. ATODO(v12)marks the fallback for removal.Unit tests cover both paths:
mcpalone,genAIfallback,mcpwinning overgenAIin both directions, and per-field fallback. Thenode-expresse2e app usesmcp, andnode-express-statickeepsgenAIto cover the fallback.Ref #24604
via Jan Peer Stöcklmair.
--
View Junior Session [Sentry]