feat(boto3): Add common OTel AWS client attributes - #7481
pabloDeputter wants to merge 3 commits into
Conversation
Codecov Results 📊✅ 130098 passed | ⏭️ 7171 skipped | Total: 137269 | Pass Rate: 94.78% | Execution Time: 437m 23s 📊 Comparison with Base Branch
➖ Removed Tests (1)View removed tests
All tests are passing successfully. ✅ Patch coverage is 92.98%. Project has 2550 uncovered lines. Files with missing lines (2)
Coverage diff@@ Coverage Diff @@
## master #PR +/-##
==========================================
+ Coverage 90.22% 90.27% +0.05%
==========================================
Files 194 198 +4
Lines 25997 26205 +208
Branches 9662 9710 +48
==========================================
+ Hits 23454 23655 +201
- Misses 2543 2550 +7
- Partials 1451 1460 +9Generated by Codecov Action |
9fe9acf to
4e8f427
Compare
| except BaseException as exc: | ||
| if span is not None: | ||
| with capture_internal_exceptions(): | ||
| _finish_active_http_child_span(span) |
There was a problem hiding this comment.
Why are we ending the stdlib span here?
There was a problem hiding this comment.
We finish the HTTP span before the parent boto3 span so that the correct order is preserved. Otherwise the HTTP span would be kept active until the whole response is read, while the parent boto3 span finishes first; afterwards when the HTTP span finishes, it will restore the already-finished parent as current, causing subsequent calls to be parented incorrectly.
There was a problem hiding this comment.
I can send a screenshot from sentry maybe to show against latest release
aa1d65a to
939a3f8
Compare
ddf5deb to
351e3b6
Compare
77468b1 to
6ea0078
Compare
6ea0078 to
0d61ef8
Compare
0d61ef8 to
9752452
Compare
3412f9b to
64d7159
Compare
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 64d7159. Configure here.
1824d8f to
3d95ef4
Compare
3d95ef4 to
f3ed486
Compare



Description
Implements #7475 by adding common OTel attributes to boto client spans.
Changes
rpc.system.name,rpc.service,rpc.method,cloud.region,server.address,server.port.rpc.system.nametoaws-apiService.Operation(now it'saws.<service>.<Operation>), e.g.S3.HeadObjectfollowing OTel is a breaking change and will be done in major.rpc.service; not supported anymore by OTel, but JS keeps this too.rpc.method.AwsCallContextto carry extra client metadata for instrumentation.Issues
Resolves #7475