Skip to content

feat(bedrock): Record gen_ai.response.finish_reasons for non-streaming responses - #8250

Draft
alexander-alderman-webb wants to merge 1 commit into
webb/bedrock/nonstreaming-output-messagesfrom
webb/bedrock/nonstreaming-finish-reasons
Draft

alexander-alderman-webb wants to merge 1 commit into
webb/bedrock/nonstreaming-output-messagesfrom
webb/bedrock/nonstreaming-finish-reasons

Conversation

@alexander-alderman-webb

Copy link
Copy Markdown
Collaborator

Set attribute based on stopReason in response["usage"] returned from the Bedrock API.

@alexander-alderman-webb
alexander-alderman-webb force-pushed the webb/bedrock/nonstreaming-finish-reasons branch from 0edf177 to 444f537 Compare November 11, 2026 16:54
@github-actions

Copy link
Copy Markdown
Contributor

Coverage Results 📊

✅ 138471 passed | ❌ 1 failed | ⏭️ 7813 skipped | Total: 146285 | Pass Rate: 94.66% | Execution Time: 445m 41s

📊 Comparison with Base Branch

Metric Change
Total Tests 📉 -590
Passed Tests 📉 -639
Failed Tests 📈 +1
Skipped Tests 📈 +48

➕ New Tests (1)

View new tests
  • test_cache_spans_item_size[True]
    • File: tests.integrations.django.test_cache_module
    • Status: ❌ Failing

❌ Failed Tests

test_cache_spans_item_size[True]

File: tests.integrations.django.test_cache_module
Suite: py3.14-django-v6.1.3
Error: tests/integrations/django/test_cache_module.py:763: in test_cache_spans_item_size assert not spans[0]["attributes"]["cache.hit"] E assert not True

Stack Trace
tests/integrations/django/test_cache_module.py:763: in test_cache_spans_item_size
    assert not spans[0]["attributes"]["cache.hit"]
E   assert not True

✅ Patch coverage is 100.00% (2 of 2 changed executable lines covered; target 80%).
Project statement coverage is 90.24% (unchanged from base (fc6b034) to head (444f537)).

Changed files with executable lines (1)
File Patch coverage Changed executable lines
sentry_sdk/integrations/boto3/_services/bedrock.py 100.00% 2/2 covered
Coverage diff
@@            Coverage Diff             @@
##        master     #8250       +/-##
==========================================
  Coverage    90.24%    90.24%        —%
==========================================
  Files          203       203         —
  Tracked lines     27125     27235      +110
  Branches     10142     10200       +58
==========================================
+ Hits         24478     24578      +100
- Misses        2647      2657       +10
- Partials      1541      1554       +13

Generated by Coverage Action

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant