-
Notifications
You must be signed in to change notification settings - Fork 639
fix(tracing): Skip child span creation in streaming path when no current span (HTTP clients) #6811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
sl0thentr0py
merged 19 commits into
master
from
ivana/streaming-child-spans-http-clients
Jul 16, 2026
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
41192b7
fix(tracing): Skip child span creation in streaming path when no curr…
sentrivana fcade98
fix(tests): Update httpx2 and strawberry tests for streaming child sp…
sentrivana 6ea870f
test(httpx): Wrap streaming tests in parent span
ericapisani ef2232f
Merge branch 'master' into ivana/streaming-child-spans-http-clients
ericapisani 877be03
fix(tracing): Propagate trace headers in streaming path when no curre…
ericapisani c8c9924
fix(tracing): Propagate trace headers for httpx when no current span
ericapisani 655bd41
fix(tracing): Skip child span creation in streaming path when no curr…
sentrivana a8cf0f4
fix(tests): Update httpx2 and strawberry tests for streaming child sp…
sentrivana 1e9a5d7
test(httpx): Wrap streaming tests in parent span
ericapisani aeb7bd8
fix(tracing): Propagate trace headers in streaming path when no curre…
ericapisani 2b59942
fix(tracing): Propagate trace headers for httpx when no current span
ericapisani 4afedf1
neel fixes
sl0thentr0py a6f5f5a
update pyreqwest to use trace propagation helper method
ericapisani 557ecc0
Merge branch 'ivana/streaming-child-spans-http-clients' of github.com…
ericapisani ac29368
add trace propagation
ericapisani 94e5b1f
bad merge
ericapisani df1a62f
Merge remote-tracking branch 'origin/master' into ivana/streaming-chi…
sl0thentr0py a2f1bd3
remove nullcontext
sl0thentr0py 94a8d62
fix arq tests
sl0thentr0py File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bug: The
httpxintegration fails to propagate trace headers when no active span exists and streaming is enabled, unlike thehttpx2integration.Severity: MEDIUM
Suggested Fix
Add a call to
propagate_trace_headers(client, request)before the early-return statements in the synchronous and asynchronoussendmethods insentry_sdk/integrations/httpx.py. This will make its behavior consistent with thehttpx2.pyimplementation.Prompt for AI Agent
Also affects:
sentry_sdk/integrations/httpx.py:145~146Did we get this right? 👍 / 👎 to inform future reviews.