feat(stdlib): Support data_collection filtering for URL query params - #7291
Open
ericapisani wants to merge 2 commits into
Open
feat(stdlib): Support data_collection filtering for URL query params#7291ericapisani wants to merge 2 commits into
ericapisani wants to merge 2 commits into
Conversation
Previously the stdlib httplib integration only gated url.full, url.query and url.fragment on send_default_pii, so with data_collection configured the URL data was dropped entirely and no allow/denylist filtering was ever applied. The data_collection experiment's url_query_params behaviour is now applied to span streaming spans and breadcrumbs, matching httpx and pyreqwest. url.full is now reassembled with the filtered query and fragment, and empty url.query/url.fragment attributes are no longer emitted. The legacy (non span-streaming) path is left unchanged. Fixes PY-2744 Fixes #7279
ericapisani
marked this pull request as ready for review
August 28, 2026 18:08
Contributor
Codecov Results 📊✅ 121403 passed | ⏭️ 6762 skipped | Total: 128165 | Pass Rate: 94.72% | Execution Time: 429m 57s 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 2493 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
+ Coverage 90.29% 90.30% +0.01%
==========================================
Files 193 193 —
Lines 25601 25697 +96
Branches 9436 9476 +40
==========================================
+ Hits 23116 23204 +88
- Misses 2485 2493 +8
- Partials 1435 1444 +9Generated by Codecov Action |
The stdlib integration no longer emits empty url.query and url.fragment attributes, so the requests breadcrumb tests were asserting on data that is intentionally absent.
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.
Previously the stdlib httplib integration only gated url.full, url.query and
url.fragment on send_default_pii, so with data_collection configured the URL
data was dropped entirely and no allow/denylist filtering was ever applied.
The data_collection experiment's url_query_params behaviour is now applied to
span streaming spans and breadcrumbs, matching httpx and pyreqwest.
url.full is now reassembled with the filtered query and fragment, and empty
url.query/url.fragment attributes are no longer emitted. The legacy
(non span-streaming) path is left unchanged.
Fixes PY-2744
Fixes #7279