feat(data-collection): Move data collection to _experiments#6790
Merged
Conversation
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
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ 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.
Contributor
Codecov Results 📊✅ 91020 passed | ⏭️ 6302 skipped | Total: 97322 | Pass Rate: 93.52% | Execution Time: 320m 23s 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 2445 uncovered lines. 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 -1Generated 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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Move
data_collectionfrom the top-level config into the_experimentsproperty in order to prevent accidental use by agents/users while the feature is still being built.Fixes PY-2603
Fixes #6789