Repository navigation
ref(integrations): Drop legacy send_default_pii header filtering in _filter_headers - #7737
Merged
Merged
Conversation
…filter_headers _filter_headers now always uses the data_collection configuration for request header filtering, removing the legacy send_default_pii fallback path and the now-unused use_annotated_value parameter. Updates all call sites across aiohttp, aws_lambda, chalice, gcp, quart, sanic, tornado, wsgi, and _asgi_common accordingly, and removes tests covering the removed legacy behaviour. Refs PY-2853 Refs #7646
ericapisani
marked this pull request as draft
September 28, 2026 18:59
Contributor
Codecov Results 📊✅ 57592 passed | ❌ 1 failed | ⏭️ 2729 skipped | Total: 60322 | Pass Rate: 95.47% | Execution Time: 166m 42s 📊 Comparison with Base Branch
➕ New Tests (1)View new tests
❌ Failed Tests
|
| File | Patch % | Lines |
|---|---|---|
| sentry_sdk/integrations/aws_lambda.py | 0.00% | |
| sentry_sdk/integrations/chalice.py | 100.00% | |
| sentry_sdk/integrations/gcp.py | 0.00% |
Coverage diff
@@ Coverage Diff @@
## master #PR +/-##
==========================================
- Coverage 90.28% 90.10% -0.18%
==========================================
Files 195 179 -16
Lines 26195 20804 -5391
Branches 9758 7318 -2440
==========================================
+ Hits 23649 18744 -4905
- Misses 2546 2060 -486
- Partials 1483 1219 -264Generated by Codecov Action
… defaults
_filter_headers now always routes through the data_collection config, so
the default denylist terms ("forwarded", "-ip", "remote-", "via", "-user")
apply even when data_collection isn't explicitly configured. Update
tests/integrations/asgi/test_asgi.py::test_capture_transaction and
tests/integrations/aws_lambda/test_aws_lambda.py::test_non_dict_event to
expect the now-filtered remote-addr and X-Forwarded-Proto headers.
ericapisani
marked this pull request as ready for review
September 29, 2026 12:36
pabloDeputter
approved these changes
Sep 29, 2026
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.
_filter_headers now always uses the data_collection configuration for request header filtering, removing the legacy send_default_pii fallback path and the now-unused use_annotated_value parameter. Updates all call sites across aiohttp, aws_lambda, chalice, gcp, quart, sanic, tornado, wsgi, and _asgi_common accordingly, and removes tests covering the removed legacy behaviour.
Refs PY-2853
Refs #7646