feat: add initial DataCollection struct#1329
Conversation
Semver Impact of This PR🟡 Minor (new features) 📋 Changelog PreviewThis is how your changes will appear in the changelog. This PR will not appear in the changelog. 🤖 This preview updates automatically when you update the PR. |
a1f3a34 to
264848f
Compare
264848f to
eb379b3
Compare
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 eb379b3. Configure here.
| } | ||
|
|
||
| resolvedDataCollection := snapshotDataCollection(options.DataCollection, options.SendDefaultPII) | ||
| options.DataCollection = cloneDataCollection(&resolvedDataCollection) |
There was a problem hiding this comment.
Integrations ignore resolved DataCollection
Medium Severity
NewClient resolves and stores DataCollection, but leaves SendDefaultPII unchanged and existing instrumentation (for example SQL db.user) still gates on Options().SendDefaultPII. With an explicit DataCollection pointer—including an empty struct whose resolved UserInfo defaults to true—GetDataCollection can disagree with what integrations actually collect, contrary to the option comment that SendDefaultPII is ignored when DataCollection is set.
Reviewed by Cursor Bugbot for commit eb379b3. Configure here.


Description
This adds the initial datastructures and logic for implementing the https://develop.sentry.dev/sdk/foundations/client/data-collection/#overview spec.
#skip-changelog
Issues
Changelog Entry Instructions
To add a custom changelog entry, uncomment the section above. Supports:
For more details: custom changelog entries
Reminders
feat:,fix:,ref:,meta:)