GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat(boto3): Add response, retry, and error span attributes by pabloDeputter · Pull Request #7499 · getsentry/sentry-python

Conversation

@pabloDeputter

@pabloDeputter pabloDeputter commented Sep 14, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Description

Add generic response, retry, and error attribute enrichment to boto3 spans. Previously, only recorded request and client metadata was instrumented; information after the call such as HTTP status, retry count, etc was omitted. The new attributes follow the OTel AWS SDK conventions.

Changes

  • add SPANDATA consts: AWS_REQUEST_ID, AWS_EXTENDED_REQUEST_ID, HTTP_REQUEST_RESEND_COUNT, and ERROR_TYPE.
  • add _get_response_attributes() to extract http.response_status_code, http.request_resend_count, aws.request_id, and aws.extended_request_id.
  • Add erorr.type from ClientError.Eror.Code or the exception class, without recording error messages.

Issues

Resolves #7476

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@pabloDeputter
pabloDeputter added this pull request to stack #7500 September 14, 2026 12:53
@github-actions

github-actions Bot commented Sep 14, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Codecov Results 📊

✅ 132851 passed | ⏭️ 7220 skipped | Total: 140071 | Pass Rate: 94.85% | Execution Time: 452m 40s

📊 Comparison with Base Branch

Metric Change
Total Tests 📈 +3487
Passed Tests 📈 +3524
Failed Tests 📉 -60
Skipped Tests 📈 +23

➖ Removed Tests (60)

