Skip to content

feat: add initial DataCollection struct#1329

Open
giortzisg wants to merge 8 commits into
masterfrom
feat/data-collection
Open

feat: add initial DataCollection struct#1329
giortzisg wants to merge 8 commits into
masterfrom
feat/data-collection

Conversation

@giortzisg

Copy link
Copy Markdown
Contributor

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:

  • Single entry: just write text
  • Multiple entries: use bullet points
  • Nested bullets: indent 4+ spaces

For more details: custom changelog entries

Reminders

@giortzisg giortzisg requested a review from Litarnus June 19, 2026 11:02
@giortzisg giortzisg self-assigned this Jun 19, 2026
@github-actions

github-actions Bot commented Jun 19, 2026

Copy link
Copy Markdown

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


This PR will not appear in the changelog.


🤖 This preview updates automatically when you update the PR.

Comment thread data_collection.go
Comment thread client.go Outdated
@giortzisg giortzisg requested a review from sl0thentr0py June 24, 2026 07:21
Comment thread data_collection.go
@giortzisg giortzisg force-pushed the feat/data-collection branch 2 times, most recently from a1f3a34 to 264848f Compare July 1, 2026 08:44
@giortzisg giortzisg force-pushed the feat/data-collection branch from 264848f to eb379b3 Compare July 1, 2026 10:10

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread client.go
}

resolvedDataCollection := snapshotDataCollection(options.DataCollection, options.SendDefaultPII)
options.DataCollection = cloneDataCollection(&resolvedDataCollection)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit eb379b3. Configure here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants