Repository navigation
Reproduction for sentry-python#7346 - #7502
Closed
ericapisani wants to merge 1 commit into
Closed
ericapisani wants to merge 1 commit into
ericapisani wants to merge 1 commit into
Conversation
`_experiments={"data_collection": None}` leaves the client between the two
sides of the option: `has_data_collection_enabled()` gates on key presence and
returns True, while `_resolve_data_collection()` only treats a non-None value as
user provided and resolves `provided_by_user=False`.
The reproduction shows the disagreement directly, then the two reported
consequences: the default `EventScrubber` is skipped (and an explicit one is
discarded with a warning that misreports why), and WSGI request attributes gain
`http.query`, `url.path` and `url.full`.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01K1iSm2akLNZAgPpzBkrbBe
Member
Author
|
I closed this because I was trying to create a reproduction locally and the bot decided to go off on its own... |
Contributor
Codecov Results 📊✅ 128321 passed | ⏭️ 7131 skipped | Total: 135452 | Pass Rate: 94.74% | Execution Time: 452m 36s 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 2526 uncovered lines. Coverage diff@@ Coverage Diff @@
## master #PR +/-##
==========================================
+ Coverage 90.18% 90.20% +0.02%
==========================================
Files 193 193 —
Lines 25768 25769 +1
Branches 9532 9532 —
==========================================
+ Hits 23236 23243 +7
- Misses 2532 2526 -6
- Partials 1432 1433 +1Generated by Codecov Action |
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.
Reproduction for #7346.
_experiments={"data_collection": None}type checks, but the two functions reading the option disagree about whatNonemeans:has_data_collection_enabled()(sentry_sdk/utils.py:2108) gates on key presence →True_resolve_data_collection()(sentry_sdk/data_collection.py:287) only treats a non-Nonevalue as user provided →provided_by_user=FalseSo the client lands between the two: every caller of
has_data_collection_enabled()takes the data collection branch, while the resolved config is the legacysend_default_pii=Falsemapping.Noneis the only config where the two disagree —sentry-python/7346/repro.pyprints that gate table first, then the three observable symptoms:EventScrubberis skipped, soextra["password"]is sent ashunter2http.query,url.pathandurl.fullevent_scrubberis discarded, with a warning claiming data collection configuration was providedRunning it
cd sentry-python/7346 uv run repro.pyNo DSN needed — events are inspected in
before_send. It runs against this checkout, sincedata_collectionis an unreleased_experimentsoption, and exits0while the bug reproduces,1once it is fixed.One correction to the issue
The issue's table reports
[Filtered]fordata_collection={}. On master that config also yieldshunter2, because skipping theEventScrubberis intended whenever data collection is configured (sentry_sdk/client.py:357). The report still holds — the divergence ishas_data_collection_enabled()vsprovided_by_user.🤖 Generated with Claude Code
https://claude.ai/code/session_01K1iSm2akLNZAgPpzBkrbBe