Skip to content

feat(data-collection): Move data collection to _experiments#6790

Merged
ericapisani merged 3 commits into
masterfrom
ep/introduce-data-collection-feature-flag
Jul 9, 2026
Merged

feat(data-collection): Move data collection to _experiments#6790
ericapisani merged 3 commits into
masterfrom
ep/introduce-data-collection-feature-flag

Conversation

@ericapisani

@ericapisani ericapisani commented Jul 9, 2026

Copy link
Copy Markdown
Member

Move data_collection from the top-level config into the _experiments property in order to prevent accidental use by agents/users while the feature is still being built.

Fixes PY-2603
Fixes #6789

Add `enable_data_collection` experiment flag to control the rollout of the
`data_collection` client option. Until the experiment is enabled via
`_experiments={"enable_data_collection": True}`, the SDK continues to derive
collection behaviour from `send_default_pii`.

Fixes PY-2603
Fixes #6789
@linear-code

linear-code Bot commented Jul 9, 2026

Copy link
Copy Markdown

PY-2603

@ericapisani ericapisani marked this pull request as ready for review July 9, 2026 11:59
@ericapisani ericapisani requested a review from a team as a code owner July 9, 2026 11:59

@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 2 potential issues.

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 e4abd02. Configure here.

Comment thread sentry_sdk/utils.py Outdated
Comment thread sentry_sdk/utils.py Outdated
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Codecov Results 📊

91020 passed | ⏭️ 6302 skipped | Total: 97322 | Pass Rate: 93.52% | Execution Time: 320m 23s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +30
Passed Tests 📈 +30
Failed Tests
Skipped Tests

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2445 uncovered lines.
✅ Project coverage is 89.76%. Comparing base (base) to head (head).

Coverage diff
@@            Coverage Diff             @@
##          main       #PR       +/-##
==========================================
+ Coverage    89.75%    89.76%    +0.01%
==========================================
  Files          193       193         —
  Lines        23876     23880        +4
  Branches      8244      8246        +2
==========================================
+ Hits         21430     21435        +5
- Misses        2446      2445        -1
- Partials      1351      1350        -1

Generated by Codecov Action

Fold `data_collection` under `_experiments` instead of exposing it as
a top-level `Client` constructor option, and gate it on presence
rather than a separate `enable_data_collection` flag.
@ericapisani ericapisani changed the title feat(data-collection): Gate data collection behind experiment flag feat(data-collection): Move data collection to _experiments Jul 9, 2026

@sentrivana sentrivana left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Ty!

@ericapisani ericapisani merged commit 32a92b1 into master Jul 9, 2026
271 of 274 checks passed
@ericapisani ericapisani deleted the ep/introduce-data-collection-feature-flag branch July 9, 2026 13:47
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.

Create feature flag to gate the data collection behaviour

2 participants