feat(aiohttp): Remove request body capture from span streaming#6297
Merged
Conversation
Remove logic that captured request body data on span segments in the aiohttp integration when span streaming is enabled. This simplifies the request handling flow and removes the need for post-handler body data capture. Also removes the following test cases that validated this behavior: - test_request_body_captured_on_segment_span_streaming - test_request_body_not_read_span_streaming - test_request_body_over_size_limit_span_streaming Remove unused imports from test file. Fixes PY-2422 Fixes #6292
ericapisani
commented
May 19, 2026
Member
Author
There was a problem hiding this comment.
This is an indentation change after the removal of the finally block that was setting the http.request.body.data attribute - it might be easier to review this outside the diff view
Contributor
Codecov Results 📊✅ 155 passed | ⏭️ 2 skipped | Total: 157 | Pass Rate: 98.73% | Execution Time: 44.45s 📊 Comparison with Base Branch
✨ No test changes detected All tests are passing successfully. ❌ Patch coverage is 0.00%. Project has 15504 uncovered lines. Files with missing lines (1)
Coverage diff@@ Coverage Diff @@
## main #PR +/-##
==========================================
- Coverage 31.09% 30.62% -0.47%
==========================================
Files 190 190 —
Lines 22353 22346 -7
Branches 7584 7580 -4
==========================================
+ Hits 6950 6842 -108
- Misses 15403 15504 +101
- Partials 581 582 +1Generated by Codecov Action |
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.
Removes request body capture from aiohttp span streaming to reduce complexity.
The aiohttp integration previously captured the request body and set it as the
http.request.body.dataspan attribute during span streaming. This changeremoves that functionality to simplify the integration, along with the
associated tests that verified the behavior.
Closes #6292
Fixes PY-2422