Repository navigation
feat(core): Add dataCollection.defaults option - #25742
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
Setting `defaults: 'off'` turns off every `dataCollection` field the user does not set, including fields added in later minor releases. MCP content still falls back to `genAI` when `mcp` is not set. Refs #25659 Co-Authored-By: Jan VamPeer Stöcklmair <jan.peer@sentry.io>
Co-Authored-By: Jan VamPeer Stöcklmair <jan.peer@sentry.io>
Contributor
size-limit report 📦Compared: 30e45d5 (PR test merge using develop at a734d03) Against: a734d03 (develop) · base run #63553 ✅ Baseline matches: this diff contains only this PR's changes.
|
Contributor
Optional E2E testsSome optional checks were not successful. They do not block the merge. 2 not successful, 63 successful. See the run.
Successful checks
|
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.
It adds roughly 100bytes. I (Jan) would assume this is a lot in the browser, but it gives a real benefit for users who want to make sure they're not sending more data in the future as currently configured.
Users who want restrictive data collection in v11 currently have to list every
dataCollectionkey manually, and any key added in a later minor release silently starts collecting after an upgrade.dataCollection: { defaults: 'off' }makes every key that isn't set collect nothing, including future ones, so users only turn on what they need.We went with a flag that the SDK resolves instead of the exported object from the issue. Spreading an object would set
mcpexplicitly and break its fallback togenAI. With the flag,resolveDataCollectionOptionsstays the single place where defaults are applied, and MCP content still followsgenAIwhenmcpisn't set.'off'is a true "nothing" baseline, which also turns offstackFrameVariablesandframeContextLines. The migration guide's "keep v10 behavior" snippet now usesdefaults: 'off'with the v10 values layered on top.Fixes #25659
via Jan Peer Stöcklmair.
--
View Junior Session [Sentry]