ref(integrations): route HTTP header filtering through data collection config#6788
ref(integrations): route HTTP header filtering through data collection config#6788ericapisani wants to merge 1 commit into
Conversation
…n config `_filter_headers` previously used a hardcoded sensitive-header tuple and a `send_default_pii`/`use_annotated_value` toggle. It now delegates to `_apply_key_value_collection_filtering` from `sentry_sdk.data_collection`, so header scrubbing respects the new `data_collection.http_headers.request` allowlist/denylist/off configuration. Cookie and set-cookie headers are always redacted regardless of mode. Drops the now-unused `use_annotated_value` parameter from all call sites. Work to scrub cookies in a more granular way will be tackled as part of PY-2581/#6741. Fixes PY-2584 Fixes #6744
Codecov Results 📊✅ 88851 passed | ❌ 20 failed | ⏭️ 6220 skipped | Total: 95091 | Pass Rate: 93.44% | Execution Time: 307m 35s 📊 Comparison with Base Branch
➕ New Tests (20)View new tests
❌ Failed Tests
|
| File | Patch % | Lines |
|---|---|---|
| sentry_sdk/data_collection.py | 100.00% |
Coverage diff
@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 89.78% 89.78% —%
==========================================
Files 193 193 —
Lines 23876 23907 +31
Branches 8244 8270 +26
==========================================
+ Hits 21437 21464 +27
- Misses 2439 2443 +4
- Partials 1351 1353 +2Generated by Codecov Action
_filter_headerspreviously used a hardcoded sensitive-header tuple and asend_default_pii/use_annotated_valuetoggle. It now delegates to_apply_key_value_collection_filteringfromsentry_sdk.data_collection, so header scrubbing respects the newdata_collection.http_headers.requestallowlist/denylist/off configuration.Cookie and set-cookie headers are
always redacted regardless of mode. Drops the now-unused
use_annotated_valueparameter from all call sites.Work to scrub cookies in a more granular way will be tackled as part of PY-2581/#6741.
Fixes PY-2584
Fixes #6744