| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:c5a8babb-3871-5ad3-ce86-7b7d80b75e54 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BC86:395430:709C18:9742C1:6B00D78B |
| html-safe-nonce | 7cba00c870bb542c2619c67a158dce8cc7d5a433cc59d723c9cc7d9ae72265d8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzg2OjM5NTQzMDo3MDlDMTg6OTc0MkMxOjZCMDBENzhCIiwidmlzaXRvcl9pZCI6IjYyNDAzNTI0NDUwOTI5MTA5ODciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 98f6c2284f54375f376786b696c7bc1f5c1e8113ff5c451d2ff5dd321f449f80 |
| hovercard-subject-tag | pull_request:3408715224 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | ///pull_requests/show/files |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/getsentry/sentry-python/pull/5683/files |
| twitter:image | https://avatars.githubusercontent.com/u/224035503?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/224035503?s=400&v=4 |
| og:image:alt | Description
Consolidate span finishing code in the __exit__ block of a new _StreamSpanContext context manager.
Forward exception info from _StreamSpanContext.__exit__() to Span.__exit__().
Issues... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a481f62a1e04c9b9bdcb5628230682c66d59006f5b13b080f79cba84a176905b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git |
| octolytics-dimension-user_id | 1396951 |
| octolytics-dimension-user_login | getsentry |
| octolytics-dimension-repository_id | 137814779 |
| octolytics-dimension-repository_nwo | getsentry/sentry-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 137814779 |
| octolytics-dimension-repository_network_root_nwo | getsentry/sentry-python |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 84c8c5cc25e2fb7f2308428458538436baecc6d2 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| Skip to content | https://github.com/getsentry/sentry-python/pull/5683/files#start-of-content |
| https://github.com/ |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F5683%2Ffiles |
| GitHubRepository hosting, code review, and collaboration | https://github.com/platform |
| CopilotAI coding agent for tasks, projects, and automated work | https://github.com/features/copilot |
| ActionsCI/CD and automation | https://github.com/features/actions |
| Code QualityQuality analysis, fixes, and enforcement | https://github.com/features/code-quality |
| CodespacesCloud development environments | https://github.com/features/codespaces |
| Code SecurityVulnerability detection and remediation | https://github.com/security/advanced-security/code-security |
| Secret ProtectionSecret scanning and leak prevention | https://github.com/security/advanced-security/secret-protection |
| All Features | https://github.com/features |
| Documentation | https://docs.github.com/en |
| Training | https://learn.github.com/skills |
| Certifications | https://learn.github.com/credentials |
| Build with Copilot | https://github.com/features/ai |
| Customize Copilot | https://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview |
| Integrations | https://github.com/marketplace |
| Trending repos | https://github.com/trending |
| GitHub Sponsors | https://github.com/open-source/sponsors |
| Developer articles | https://github.com/resources/articles |
| ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place. | https://github.blog/changelog/ |
| Enterprises | https://github.com/enterprise |
| Team | https://github.com/team |
| Startups | https://github.com/enterprise/startups |
| Nonprofits | https://github.com/solutions/industry/nonprofits |
| Healthcare | https://github.com/solutions/industry/healthcare |
| Financial services | https://github.com/solutions/industry/financial-services |
| Manufacturing | https://github.com/solutions/industry/manufacturing |
| Government | https://github.com/solutions/industry/government |
| See all industries | https://github.com/solutions/industry |
| Why GitHub | https://github.com/why-github |
| Customer Stories | https://github.com/customer-stories |
| Business insights | https://github.com/solutions/executive-insights |
| Trust Center | https://github.com/trust-center |
| GitHub Advanced SecurityEnterprise-grade code security | https://github.com/security/advanced-security |
| Copilot for businessEnterprise-grade AI features | https://github.com/features/copilot/copilot-business |
| Premium SupportEnterprise-grade 24/7 support | https://github.com/enterprise/premium-support |
| Documentation | https://docs.github.com/en |
| Resource center | https://github.com/resources |
| Blog | https://github.blog/ |
| Events & webinars | https://github.com/resources/events |
| Community Forum | https://github.com/orgs/community/discussions |
| Customer Stories | https://github.com/customer-stories |
| Integrations | https://github.com/marketplace |
| Customer support | https://help.github.com/ |
| Training | https://learn.github.com/skills |
| GitHub Status | https://www.githubstatus.com/ |
| About | https://github.com/about |
| Partners | https://github.com/partners |
| Changelog | https://github.blog/changelog/ |
| GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub. | https://githubuniverse.com/ |
| Pricing | https://github.com/pricing |
| Sign in | https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F5683%2Ffiles |
| Sign up | https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=getsentry%2Fsentry-python |
| Reload | https://github.com/getsentry/sentry-python/pull/5683/files |
| Reload | https://github.com/getsentry/sentry-python/pull/5683/files |
| Reload | https://github.com/getsentry/sentry-python/pull/5683/files |
| getsentry | https://github.com/getsentry |
| sentry-python | https://github.com/getsentry/sentry-python |
| Code | https://github.com/getsentry/sentry-python |
| Issues345 (345) | https://github.com/getsentry/sentry-python/issues |
| Pull requests42 (42) | https://github.com/getsentry/sentry-python/pulls |
| Discussions | https://github.com/getsentry/sentry-python/discussions |
| Actions | https://github.com/getsentry/sentry-python/actions |
| Security and quality2 (2) | https://github.com/getsentry/sentry-python/security |
| Insights | https://github.com/getsentry/sentry-python/insights |
| Sign up for GitHub
| https://github.com/signup?return_to=%2Fgetsentry%2Fsentry-python%2Fissues%2Fnew%2Fchoose |
| terms of service | https://docs.github.com/terms |
| privacy statement | https://docs.github.com/privacy |
| Sign in | https://github.com/login?return_to=%2Fgetsentry%2Fsentry-python%2Fissues%2Fnew%2Fchoose |
| alexander-alderman-webb | https://github.com/alexander-alderman-webb |
| master | https://github.com/getsentry/sentry-python/tree/master |
| webb/anthropic/exc-on-exit | https://github.com/getsentry/sentry-python/tree/webb/anthropic/exc-on-exit |
|
Conversation
15
| https://github.com/getsentry/sentry-python/pull/5683 |
|
Commits
42
| https://github.com/getsentry/sentry-python/pull/5683/commits |
|
Checks
158
| https://github.com/getsentry/sentry-python/pull/5683/checks |
|
Files changed
| https://github.com/getsentry/sentry-python/pull/5683/files |
| Please reload this page | https://github.com/getsentry/sentry-python/pull/5683/files |
|
fix(anthropic): Set exception info on streaming span when applicable
| https://github.com/getsentry/sentry-python/pull/5683/files#top |
|
Show all changes
42 commits
| https://github.com/getsentry/sentry-python/pull/5683/files |
|
e3cc76d
fix(anthropic): Respect iterator protocol in synchronous streamed res…
alexander-alderman-webb Mar 16, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/e3cc76d4516c8d4945d92c9b5f8846f69a36b3cf |
|
7bd7ed4
version check and typing
alexander-alderman-webb Mar 16, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/7bd7ed42c9efb24eb94ae07ef4b9f76c8c44db44 |
|
c8a6ec3
fix tests
alexander-alderman-webb Mar 16, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/c8a6ec306f1d413295b9dbbd213317fcc7c1241e |
|
6f1d833
missing types
alexander-alderman-webb Mar 16, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/6f1d833b6d290bd413cee40d4afe55981615a2cc |
|
40e2bf0
.
alexander-alderman-webb Mar 16, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/40e2bf029dd609bb9b1ded5acb7ba78b052001cf |
|
a21406f
fix(anthropic): Respect iterator protocol in asynchronous streamed re…
alexander-alderman-webb Mar 16, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/a21406f13fa28ce29fca0506f9f890cffe29d457 |
|
a3cc18f
simplify
alexander-alderman-webb Mar 16, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/a3cc18ff19c59bd708abce2cd715b8bb59e0f2bd |
|
631e727
Merge branch 'webb/anthropic/sync-iterators' into webb/anthropic/asyn…
alexander-alderman-webb Mar 16, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/631e727fc8722715fd1499918a234c6db2ebf70b |
|
dd26abc
simplify
alexander-alderman-webb Mar 16, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/dd26abcaebd8e033915e1a2bb37472e19b6e2005 |
|
c08fd2c
fix(anthropic): Set exception info on span when applicable
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/c08fd2cc85181a3cc1230bca1439181cda96735f |
|
336b2ee
skip error tests on old versions
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/336b2ee5090c0421c54d01bc4d9811c8f0af7fca |
|
f6b8909
merge master
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/f6b8909c6f506ff0f66dc7f9d15a28070645f184 |
|
0aeec72
update tests
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/0aeec7262f09978d76cce84c7d9d5ee649b63a95 |
|
005eb66
merge
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/005eb664fb449df2582551a3ae0c64efb23ab17e |
|
c5cd959
.
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/c5cd95933f6e81c7923b75c18bd159d5d8c17f65 |
|
f2cdd14
Merge branch 'webb/anthropic/async-iterators' into webb/anthropic/exc…
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/f2cdd14c79dd241e4a0f1c41599e0c27456d2e19 |
|
b92db6d
docstring
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/b92db6df0e143f8b1b57c383852ed81dfb80a496 |
|
a956644
docstring
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/a9566445bed1d2f00c40812a041b06418c51c74d |
|
beb8f2c
docstrings
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/beb8f2c792b7b1108807e7d08d5b6fc080977178 |
|
e84a63f
Merge branch 'webb/anthropic/sync-iterators' into webb/anthropic/asyn…
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/e84a63f2a37a255cb90e5aa342e3b731274abb57 |
|
7ec95fe
docs
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/7ec95fe46b97728d62717b4a9d84503e1fc3a6a1 |
|
288a065
Merge branch 'webb/anthropic/sync-iterators' into webb/anthropic/asyn…
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/288a065e2cdbaa8ba7055fee5f4445b5f06f9817 |
|
8e9bfab
docstrings
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/8e9bfabbd7211e505c39855eb666f444d19f9559 |
|
fab5d93
type annotation
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/fab5d93b6503af639e7362ab0f62899ef21116e0 |
|
cda41e2
review
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/cda41e20c60ed25fc4a9fc99d62c90531c50ace6 |
|
4156446
Merge branch 'webb/anthropic/sync-iterators' into webb/anthropic/asyn…
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/41564461edaf248b3ba027affc50e79f016423cf |
|
e17e036
review
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/e17e0364090c01af3979cccd3027b727319ff9ae |
|
31869af
simplify
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/31869afeff1c812d127825e5602dd3754be716f3 |
|
1017e9e
simplify
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/1017e9eee15b2325934ee2e2cca8482db56a86dc |
|
8897151
simplify
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/8897151c0ec9f8f68775c3c751e71add352b8c11 |
|
fcedba7
.
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/fcedba70cf97c2163883f19a46f840d9aadbd390 |
|
fdf770a
.
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/fdf770a4c54bb1f6489f226ad19b884e2c69e186 |
|
e2f7afc
.
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/e2f7afc2cf38472318d1362273ace897b6b85cc5 |
|
170cdbf
merge
alexander-alderman-webb Mar 17, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/170cdbf638d71fd04d3d93c4290e0945484338c6 |
|
b3d9889
merge master
alexander-alderman-webb Mar 18, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/b3d988945fdd466e89153805731c3aaa1836299a |
|
47fd7e4
introduce context manager
alexander-alderman-webb Mar 18, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/47fd7e4a975d67e71b14f33dec61263a8b467b86 |
|
4b40b3a
return None from __exit__
alexander-alderman-webb Mar 18, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/4b40b3ac3fd92a0b15a5776e136eef440da92407 |
|
8aeea86
.
alexander-alderman-webb Mar 18, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/8aeea86f11603193fdfbe52fe865f964451580ad |
|
ddcf52a
remove dead code
alexander-alderman-webb Mar 18, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/ddcf52a5a176fa56fb3e81fcdd17b85bc1970817 |
|
6d2507d
docstring
alexander-alderman-webb Mar 18, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/6d2507d73ff0e732eac151731036a05f90222595 |
|
1bc5f86
docs
alexander-alderman-webb Mar 18, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/1bc5f869f3d477011195aa4650d9325b5a4ee84d |
|
09d51bc
add comment about guaranteed streaming state
alexander-alderman-webb Mar 19, 2026
| https://github.com/getsentry/sentry-python/pull/5683/commits/09d51bca5a7d18d1717436d9658a00b12ca93cb0 |
|
Clear filters
| https://github.com/getsentry/sentry-python/pull/5683/files |
| Please reload this page | https://github.com/getsentry/sentry-python/pull/5683/files |
| Please reload this page | https://github.com/getsentry/sentry-python/pull/5683/files |
|
anthropic.py
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
test_anthropic.py
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-3f015b03855e3bb647b04195c2a27a75ece9eb2c427a13c79a5ab81660a1365d |
|
| https://github.com/getsentry/sentry-python/blob/master/.github/CODEOWNERS#L1 |
| sentry_sdk/integrations/anthropic.py | https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
View file
| https://github.com/getsentry/sentry-python/blob/09d51bca5a7d18d1717436d9658a00b12ca93cb0/sentry_sdk/integrations/anthropic.py |
|
Open in desktop
| https://desktop.github.com |
| https://github.co/hiddenchars |
| https://github.com/getsentry/sentry-python/pull/5683/{{ revealButtonHref }} |
|
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
| Please reload this page | https://github.com/getsentry/sentry-python/pull/5683/files |
| Please reload this page | https://github.com/getsentry/sentry-python/pull/5683/files |
|
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
| Please reload this page | https://github.com/getsentry/sentry-python/pull/5683/files |
|
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
|
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
| Please reload this page | https://github.com/getsentry/sentry-python/pull/5683/files |
|
| https://github.com/getsentry/sentry-python/pull/5683/files#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05 |
| Please reload this page | https://github.com/getsentry/sentry-python/pull/5683/files |
| Please reload this page | https://github.com/getsentry/sentry-python/pull/5683/files |
|
| https://github.com |
| Terms | https://docs.github.com/site-policy/github-terms/github-terms-of-service |
| Privacy | https://docs.github.com/site-policy/privacy-policies/github-privacy-statement |
| Security | https://github.com/security |
| Status | https://www.githubstatus.com/ |
| Community | https://github.community/ |
| Docs | https://docs.github.com/ |
| Contact | https://support.github.com?tags=dotcom-footer |