-
Notifications
You must be signed in to change notification settings - Fork 649
ref(pyreqwest): Move crumbs to integration #7148
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
+315
−13
Merged
Changes from all commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
07a3ea3
ref(subprocess): Create breadcrumbs directly in integration
sentrivana 2f91234
.
sentrivana c3aea86
ref: Move Redis breadcrumbs to integration
sentrivana 15d2e2f
.
sentrivana 53ab7f0
really mypy?
sentrivana 0ea13df
.
sentrivana 2f54487
move even earlier
sentrivana 8e6087f
.
sentrivana 91fe6a4
.
sentrivana 5858c87
.
sentrivana 906838b
Merge branch 'master' into ivana/move-breadcrumbs-to-integrations
sentrivana 4e093aa
.
sentrivana 040f223
Merge branch 'ivana/move-breadcrumbs-to-integrations' into ivana/move…
sentrivana 7472af9
remove extra guards
sentrivana 8ace993
Merge branch 'master' into ivana/move-redis-breadcrumbs-to-integration
sentrivana f492ba4
ref(aiohttp): Move breadcrumb capture to integration
sentrivana 8e3adaf
exclude the spans
sentrivana 2a172c1
.
sentrivana 1239d84
.
sentrivana 9adbede
Merge branch 'master' into ivana/move-http-crumbs-1
sentrivana abdc32b
.
sentrivana d03072b
.
sentrivana 689d9d1
fix type annotation
sentrivana 8bfb879
defensive access
sentrivana 405fb12
Merge branch 'master' into ivana/move-http-crumbs-1
sentrivana 31486cf
ref(pyreqwest): Move crumbs to integration
sentrivana ccf1de9
make it work in async
sentrivana 0de51ad
fix sphinx
sentrivana 1bdf216
gate no response
sentrivana 579d224
simplify
sentrivana 58c435a
Merge branch 'master' into ivana/move-http-crumbs-1
sentrivana e31a3aa
Merge branch 'ivana/move-http-crumbs-1' into ivana/move-http-crumbs-2
sentrivana 70ad7a9
fix test
sentrivana a3cdae1
Merge branch 'master' into ivana/move-http-crumbs-2
sentrivana 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
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.
pyreqwest middleware skips breadcrumbs when HTTP requests raise exceptions
If
next_handler.run(request)raises an exception (network error, timeout), the middleware skips breadcrumb creation because it only runs insideif response is not None:. The old fallback viaSpan.finish()andmaybe_create_breadcrumbs_from_spanno longer applies sincetracing_utils.pynow explicitly excludes pyreqwest ("auto.http.pyreqwest") from that path. As a result, connection-level failures produce no HTTP breadcrumb at all. Bothsentry_async_middleware(~172) andsentry_sync_middleware(~217) share this flaw.Evidence
sentry_async_middleware(line 172) andsentry_sync_middleware(line 217) setresponse = None, execute the request insidewith _sentry_pyreqwest_span(...), and only calladd_http_breadcrumbinsideif response is not None:after the block.next_handler.run(request)raises, control jumps past the crumb code andresponsestaysNone.maybe_create_breadcrumbs_from_spanintracing_utils.py:228-246now skipsspan.origin == "auto.http.pyreqwest", so no fallback breadcrumb is recorded.StreamedSpan.__exit__marks the span as error but never creates a breadcrumb, and the oldSpan.finish()breadcrumb path is likewise blocked for this origin.test_pyreqwest.py) includes happy-path breadcrumb tests but no test simulating a connection-level exception.Identified by Warden · find-bugs · CGK-YBX