Skip to content

fix(anthropic): Close span on GeneratorExit

Sign in for the full log view
GitHub Actions / warden completed Mar 12, 2026 in 2m 32s

1 issue

Medium

Missing test coverage for GeneratorExit scenario - `sentry_sdk/integrations/anthropic.py:367-413`

The PR adds try/finally handling to close spans when GeneratorExit is raised (e.g., when consumers break early from a streaming iterator), but no test verifies this behavior. Without a test that simulates early iterator termination, there's no regression protection for this fix.

4 skills analyzed
Skill Findings Duration Cost
code-review 1 1m 13s $0.60
find-bugs 0 2m 29s $0.89
skill-scanner 0 32.2s $0.18
security-review 0 47.6s $0.25

Duration: 5m 2s · Tokens: 1.4M in / 13.7k out · Cost: $1.91