ref(stdlib): Move crumbs to integration - #7161
Conversation
Codecov Results 📊✅ 105335 passed | ⏭️ 6687 skipped | Total: 112022 | Pass Rate: 94.03% | Execution Time: 366m 34s 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 100.00%. Project has 2490 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 90.15% 90.13% -0.02%
==========================================
Files 193 193 —
Lines 25147 25229 +82
Branches 9136 9178 +42
==========================================
+ Hits 22669 22739 +70
- Misses 2478 2490 +12
- Partials 1431 1436 +5Generated by Codecov Action |
| _complete_span(span) | ||
| if ( | ||
| breadcrumb | ||
| and "getresponse() got an unexpected keyword argument 'buffering'" |
There was a problem hiding this comment.
This exception is basically used for control flow/compatibility in old urllib3. getresponse() will be called again afterwards without the extra arg, which is when we'll emit the breadcrumb. If this extra check were not here, we'd emit one crumb too many.
There was a problem hiding this comment.
(Also, we can get rid of this once we drop 3.6, it's only really a problem in super old requests on Python 3.6.)
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 2e0281a. Configure here.

Description
Migrate
http.clientbreadcrumbs frommaybe_create_breadcrumbs_from_spandirectly to theStdlibIntegration.As the flow is scattered (one point where a request starts, but multiple points where it might end), we save the breadcrumb data alongside the span and emit a breadcrumb whenever we detect a response is finished.
Also:
Issues
Part of #7067