View removed tests
  • test_input_attributes_nonstreaming_chat[False-True-False-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat[False-True-False-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat[False-True-False-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat[False-False-True-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat[False-False-True-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat[False-False-True-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat[False-False-True-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat[False-False-False-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat[False-False-False-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat[False-False-False-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat[False-False-False-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-True-True-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-True-True-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-True-True-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-True-True-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-True-False-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-True-False-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-True-False-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-True-False-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-False-True-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-False-True-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-False-True-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-False-True-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-False-False-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-False-False-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-False-False-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[True-False-False-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-True-True-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-True-True-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-True-True-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-True-True-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-True-False-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-True-False-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-True-False-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-True-False-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-False-True-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-False-True-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-False-True-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-False-True-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-False-False-messages0-expected_system_instructions0-expected_input_messages0]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-False-False-messages1-expected_system_instructions1-expected_input_messages1]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-False-False-messages2-expected_system_instructions2-expected_input_messages2]
    • File: tests.integrations.mistral.test_mistral
  • test_input_attributes_nonstreaming_chat_async[False-False-False-messages3-expected_system_instructions3-expected_input_messages3]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat[True-True-True]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat[True-True-False]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat[True-False-True]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat[True-False-False]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat[False-True-True]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat[False-True-False]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat[False-False-True]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat[False-False-False]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat_async[True-True-True]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat_async[True-True-False]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat_async[True-False-True]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat_async[True-False-False]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat_async[False-True-True]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat_async[False-True-False]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat_async[False-False-True]
    • File: tests.integrations.mistral.test_mistral
  • test_output_attributes_nonstreaming_chat_async[False-False-False]
    • File: tests.integrations.mistral.test_mistral
  • test_cache_spans_templatetag[True]
    • File: tests.integrations.django.test_cache_module

All tests are passing successfully.

✅ Patch coverage is 100.00%. Project has 2562 uncovered lines.
✅ Project coverage is 90.34%. Comparing base (6868ffd) to head (064eab6).

Files with missing lines (1)
File Patch % Lines
sentry_sdk/integrations/boto3/_instrumentation.py 100.00% ⚠️ 1 partials
Coverage diff
@@            Coverage Diff             @@
##        master       #PR       +/-##
==========================================
+ Coverage    90.30%    90.34%    +0.04%
==========================================
  Files          195       199        +4
  Lines        26261     26524      +263
  Branches      9798      9864       +66
==========================================
+ Hits         23714     23962      +248
- Misses        2547      2562       +15
- Partials      1485      1495       +10

Generated by Codecov Action

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pabloDeputter pabloDeputter changed the title Pablo/add boto3 response retry error attributes feat(boto3): Add response, retry, and error span attributes Sep 14, 2026
@pabloDeputter
pabloDeputter force-pushed the pablo/add-boto3-response-retry-error-attributes branch from a15c641 to 56a7ab6 Compare September 14, 2026 14:42
@pabloDeputter
pabloDeputter force-pushed the pablo/add-boto3-response-retry-error-attributes branch from 56a7ab6 to 176096b Compare September 15, 2026 12:58
sentry-warden[bot]
sentry-warden Bot reviewed Sep 15, 2026
View reviewed changes
Comment thread tests/integrations/boto3/test_client.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@pabloDeputter
pabloDeputter force-pushed the pablo/add-boto3-response-retry-error-attributes branch from af6b9a8 to 49474d0 Compare September 17, 2026 15:48
@pabloDeputter
pabloDeputter force-pushed the pablo/add-boto3-response-retry-error-attributes branch 2 times, most recently from 2e63bac to 35f0dc3 Compare September 17, 2026 16:00
@pabloDeputter
pabloDeputter marked this pull request as ready for review September 17, 2026 16:07
@pabloDeputter
pabloDeputter requested a review from a team as a code owner September 17, 2026 16:07
@pabloDeputter
pabloDeputter force-pushed the pablo/add-boto3-response-retry-error-attributes branch from 76e7425 to f922864 Compare September 18, 2026 13:02
cursor[bot]
cursor Bot reviewed Sep 18, 2026
View reviewed changes

@cursor cursor Bot left a comment •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

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.

Stale Bugbot comment from a previous run.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread sentry_sdk/integrations/boto3/_client.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@pabloDeputter
pabloDeputter removed this pull request from stack #7500 September 18, 2026 14:34
@pabloDeputter
pabloDeputter added this pull request to stack #7539 September 18, 2026 14:35
@pabloDeputter
pabloDeputter force-pushed the pablo/add-boto3-response-retry-error-attributes branch from 4fae1c9 to cdd5c95 Compare September 18, 2026 15:06
@pabloDeputter
pabloDeputter removed this pull request from stack #7539 September 18, 2026 15:08
@pabloDeputter
pabloDeputter added this pull request to stack #7541 September 18, 2026 15:08
@pabloDeputter
pabloDeputter force-pushed the pablo/add-boto3-response-retry-error-attributes branch from cdd5c95 to d55060f Compare September 18, 2026 15:20
@pabloDeputter
pabloDeputter force-pushed the pablo/add-boto3-response-retry-error-attributes branch 3 times, most recently from 6c9e3a8 to a72a791 Compare September 21, 2026 16:07
@pabloDeputter
pabloDeputter force-pushed the pablo/add-boto3-response-retry-error-attributes branch from 6edfb01 to 850c129 Compare September 30, 2026 13:31
pabloDeputter added 21 commits September 30, 2026 16:04
@pabloDeputter
ref(boto3): simplify client span lifecycle and header handling
d32a43f
@pabloDeputter
feat(boto3): add attributes to consts.py
822438b
@pabloDeputter
merge changes
46d24b2
@pabloDeputter
add tests
30d1e3f
@pabloDeputter
patch correct methods
250699d
@pabloDeputter
lint
d9edef5
@pabloDeputter
use ordered search for request id and hist id
90383dc
@pabloDeputter
ref(boto3): remove redundant span checks during enrichment
d482500
@pabloDeputter
fix duplicates when merging
26fdcb1
@pabloDeputter
use consts and string lookup for client.getintegration
eeac30a
@pabloDeputter
lint
8b61aac
@pabloDeputter
ruff
308eb5f
@pabloDeputter
ref(boto3): add permalinks
8e4ce5a
@pabloDeputter
fix(boto3): add error.type to both span kinds
832d90d
@pabloDeputter
ref(boto3): specify docstring for _set_span_attributes() further
0ee5f14
@pabloDeputter
ref(boto3): use f-string instead
a8f521e
@pabloDeputter
ref(boto3): remove comment regarding HTTP_REQUEST_RESEND_COUNT
2d92b4e
@pabloDeputter
ref(boto3): remove else block
12dd5e6
@pabloDeputter
tests(boto3): remove uncessary testcases
21794bf
@pabloDeputter
ref(boto3): remove uncessary defensive conditionals
7859e97
@pabloDeputter
fix flaky test
1f4e936
@pabloDeputter
pabloDeputter force-pushed the pablo/add-boto3-response-retry-error-attributes branch from 2718630 to 1f4e936 Compare September 30, 2026 14:05
pabloDeputter added 2 commits September 30, 2026 17:11
@pabloDeputter
trigger tests
d5d1faf
@pabloDeputter
trigger tests
064eab6
@pabloDeputter
pabloDeputter merged commit bc11cb7 into master Sep 30, 2026
314 of 316 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@pabloDeputter
pabloDeputter deleted the pablo/add-boto3-response-retry-error-attributes branch September 30, 2026 15:50
@sentry-release-bot sentry-release-bot Bot mentioned this pull request Oct 12, 2026
publish: getsentry/[email protected] getsentry/publish#9830
Closed
6 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cursor cursor[bot] cursor[bot] left review comments
@sentry-warden sentry-warden[bot] sentry-warden[bot] left review comments
@ericapisani ericapisani ericapisani approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

feat(boto3): Add generic response, retry, and error attributes

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@pabloDeputter @ericapisani
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.