[skill-drift] update(sentry-react-sdk): document dataCollection option (v10.55.0)#155
Conversation
…n (v10.55.0) Automated drift-fix run. Co-Authored-By: Claude (claude-sonnet-4-5) <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 05ec9f4. Configure here.
| userInfo: true, | ||
| cookies: { allow: ['session', 'user_id'] }, | ||
| httpHeaders: { | ||
| request: { allow: ['authorization', 'x-request-id'] }, |
There was a problem hiding this comment.
Example allowlists authorization header
Medium Severity
The new dataCollection filtering example uses httpHeaders.request allow with authorization, which instructs readers to forward credential-bearing headers to Sentry. The browser SDK skill’s parallel example denies authorization and cookie instead.
Reviewed by Cursor Bugbot for commit 05ec9f4. Configure here.
| // Data collection (recommended; replaces sendDefaultPii) | ||
| dataCollection: { | ||
| userInfo: true, // Collect user IP and headers | ||
| }, |
There was a problem hiding this comment.
Bug: The documentation incorrectly states dataCollection: { userInfo: true } is a full replacement for sendDefaultPii: true, omitting cookies and httpHeaders collection.
Severity: MEDIUM
Suggested Fix
Update the documentation to show the correct equivalent for sendDefaultPii: true. The dataCollection object should include userInfo: true, cookies: true, and httpHeaders: { request: true, response: true } to match the behavior of the deprecated option.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.
Location: skills/sentry-react-sdk/SKILL.md#L130-L133
Potential issue: The documentation for migrating from `sendDefaultPii: true` is
incomplete. It claims that setting `dataCollection: { userInfo: true }` is the direct
equivalent. However, this only enables the collection of user identity fields
(`user.*`). The correct replacement, as documented in the parent browser SDK, also
requires setting `cookies: true` and `httpHeaders: { request: true, response: true }`.
Developers following this guide will unknowingly stop collecting PII from cookies and
HTTP headers, leading to silent data loss in their Sentry events.
Did we get this right? 👍 / 👎 to inform future reviews.


Warning
Auto-generated from external SDK content. Review all links and code suggestions before acting on them.
Summary
dataCollectionoption introduced in SDK v10.55.0 (PR #21097, #20965)Sentry.init()example to usedataCollectioninstead of deprecatedsendDefaultPiidataCollectionoptions table with all fields and filtering patternssendDefaultPiias legacy with deprecation warningContext
The browser SDK (which
@sentry/reactextends) introduceddataCollectionas a fine-grained replacement for the booleansendDefaultPiioption.dataCollectionprovides per-feature control over:sendDefaultPiiwill be deprecated in a future major version.Changes
skills/sentry-react-sdk/SKILL.md:
sendDefaultPii: truewithdataCollection: { userInfo: true }in init example (line 130)dataCollectionto configuration reference table as recommended optionsendDefaultPiias legacyReviewed PRs
dataCollectionforinfer_ip, cookies, headers, and metricsdataCollectiontype definitionTesting
Skill documentation change only; no runtime behavior changes. Users following the updated wizard will use the future-proof
dataCollectionAPI instead of the legacysendDefaultPii.Source PRs
sendDefaultPiitodataCollectionin browser packagesnormalizecode out of core