René's URL Explorer Experiment


Title: fix(anthropic): fix token accounting by shellmayr · Pull Request #5490 · getsentry/sentry-python · GitHub

Open Graph Title: fix(anthropic): fix token accounting by shellmayr · Pull Request #5490 · getsentry/sentry-python

X Title: fix(anthropic): fix token accounting by shellmayr · Pull Request #5490 · 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: Current token accounting is off This PR makes sure that the logic we expect for token sums is adhered to

X Description: Current token accounting is off This PR makes sure that the logic we expect for token sums is adhered to

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

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:7be3bd18-18f8-a04e-6c2f-4ff628c3ccad
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB568:14700E:3D2460:4F3279:6B00D3B9
html-safe-nonce02c0fc97aa998175c646cfb521681c37d1feb5345ea7190298dcb90bd9994e99
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNTY4OjE0NzAwRTozRDI0NjA6NEYzMjc5OjZCMDBEM0I5IiwidmlzaXRvcl9pZCI6IjM5MzA2NzAzMDYzNDcyNDI0MjUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacefcc8bd799efe8e2d2e8ae87fec07cda727d9659bc2faf54aaf73cb4bfffa4c4
hovercard-subject-tagpull_request:3307728668
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/5490/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/0236921e7c18e59c9c4fb0533729b1c84374f2bd52da747231a46fb517471cd7/getsentry/sentry-python/pull/5490
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/0236921e7c18e59c9c4fb0533729b1c84374f2bd52da747231a46fb517471cd7/getsentry/sentry-python/pull/5490
og:image:altCurrent token accounting is off This PR makes sure that the logic we expect for token sums is adhered to
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameshellmayr
hostnamegithub.com
expected-hostnamegithub.com
None85bbdfe2b6ba16e234513bc6ceff5d848ef8449820c900692a2b4e67061931e5
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
release4943239a6d2c591325dad6e5c313e1cafda877f6
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/getsentry/sentry-python/pull/5490#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F5490
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%2F5490
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/5490
Reloadhttps://github.com/getsentry/sentry-python/pull/5490
Reloadhttps://github.com/getsentry/sentry-python/pull/5490
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
shellmayrhttps://github.com/shellmayr
masterhttps://github.com/getsentry/sentry-python/tree/master
shellmayr/fix/anthropic-token-accountinghttps://github.com/getsentry/sentry-python/tree/shellmayr/fix/anthropic-token-accounting
Conversationhttps://github.com/getsentry/sentry-python/pull/5490
Commits4 (4)https://github.com/getsentry/sentry-python/pull/5490/commits
Checkshttps://github.com/getsentry/sentry-python/pull/5490/checks
Files changedhttps://github.com/getsentry/sentry-python/pull/5490/files
fix(anthropic): fix token accountinghttps://github.com/getsentry/sentry-python/pull/5490#top
shellmayrhttps://github.com/shellmayr
masterhttps://github.com/getsentry/sentry-python/tree/master
shellmayr/fix/anthropic-token-accountinghttps://github.com/getsentry/sentry-python/tree/shellmayr/fix/anthropic-token-accounting
https://github.com/shellmayr
shellmayrhttps://github.com/shellmayr
Feb 20, 2026https://github.com/getsentry/sentry-python/pull/5490#issue-3968357168
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5490
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5490
https://github.com/shellmayr
fix(anthropic): fix token accountinghttps://github.com/getsentry/sentry-python/pull/5490/commits/7168d1f2e735b4b2bbf2b2582c83833960723fef
7168d1fhttps://github.com/getsentry/sentry-python/pull/5490/commits/7168d1f2e735b4b2bbf2b2582c83833960723fef
https://github.com/obostjancic
obostjancichttps://github.com/obostjancic
Feb 20, 2026 https://github.com/getsentry/sentry-python/pull/5490#pullrequestreview-3831820512
View reviewed changes https://github.com/getsentry/sentry-python/pull/5490/files/7168d1f2e735b4b2bbf2b2582c83833960723fef
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Feb 20, 2026https://github.com/getsentry/sentry-python/pull/5490#issuecomment-3934034265
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5490
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5490
https://github.com/apps/github-actions
github-actionshttps://github.com/apps/github-actions
Feb 20, 2026https://github.com/getsentry/sentry-python/pull/5490#issuecomment-3934046110
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5490
Codecov Actionhttps://github.com/getsentry/codecov-action
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5490
shellmayrhttps://github.com/shellmayr
February 20, 2026 13:37https://github.com/getsentry/sentry-python/pull/5490#commits-pushed-120da10
https://github.com/shellmayr
formattinghttps://github.com/getsentry/sentry-python/pull/5490/commits/120da10d4e287f698b4970c1fac9ae13bf29e140
120da10https://github.com/getsentry/sentry-python/pull/5490/commits/120da10d4e287f698b4970c1fac9ae13bf29e140
https://github.com/shellmayr
adapt testshttps://github.com/getsentry/sentry-python/pull/5490/commits/6a5c43c4468a658dae2b8fd89bf2391614d888bf
6a5c43chttps://github.com/getsentry/sentry-python/pull/5490/commits/6a5c43c4468a658dae2b8fd89bf2391614d888bf
https://github.com/shellmayr
shellmayrhttps://github.com/shellmayr
February 20, 2026 12:39https://github.com/getsentry/sentry-python/pull/5490#event-22947743892
https://github.com/shellmayr
shellmayrhttps://github.com/shellmayr
code ownerhttps://github.com/getsentry/sentry-python/blob/28d9288a42d53f4c54a82866e8207a4c1a0a6b1c/.github/CODEOWNERS#L1
February 20, 2026 12:39https://github.com/getsentry/sentry-python/pull/5490#event-22947744184
https://github.com/alexander-alderman-webb
alexander-alderman-webbhttps://github.com/alexander-alderman-webb
Feb 20, 2026 https://github.com/getsentry/sentry-python/pull/5490#pullrequestreview-3831851530
View reviewed changes https://github.com/getsentry/sentry-python/pull/5490/files/6a5c43c4468a658dae2b8fd89bf2391614d888bf
sentry_sdk/integrations/anthropic.pyhttps://github.com/getsentry/sentry-python/pull/5490/files/6a5c43c4468a658dae2b8fd89bf2391614d888bf#diff-2fe73f39bab33821a7af1fccb0fd22b943b931b2cbf8d13aead2784b3cd21e05
alexander-alderman-webbhttps://github.com/alexander-alderman-webb
Feb 20, 2026https://github.com/getsentry/sentry-python/pull/5490#discussion_r2833030345
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5490
shellmayrhttps://github.com/shellmayr
Feb 20, 2026https://github.com/getsentry/sentry-python/pull/5490#discussion_r2833178820
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5490
https://github.com/alexander-alderman-webb
alexander-alderman-webbhttps://github.com/alexander-alderman-webb
Feb 20, 2026 https://github.com/getsentry/sentry-python/pull/5490#pullrequestreview-3832047674
View reviewed changes https://github.com/getsentry/sentry-python/pull/5490/files/6a5c43c4468a658dae2b8fd89bf2391614d888bf
alexander-alderman-webbhttps://github.com/alexander-alderman-webb
https://github.com/getsentry/sentry-python/pull/5490#pullrequestreview-3832047674
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
@shellmayrhttps://github.com/shellmayr
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5490
https://github.com/alexander-alderman-webb
alexander-alderman-webbhttps://github.com/alexander-alderman-webb
Feb 20, 2026 https://github.com/getsentry/sentry-python/pull/5490#pullrequestreview-3832077249
View reviewed changes https://github.com/getsentry/sentry-python/pull/5490/files/6a5c43c4468a658dae2b8fd89bf2391614d888bf
alexander-alderman-webbhttps://github.com/alexander-alderman-webb
https://github.com/getsentry/sentry-python/pull/5490#pullrequestreview-3832077249
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5490
https://github.com/shellmayr
adapt existing tests so they would have failedhttps://github.com/getsentry/sentry-python/pull/5490/commits/df065fb64419ff70c539c4e27a083599676de316
df065fbhttps://github.com/getsentry/sentry-python/pull/5490/commits/df065fb64419ff70c539c4e27a083599676de316
https://github.com/shellmayr
shellmayrhttps://github.com/shellmayr
Feb 20, 2026https://github.com/getsentry/sentry-python/pull/5490#issuecomment-3934802598
@alexander-alderman-webbhttps://github.com/alexander-alderman-webb
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5490
https://github.com/shellmayr
shellmayrhttps://github.com/shellmayr
aaf5c47https://github.com/getsentry/sentry-python/commit/aaf5c4793c9fd797c53f646f94deb6d34213465e
Feb 20, 2026https://github.com/getsentry/sentry-python/pull/5490#event-22950026712
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5490
https://github.com/shellmayr
shellmayrhttps://github.com/shellmayr
February 20, 2026 14:16https://github.com/getsentry/sentry-python/pull/5490#event-22950027941
https://github.com/apps/claude
claudehttps://github.com/apps/claude
claude-code-assisted https://github.com/getsentry/sentry-python/issues?q=state%3Aopen%20label%3Aclaude-code-assisted
Feb 21, 2026https://github.com/getsentry/sentry-python/pull/5490#event-22966050029
https://github.com/apps/sentry-release-bot
sentry-release-bothttps://github.com/apps/sentry-release-bot
Feb 23, 2026 https://github.com/getsentry/sentry-python/pull/5490#ref-issue-3977242651
publish: getsentry/sentry-python@2.52.0a6 getsentry/publish#7237 https://github.com/getsentry/publish/issues/7237
https://github.com/apps/sentry-release-bot
sentry-release-bothttps://github.com/apps/sentry-release-bot
Mar 2, 2026 https://github.com/getsentry/sentry-python/pull/5490#ref-issue-4011745618
publish: getsentry/sentry-python@2.54.0 getsentry/publish#7317 https://github.com/getsentry/publish/issues/7317
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%2F5490
https://github.com/obostjancic
obostjancic https://github.com/obostjancic
https://github.com/getsentry/sentry-python/pull/5490/files/7168d1f2e735b4b2bbf2b2582c83833960723fef
https://github.com/alexander-alderman-webb
alexander-alderman-webb https://github.com/alexander-alderman-webb
https://github.com/getsentry/sentry-python/pull/5490/files/6a5c43c4468a658dae2b8fd89bf2391614d888bf
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5490
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/5490
https://github.com/shellmayr
https://github.com/obostjancic
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.