feat(boto3): Add common OTel AWS client attributes - #7481
pabloDeputter wants to merge 1 commit into
Conversation
Codecov Results 📊✅ 128609 passed | ⏭️ 7151 skipped | Total: 135760 | Pass Rate: 94.73% | Execution Time: 435m 52s 📊 Comparison with Base Branch
All tests are passing successfully. ✅ Patch coverage is 88.24%. Project has 2534 uncovered lines. Files with missing lines (2)
Coverage diff@@ Coverage Diff @@
## master #PR +/-##
==========================================
+ Coverage 90.18% 90.24% +0.06%
==========================================
Files 193 196 +3
Lines 25773 25960 +187
Branches 9532 9578 +46
==========================================
+ Hits 23241 23426 +185
- Misses 2532 2534 +2
- Partials 1431 1439 +8Generated 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
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 afcb977. Configure here.
f98d2f2 to
77468b1
Compare
77468b1 to
6ea0078
Compare
6ea0078 to
0d61ef8
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