René's URL Explorer Experiment


Title: feat(anthropic): Record finish reasons in AI monitoring spans by ericapisani · Pull Request #5678 · getsentry/sentry-python · GitHub

Open Graph Title: feat(anthropic): Record finish reasons in AI monitoring spans by ericapisani · Pull Request #5678 · getsentry/sentry-python

X Title: feat(anthropic): Record finish reasons in AI monitoring spans by ericapisani · Pull Request #5678 · getsentry/sentry-python

Description: The official Python SDK for Sentry.io. Contribute to getsentry/sentry-python development by creating an account on GitHub.

Open Graph Description: Add GEN_AI_RESPONSE_FINISH_REASONS span data to the Anthropic integration by capturing stop_reason from API responses. For non-streaming responses, the stop_reason is read directly from the Message...

X Description: Add GEN_AI_RESPONSE_FINISH_REASONS span data to the Anthropic integration by capturing stop_reason from API responses. For non-streaming responses, the stop_reason is read directly from the Message...

Opengraph URL: https://github.com/getsentry/sentry-python/pull/5678

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/voltron/pull_requests/show/:user_id/:repository/:id/pull_request_layout(.:format)
route-controllervoltron_pull_requests_fragments
route-actionpull_request_layout
fetch-noncev2:8b41fd80-8865-aba6-c130-28ae17d9c557
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE94E:25598F:68A030:8CB787:6B00D5BA
html-safe-noncec8752fdd585163b02b561a0c22707879f1ec700a8e418d41e4505b6fcdcad1b7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFOTRFOjI1NTk4Rjo2OEEwMzA6OENCNzg3OjZCMDBENUJBIiwidmlzaXRvcl9pZCI6IjU0MDQwMDIzMzI2NTAyOTY3NjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaca77b2facd46e897347b51287f1ce9a76d798af543a29a8d62588e94d3a59b28c
hovercard-subject-tagpull_request:3404744795
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/pull_requests_fragments/pull_request_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/voltron/pull_requests/show/getsentry/sentry-python/5678/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/ed5a10fbeec69dc669cd0358adb684717cdf4747a6e5e8b3a4e4a0c7f9fa9086/getsentry/sentry-python/pull/5678
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/ed5a10fbeec69dc669cd0358adb684717cdf4747a6e5e8b3a4e4a0c7f9fa9086/getsentry/sentry-python/pull/5678
og:image:altAdd GEN_AI_RESPONSE_FINISH_REASONS span data to the Anthropic integration by capturing stop_reason from API responses. For non-streaming responses, the stop_reason is read directly from the Message...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameericapisani
hostnamegithub.com
expected-hostnamegithub.com
Nonea481f62a1e04c9b9bdcb5628230682c66d59006f5b13b080f79cba84a176905b
turbo-cache-controlno-cache
go-importgithub.com/getsentry/sentry-python git https://github.com/getsentry/sentry-python.git
octolytics-dimension-user_id1396951
octolytics-dimension-user_logingetsentry
octolytics-dimension-repository_id137814779
octolytics-dimension-repository_nwogetsentry/sentry-python
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id137814779
octolytics-dimension-repository_network_root_nwogetsentry/sentry-python
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release84c8c5cc25e2fb7f2308428458538436baecc6d2
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/getsentry/sentry-python/pull/5678#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F5678
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F5678
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fpull_requests_fragments%2Fpull_request_layout&source=header-repo&source_repo=getsentry%2Fsentry-python
Reloadhttps://github.com/getsentry/sentry-python/pull/5678
Reloadhttps://github.com/getsentry/sentry-python/pull/5678
Reloadhttps://github.com/getsentry/sentry-python/pull/5678
getsentryhttps://github.com/getsentry
sentry-pythonhttps://github.com/getsentry/sentry-python
Codehttps://github.com/getsentry/sentry-python
Issues345 (345)https://github.com/getsentry/sentry-python/issues
Pull requests42 (42)https://github.com/getsentry/sentry-python/pulls
Discussionshttps://github.com/getsentry/sentry-python/discussions
Actionshttps://github.com/getsentry/sentry-python/actions
Security and quality2 (2)https://github.com/getsentry/sentry-python/security
Insightshttps://github.com/getsentry/sentry-python/insights
https://github.com/getsentry/sentry-python
ericapisanihttps://github.com/ericapisani
masterhttps://github.com/getsentry/sentry-python/tree/master
py-2136-take-2https://github.com/getsentry/sentry-python/tree/py-2136-take-2
Conversationhttps://github.com/getsentry/sentry-python/pull/5678
Commits4 (4)https://github.com/getsentry/sentry-python/pull/5678/commits
Checkshttps://github.com/getsentry/sentry-python/pull/5678/checks
Files changedhttps://github.com/getsentry/sentry-python/pull/5678/files
feat(anthropic): Record finish reasons in AI monitoring spanshttps://github.com/getsentry/sentry-python/pull/5678#top
ericapisanihttps://github.com/ericapisani
masterhttps://github.com/getsentry/sentry-python/tree/master
py-2136-take-2https://github.com/getsentry/sentry-python/tree/py-2136-take-2
https://github.com/ericapisani
ericapisanihttps://github.com/ericapisani
Mar 16, 2026https://github.com/getsentry/sentry-python/pull/5678#issue-4082801174
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5678
https://github.com/ericapisani
https://github.com/claude
feat(anthropic): Record finish reasons in AI monitoring spanshttps://github.com/getsentry/sentry-python/pull/5678/commits/99986469eff8ae37c5262b558bea6f980a9e39b3
9998646https://github.com/getsentry/sentry-python/pull/5678/commits/99986469eff8ae37c5262b558bea6f980a9e39b3
https://github.com/apps/linear-code
linear-codehttps://github.com/apps/linear-code
Mar 16, 2026https://github.com/getsentry/sentry-python/pull/5678#issuecomment-4068032783
PY-2136 [Anthropic integration] Set `gen_ai.response.finish_reason` on span when availablehttps://linear.app/getsentry/issue/PY-2136/anthropic-integration-set-gen-airesponsefinish-reason-on-span-when
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5678
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Mar 16, 2026https://github.com/getsentry/sentry-python/pull/5678#issuecomment-4068036036
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5678
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5678
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Mar 16, 2026https://github.com/getsentry/sentry-python/pull/5678#issuecomment-4068036951
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5678
Codecov Actionhttps://github.com/getsentry/codecov-action
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5678
https://github.com/ericapisani
ericapisanihttps://github.com/ericapisani
Mar 16, 2026 https://github.com/getsentry/sentry-python/pull/5678#ref-pullrequest-4070357739
feat(anthropic): Set gen_ai.response.finish_reasons on span #5663 https://github.com/getsentry/sentry-python/pull/5663
https://github.com/ericapisani
ericapisanihttps://github.com/ericapisani
March 16, 2026 14:51https://github.com/getsentry/sentry-python/pull/5678#event-23610658461
https://github.com/ericapisani
ericapisanihttps://github.com/ericapisani
code ownerhttps://github.com/getsentry/sentry-python/blob/6ea663f71d404bf7a261f31a22602ed85fb93544/.github/CODEOWNERS#L1
March 16, 2026 14:51https://github.com/getsentry/sentry-python/pull/5678#event-23610658778
https://github.com/ericapisani
Merge branch 'master' into py-2136-take-2https://github.com/getsentry/sentry-python/pull/5678/commits/c0283c3b26c5ae1533b3c1bf8cac144f8eef36f0
c0283c3https://github.com/getsentry/sentry-python/pull/5678/commits/c0283c3b26c5ae1533b3c1bf8cac144f8eef36f0
https://github.com/apps/cursor
cursorhttps://github.com/apps/cursor
Mar 16, 2026 https://github.com/getsentry/sentry-python/pull/5678#pullrequestreview-3954459348
View reviewed changes https://github.com/getsentry/sentry-python/pull/5678/files/c0283c3b26c5ae1533b3c1bf8cac144f8eef36f0
cursorhttps://github.com/apps/cursor
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5678
https://github.com/getsentry/sentry-python/pull/5678#pullrequestreview-3954459348
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://cursor.com/open?data=eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6ImJ1Z2JvdC12MiJ9.eyJ2ZXJzaW9uIjoxLCJ0eXBlIjoiQlVHQk9UX0ZJWF9BTExfSU5fQ1VSU09SIiwiZGF0YSI6eyJyZWRpc0tleSI6ImJ1Z2JvdC1tdWx0aTozNGZkYzZhNy0wOWFlLTQzYjUtOGM0NS04MGI2Mzc5YmE1ZjMiLCJlbmNyeXB0aW9uS2V5IjoiaE4yM1djTnE1Z3hzeUJ3cDdaMUNtR2hJaHNfQWFmTUtDMXNhQjZCZkppdyIsImJyYW5jaCI6InB5LTIxMzYtdGFrZS0yIiwicmVwb093bmVyIjoiZ2V0c2VudHJ5IiwicmVwb05hbWUiOiJzZW50cnktcHl0aG9uIn0sImlhdCI6MTc3MzY3Mjk4NiwiZXhwIjoxNzc2MjY0OTg2fQ.u9vA3DlcFqtGF-yd9Nt1KvoBAn5p_d1QfR__9Bl0O6VfiXCDVUX1S2ertGSn7vGS8KxyE12Xac3iLxB0UQF4FIbH-3yWTy8VmO55ykKsltq8y8OnrJ_Xk-Fi0pagdJIAq0VzwrKQy0k8DIP8KcXbe7KPjgTOo8TXqnv2t8UyC8Y9K3YWaT4Ktl2BZ6Ey1ZwkZwOcyVZyu3YhDKb3o7_DwxR6g_hcv6mcnIgth6MU_qPN6aQ8qK7DEwACf1jNgG3J8TkYqlNqEuPjpsiEmG3Oosz4NXzZ09yBWs3JHIxlq0gwfz886bJ1DI7VVIUDkU4XbG2RAad3Q6RJqLSz01XMVw
Bugbot Autofixhttps://cursor.com/docs/bugbot#autofix
https://github.com/getsentry/sentry-python/compare/py-2136-take-2...cursor/anthropic-test-default-integrations-200a?expand=1&title=Anthropic%20test%20default%20integrations&body=%23%23%23%20Description%0A%3C!--%20What%20changed%20and%20why%3F%20--%3E%0ARemoved%20%60default_integrations%3DFalse%60%20from%20%60sentry_init%60%20in%20%60test_streaming_create_message_async%60.%20This%20parameter%20was%20an%20accidental%20inclusion%2C%20making%20the%20test%20inconsistent%20with%20other%20analogous%20streaming%20tests%20and%20potentially%20masking%20integration-related%20issues%20by%20disabling%20default%20integrations.%0A%0A%23%23%23%23%20Issues%0A%3C!--%0A*%20resolves%3A%20%231234%0A*%20resolves%3A%20LIN-1234%0A--%3E%0A%0A%23%23%23%23%20Reminders%0A-%20Please%20add%20tests%20to%20validate%20your%20changes%2C%20and%20lint%20your%20code%20using%20%60tox%20-e%20linters%60.%0A-%20Add%20GH%20Issue%20ID%20_%26_%20Linear%20ID%20(if%20applicable)%0A-%20PR%20title%20should%20use%20%5Bconventional%20commit%5D(https%3A%2F%2Fdevelop.sentry.dev%2Fengineering-practices%2Fcommit-messages%2F%23type)%20style%20(%60feat%3A%60%2C%20%60fix%3A%60%2C%20%60ref%3A%60%2C%20%60meta%3A%60)%0A-%20For%20external%20contributors%3A%20%5BCONTRIBUTING.md%5D(https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fblob%2Fmaster%2FCONTRIBUTING.md)%2C%20%5BSentry%20SDK%20development%20docs%5D(https%3A%2F%2Fdevelop.sentry.dev%2Fsdk%2F)%2C%20%5BDiscord%20community%5D(https%3A%2F%2Fdiscord.gg%2FWw9hbqr)
f7619664d2https://github.com/getsentry/sentry-python/commit/f7619664d2
Cursor dashboardhttps://www.cursor.com/dashboard?tab=bugbot
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5678
tests/integrations/anthropic/test_anthropic.pyhttps://github.com/getsentry/sentry-python/pull/5678/files/c0283c3b26c5ae1533b3c1bf8cac144f8eef36f0#diff-3f015b03855e3bb647b04195c2a27a75ece9eb2c427a13c79a5ab81660a1365d
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5678
https://github.com/alexander-alderman-webb
alexander-alderman-webbhttps://github.com/alexander-alderman-webb
Mar 16, 2026 https://github.com/getsentry/sentry-python/pull/5678#pullrequestreview-3954637094
View reviewed changes https://github.com/getsentry/sentry-python/pull/5678/files/c0283c3b26c5ae1533b3c1bf8cac144f8eef36f0
sentry_sdk/integrations/anthropic.pyhttps://github.com/getsentry/sentry-python/pull/5678/files/c0283c3b26c5ae1533b3c1bf8cac144f8eef36f0#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5678
sentry_sdk/integrations/anthropic.pyhttps://github.com/getsentry/sentry-python/pull/5678/files/c0283c3b26c5ae1533b3c1bf8cac144f8eef36f0#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5678
ericapisanihttps://github.com/ericapisani
March 17, 2026 07:24https://github.com/getsentry/sentry-python/pull/5678#commits-pushed-e146224
https://github.com/ericapisani
https://github.com/claude
ref(anthropic): Simplify finish_reasons to single finish_reason inter…https://github.com/getsentry/sentry-python/pull/5678/commits/e146224f368123b39e766a865ec082fd1d9665ec
e146224https://github.com/getsentry/sentry-python/pull/5678/commits/e146224f368123b39e766a865ec082fd1d9665ec
https://github.com/ericapisani
Merge branch 'py-2136-take-2' of github.com:getsentry/sentry-python i…https://github.com/getsentry/sentry-python/pull/5678/commits/c5feb0c39195a9f3f2ca7788028513d18fc9509a
c5feb0chttps://github.com/getsentry/sentry-python/pull/5678/commits/c5feb0c39195a9f3f2ca7788028513d18fc9509a
https://github.com/alexander-alderman-webb
alexander-alderman-webbhttps://github.com/alexander-alderman-webb
Mar 17, 2026 https://github.com/getsentry/sentry-python/pull/5678#pullrequestreview-3958889595
View reviewed changes https://github.com/getsentry/sentry-python/pull/5678/files/c5feb0c39195a9f3f2ca7788028513d18fc9509a
alexander-alderman-webbhttps://github.com/alexander-alderman-webb
https://github.com/getsentry/sentry-python/pull/5678#pullrequestreview-3958889595
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5678
https://github.com/ericapisani
ericapisanihttps://github.com/ericapisani
b905cd3https://github.com/getsentry/sentry-python/commit/b905cd3297fd824fc0f7ce41c9d67a4e85b43fc2
Mar 17, 2026https://github.com/getsentry/sentry-python/pull/5678#event-23639885292
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5678
https://github.com/ericapisani
ericapisanihttps://github.com/ericapisani
March 17, 2026 11:12https://github.com/getsentry/sentry-python/pull/5678#event-23639886543
https://github.com/apps/sentry-release-bot
sentry-release-bothttps://github.com/apps/sentry-release-bot
Mar 17, 2026 https://github.com/getsentry/sentry-python/pull/5678#ref-issue-4088788354
publish: getsentry/sentry-python@2.55.0 getsentry/publish#7485 https://github.com/getsentry/publish/issues/7485
https://github.co/hiddenchars
https://github.com/getsentry/sentry-python/pull/{{ revealButtonHref }}
Sign up for freehttps://github.com/join?source=comment-repo
Sign in to commenthttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F5678
https://github.com/apps/cursor
cursor[bot] https://github.com/apps/cursor
https://github.com/getsentry/sentry-python/pull/5678/files/c0283c3b26c5ae1533b3c1bf8cac144f8eef36f0
https://github.com/alexander-alderman-webb
alexander-alderman-webb https://github.com/alexander-alderman-webb
https://github.com/getsentry/sentry-python/pull/5678/files/c5feb0c39195a9f3f2ca7788028513d18fc9509a
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5678
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5678
https://github.com/ericapisani
https://github.com/alexander-alderman-webb
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.