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(bedrock): Set token attributes for streamed responses by alexander-alderman-webb · Pull Request #8235 · getsentry/sentry-python

Conversation

@alexander-alderman-webb

@alexander-alderman-webb alexander-alderman-webb commented Nov 10, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Collaborator

Change the extension interface to require on_success_response() instead of get_response_attributes().
This is required so that the Bedrock extension closes the span when the streamed model response is completed or is unexpectedly suspended.

Handle iterators for streaming responses analogously to other GenAI integrations, and add a test with an error bubbling up during stream iteration.
The current pattern is setting the span status to error if anything other than a GeneratorExit bubbles through the iteration.

Sorry, something went wrong.

Uh oh!

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

All reactions
@alexander-alderman-webb
feat(bedrock): Set token attributes for nonstreaming responses
dd9644c
@alexander-alderman-webb
alexander-alderman-webb added this pull request to stack #8236 November 10, 2026 11:33
@alexander-alderman-webb
feat(bedrock): Set token attributes for streamed responses
672b917
@alexander-alderman-webb
alexander-alderman-webb force-pushed the webb/bedrock/token-attributes branch from 74d8ae4 to 672b917 Compare November 10, 2026 11:34
@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review November 10, 2026 11:36
@alexander-alderman-webb
alexander-alderman-webb requested a review from a team as a code owner November 10, 2026 11:36
cursor[bot]
cursor Bot reviewed Nov 10, 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/_services/bedrock.py Resolved

Uh oh!

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

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

Uh oh!

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

Comment thread sentry_sdk/integrations/boto3/_services/bedrock.py Resolved

Uh oh!

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

@alexander-alderman-webb
alexander-alderman-webb marked this pull request as draft November 10, 2026 11:45
alexander-alderman-webb added 4 commits November 10, 2026 12:49
@alexander-alderman-webb
include cached tokens in input tokens
67daac7
@alexander-alderman-webb
include cached tokens in input tokens
7c834a4
@alexander-alderman-webb
merge
7b53fb3
@alexander-alderman-webb
merge
d0233d7
@github-actions

github-actions Bot commented Nov 10, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Coverage Results 📊

✅ 137444 passed | ⏭️ 7671 skipped | Total: 145115 | Pass Rate: 94.71% | Execution Time: 435m 15s

📊 Comparison with Base Branch

Metric Change
Total Tests —
Passed Tests —
Failed Tests —
Skipped Tests —

✨ Test counts unchanged from base.

All tests are passing successfully.

✅ Patch coverage is 80.19% (85 of 106 changed executable lines covered; target 80%).
Project statement coverage is 90.24% (down 0.07 percentage points from base (f110be5) to head (356182c)).

Changed files with executable lines (4)
File Patch coverage Changed executable lines
sentry_sdk/integrations/boto3/_services/bedrock.py 79.80% 79/99 covered; missed: 20, 21, 48, 78, 79, 119, 132, 133, 135, 136, 137, 138, 139, 140, 141, 143, 299, 300, 301, 303; partial branches: 47, 77, 294
sentry_sdk/integrations/boto3/_services/base.py 50.00% 1/2 covered; missed: 42
sentry_sdk/integrations/boto3/init.py 100.00% 2/2 covered
sentry_sdk/integrations/boto3/_client.py 100.00% 3/3 covered
Coverage diff
@@            Coverage Diff             @@
##        master     #8235       +/-##
==========================================
- Coverage    90.31%    90.24%    -0.07%
==========================================
  Files          203       203         —
  Tracked lines     27020     27114       +94
  Branches     10106     10136       +30
==========================================
+ Hits         24404     24469       +65
- Misses        2616      2645       +29
- Partials      1534      1539        +5

Generated by Coverage Action

All reactions

Sorry, something went wrong.

Uh oh!

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

sentry-warden[bot]
sentry-warden Bot reviewed Nov 10, 2026
View reviewed changes
Comment thread sentry_sdk/integrations/boto3/_services/bedrock.py Resolved

Uh oh!

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

Comment thread sentry_sdk/integrations/boto3/_services/bedrock.py Resolved

Uh oh!

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

@alexander-alderman-webb
alexander-alderman-webb force-pushed the webb/bedrock/token-attributes branch 2 times, most recently from c77498f to d920520 Compare November 10, 2026 13:55
@alexander-alderman-webb
patch __iter__ and close()
ce4225d
@alexander-alderman-webb
alexander-alderman-webb force-pushed the webb/bedrock/token-attributes branch from d920520 to ce4225d Compare November 10, 2026 13:56
@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review November 10, 2026 13:58
cursor[bot]
cursor Bot reviewed Nov 10, 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/_services/bedrock.py Resolved

Uh oh!

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

@alexander-alderman-webb
check exc_type is not None
166a731
sentrivana
sentrivana approved these changes Nov 10, 2026
View reviewed changes
@alexander-alderman-webb
alexander-alderman-webb removed this pull request from stack #8236 November 10, 2026 15:15
Base automatically changed from webb/bedrock/response-model to master November 10, 2026 15:31
alexander-alderman-webb added 2 commits November 10, 2026 16:38
@alexander-alderman-webb
merge master
1ce21f5
@alexander-alderman-webb
add an early return
3053b22
cursor[bot]
cursor Bot reviewed Nov 10, 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/_services/bedrock.py Resolved

Uh oh!

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

@alexander-alderman-webb
alexander-alderman-webb force-pushed the webb/bedrock/token-attributes branch 2 times, most recently from 78e7752 to 4335059 Compare November 10, 2026 15:54
@alexander-alderman-webb
alexander-alderman-webb enabled auto-merge (squash) November 10, 2026 15:56
cursor[bot]
cursor Bot reviewed Nov 10, 2026
View reviewed changes

@cursor cursor Bot left a comment

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.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 4335059. Configure here.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread tests/integrations/boto3/test_bedrock.py Resolved

Uh oh!

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

@alexander-alderman-webb
alexander-alderman-webb force-pushed the webb/bedrock/token-attributes branch 2 times, most recently from 7eed4f8 to fbfe80f Compare November 10, 2026 16:03
@alexander-alderman-webb
tests more realistic
356182c
@alexander-alderman-webb
alexander-alderman-webb force-pushed the webb/bedrock/token-attributes branch from fbfe80f to 356182c Compare November 10, 2026 16:04
@alexander-alderman-webb
alexander-alderman-webb merged commit 843958d into master Nov 10, 2026
167 checks passed

Uh oh!

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

@alexander-alderman-webb
alexander-alderman-webb deleted the webb/bedrock/token-attributes branch November 10, 2026 16:17
@sentry-release-bot sentry-release-bot Bot mentioned this pull request Nov 12, 2026
publish: getsentry/[email protected] getsentry/publish#10388
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
@sentrivana sentrivana sentrivana 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.

Uh oh!

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

2 participants

@alexander-alderman-webb @sentrivana
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.