feat(wsgi): Gate client IP/user info behind data_collection config#6858
Open
ericapisani wants to merge 3 commits into
Open
feat(wsgi): Gate client IP/user info behind data_collection config#6858ericapisani wants to merge 3 commits into
ericapisani wants to merge 3 commits into
Conversation
Apply data_collection.user_info filtering to WSGI handling, mirroring the ASGI change: gate REMOTE_ADDR capture, client.address/user.ip_address span attributes, and event user.ip_address behind data_collection, falling back to send_default_pii when data_collection is not configured. Also skip installing the default EventScrubber when a data_collection config is provided, since scrubbing could remove data that config allows, and warn when an event scrubber is explicitly configured alongside it. Add parametrized end-to-end tests for WSGI, Django, and Flask covering data_collection precedence over send_default_pii. Ref PY-2586 Ref #6746
Contributor
Codecov Results 📊✅ 94900 passed | ⏭️ 6338 skipped | Total: 101238 | Pass Rate: 93.74% | Execution Time: 334m 33s 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 92.00%. Project has 2508 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 89.70% 89.65% -0.05%
==========================================
Files 193 193 —
Lines 24030 24242 +212
Branches 8348 8528 +180
==========================================
+ Hits 21555 21734 +179
- Misses 2475 2508 +33
- Partials 1384 1394 +10Generated by Codecov Action |
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 b49ba15. Configure here.
ericapisani
force-pushed
the
py-2586-gate_user_data_wsgi
branch
from
July 21, 2026 19:11
b49ba15 to
18f8b31
Compare
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.

Apply data_collection.user_info filtering to WSGI handling, mirroring the
ASGI change: gate REMOTE_ADDR capture, client.address/user.ip_address span
attributes, and event user.ip_address behind data_collection, falling back
to send_default_pii when data_collection is not configured.
Also skip installing the default EventScrubber when a data_collection
config is provided, since scrubbing could remove data that config allows,
and warn when an event scrubber is explicitly configured alongside it.
Add parametrized end-to-end tests for WSGI, Django, and Flask covering
data_collection precedence over send_default_pii.
Ref PY-2586
Ref #6746