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
{{ message }}
Repository navigation
Provide a restrictive dataCollection baseline that also covers keys added in minor releases #25659
In v11, dataCollection replaces sendDefaultPii. Its defaults collect more data than v10 did. To keep the v10 behavior, users must set each key to a restrictive value manually (see Keeping the v10 default behavior).
This causes two problems:
No single option keeps the v10 behavior. Users must copy the full object from the migration guide and keep it up to date.
When a minor release adds a new dataCollection key, the new key collects by default. Users who turned off each key manually start to send the new data after they upgrade, with no change to their config.
Proposal
Export an object that we maintain, with a restrictive value for each key. Users spread it and turn on only what they want. A new key is then off by default:
Sentry.init({dataCollection: {
...Sentry.dataCollectionOff,// name TBDgenAI: {inputs: true,outputs: false},},});
Open questions
Which baseline do we use: all keys off, or the v10 defaults? "All off" also turns off stackFrameVariables and frameContextLines, which v10 collected.
Some keys replace an older key in a minor release and fall back to it when they are not set. For example, mcp falls back to genAI. If the exported object sets mcp to false, a user who sets genAI: { inputs: true } no longer gets MCP inputs, and no warning tells them. One alternative is a flag that the SDK resolves, for example dataCollection: { defaults: 'off' }. Then resolveDataCollectionOptions can apply the fallbacks before it turns off the keys that are not set.
Activity
linear-code commentedon Oct 22, 2026
JS-3988