Skip to content

feat(anthropic): Record reasoning parts in nonstreaming output - #8192

Merged
alexander-alderman-webb merged 2 commits into
masterfrom
webb/anthropic/reasoning
Nov 5, 2026
Merged

alexander-alderman-webb merged 2 commits into
masterfrom
webb/anthropic/reasoning

Conversation

@alexander-alderman-webb

@alexander-alderman-webb alexander-alderman-webb commented Nov 5, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Based on the example in sentry-conventions for gen_ai.output.messages:

https://github.com/getsentry/sentry-conventions/blob/main/model/attributes/gen_ai/gen_ai__output__messages.json

Extend EXAMPLE_MESSAGE to return a thinking part when a supported library version is installed.
Stops re-using EXAMPLE_MESSAGE in streaming responses and creates two fixtures to reduce duplication among streaming responses in tests.

Issues

Closes PY-3055

Reminders

@alexander-alderman-webb
alexander-alderman-webb force-pushed the webb/anthropic/reasoning branch 3 times, most recently from 04ebcdc to a5d6045 Compare November 5, 2026 08:03
Comment thread sentry_sdk/integrations/anthropic.py Resolved
@linear-code

linear-code Bot commented Nov 5, 2026

Copy link
Copy Markdown

PY-3055

@alexander-alderman-webb alexander-alderman-webb changed the title feat(anthropic): Record reasoning parts in output feat(anthropic): Record reasoning parts in nonstreaming output Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Results 📊

✅ 137214 passed | ⏭️ 7456 skipped | Total: 144670 | Pass Rate: 94.85% | Execution Time: 461m 25s

📊 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 100.00% (8 of 8 changed executable lines covered; target 80%).
Project statement coverage is 90.33% (unchanged from base (dbc50bd) to head (d6f725b)).

Changed files with executable lines (1)
File Patch coverage Changed executable lines
sentry_sdk/integrations/anthropic.py 100.00% 8/8 covered; partial branches: 753
Coverage diff
@@            Coverage Diff             @@
##        master     #8192       +/-##
==========================================
  Coverage    90.33%    90.33%        —%
==========================================
  Files          203       203         —
  Tracked lines     26905     26910        +5
  Branches     10048     10050        +2
==========================================
+ Hits         24302     24307        +5
  Misses        2603      2603         —
  Partials      1516      1516         —

Generated by Coverage Action

@alexander-alderman-webb
alexander-alderman-webb marked this pull request as ready for review November 5, 2026 08:20
@alexander-alderman-webb
alexander-alderman-webb requested a review from a team as a code owner November 5, 2026 08:20
@alexander-alderman-webb
alexander-alderman-webb merged commit 7b1b1cb into master Nov 5, 2026
326 of 329 checks passed
@alexander-alderman-webb
alexander-alderman-webb deleted the webb/anthropic/reasoning branch November 5, 2026 14:06
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.

2 participants