René's URL Explorer Experiment


Title: fix(ai): add mapping for gen_ai message roles by shellmayr · Pull Request #4884 · getsentry/sentry-python · GitHub

Open Graph Title: fix(ai): add mapping for gen_ai message roles by shellmayr · Pull Request #4884 · getsentry/sentry-python

X Title: fix(ai): add mapping for gen_ai message roles by shellmayr · Pull Request #4884 · 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 a constant that contains the allowed message roles according to OTEL and a mapping Apply that mapping to all gen_ai integrations We will track input roles that do not conform to expectations vi...

X Description: Add a constant that contains the allowed message roles according to OTEL and a mapping Apply that mapping to all gen_ai integrations We will track input roles that do not conform to expectations vi...

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

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:676ea661-bf89-f929-13a7-a8ff783ab74a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9186:22A7FA:1855C9:20A12F:6B0082BE
html-safe-nonce2270c49b89003192a180c5779f18687b78abe9449f5bed2336165776b0d61660
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTg2OjIyQTdGQToxODU1Qzk6MjBBMTJGOjZCMDA4MkJFIiwidmlzaXRvcl9pZCI6IjU4Njk1OTIwNzc2MjAyNDkyNzgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac2f75506f90f9b8cab8f21f2e9c612d3af00e3e129841080f8392423484855ce7
hovercard-subject-tagpull_request:2884827724
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/4884/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/edb12831dd18e2ca64253de1fdd1d53c53ac228ea7700e517bab1c91e6647903/getsentry/sentry-python/pull/4884
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/edb12831dd18e2ca64253de1fdd1d53c53ac228ea7700e517bab1c91e6647903/getsentry/sentry-python/pull/4884
og:image:altAdd a constant that contains the allowed message roles according to OTEL and a mapping Apply that mapping to all gen_ai integrations We will track input roles that do not conform to expectations vi...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameshellmayr
hostnamegithub.com
expected-hostnamegithub.com
None82c186f13e104004ab7bdb779f3195e59dd38bfde531aaa74b76470fc2462b83
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
released1bc2aa1939001689f5ce935982c10a6138f745c
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-namepull-requests

Links:

Skip to contenthttps://github.com/getsentry/sentry-python/pull/4884#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F4884
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%2F4884
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/4884
Reloadhttps://github.com/getsentry/sentry-python/pull/4884
Reloadhttps://github.com/getsentry/sentry-python/pull/4884
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 requests41 (41)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/gen_ai-map-message-roleshttps://github.com/getsentry/sentry-python/tree/shellmayr/fix/gen_ai-map-message-roles
Conversationhttps://github.com/getsentry/sentry-python/pull/4884
Commits15 (15)https://github.com/getsentry/sentry-python/pull/4884/commits
Checkshttps://github.com/getsentry/sentry-python/pull/4884/checks
Files changedhttps://github.com/getsentry/sentry-python/pull/4884/files
fix(ai): add mapping for gen_ai message roleshttps://github.com/getsentry/sentry-python/pull/4884#top
shellmayrhttps://github.com/shellmayr
masterhttps://github.com/getsentry/sentry-python/tree/master
shellmayr/fix/gen_ai-map-message-roleshttps://github.com/getsentry/sentry-python/tree/shellmayr/fix/gen_ai-map-message-roles
https://github.com/shellmayr
shellmayrhttps://github.com/shellmayr
Oct 3, 2025https://github.com/getsentry/sentry-python/pull/4884#issue-3480958980
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4884
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4884
https://github.com/shellmayr
fix(ai): add mapping for gen_ai message roleshttps://github.com/getsentry/sentry-python/pull/4884/commits/ae8e359d9585f197bf010fa276e82c63fc34a296
ae8e359https://github.com/getsentry/sentry-python/pull/4884/commits/ae8e359d9585f197bf010fa276e82c63fc34a296
https://github.com/apps/linear
linearhttps://github.com/apps/linear
Oct 3, 2025https://github.com/getsentry/sentry-python/pull/4884#issuecomment-3365539713
TET-1077 Map message roles from different SDKs in Agent Monitoringhttps://linear.app/getsentry/issue/TET-1077/map-message-roles-from-different-sdks-in-agent-monitoring
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4884
https://github.com/apps/codecov
codecovhttps://github.com/apps/codecov
Oct 3, 2025https://github.com/getsentry/sentry-python/pull/4884#issuecomment-3365550316
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4884
Test Analytics Dashboardhttps://app.codecov.io/gh/getsentry/sentry-python/tests/shellmayr%2Ffix%2Fgen_ai-map-message-roles
Take this short surveyhttps://forms.gle/22i53Qa1CySZjA6c7
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4884
shellmayrhttps://github.com/shellmayr
October 7, 2025 10:56https://github.com/getsentry/sentry-python/pull/4884#commits-pushed-f680921
https://github.com/shellmayr
map openai correctlyhttps://github.com/getsentry/sentry-python/pull/4884/commits/f680921002c14382131e07b675a3f23d02c7aeed
f680921https://github.com/getsentry/sentry-python/pull/4884/commits/f680921002c14382131e07b675a3f23d02c7aeed
https://github.com/shellmayr
map openaihttps://github.com/getsentry/sentry-python/pull/4884/commits/906da3d622f117a4ed13bc66eb816c2dec40ac54
906da3dhttps://github.com/getsentry/sentry-python/pull/4884/commits/906da3d622f117a4ed13bc66eb816c2dec40ac54
https://github.com/shellmayr
don't try to convert messages that don't have a rolehttps://github.com/getsentry/sentry-python/pull/4884/commits/0081cf87733b41145b9c74177aef25d2c2bd0904
0081cf8https://github.com/getsentry/sentry-python/pull/4884/commits/0081cf87733b41145b9c74177aef25d2c2bd0904
https://github.com/shellmayr
constanthttps://github.com/getsentry/sentry-python/pull/4884/commits/e7bf10545980348180eeeae4e54a89b011749037
e7bf105https://github.com/getsentry/sentry-python/pull/4884/commits/e7bf10545980348180eeeae4e54a89b011749037
https://github.com/shellmayr
remove superfluous comments and use the constants everywherehttps://github.com/getsentry/sentry-python/pull/4884/commits/ab4dec0145957180badbe716f88fe8224575ae41
ab4dec0https://github.com/getsentry/sentry-python/pull/4884/commits/ab4dec0145957180badbe716f88fe8224575ae41
https://github.com/shellmayr
fix tool call role namehttps://github.com/getsentry/sentry-python/pull/4884/commits/0d7102eb15501ce1c12704b6f18576ca1c62e13e
0d7102ehttps://github.com/getsentry/sentry-python/pull/4884/commits/0d7102eb15501ce1c12704b6f18576ca1c62e13e
https://github.com/shellmayr
shellmayrhttps://github.com/shellmayr
October 7, 2025 12:07https://github.com/getsentry/sentry-python/pull/4884#event-20139344966
https://github.com/shellmayr
shellmayrhttps://github.com/shellmayr
code ownerhttps://github.com/getsentry/sentry-python/blob/87f8f390eea0ca435a9a6e53747bcf5f844acbd1/.github/CODEOWNERS#L1
October 7, 2025 12:07https://github.com/getsentry/sentry-python/pull/4884#event-20139345077
https://github.com/apps/cursor
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F4884
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4884
https://github.com/shellmayr
fix missing toolhttps://github.com/getsentry/sentry-python/pull/4884/commits/8810ee649c700cf9089db69f0b7af988ffc09398
8810ee6https://github.com/getsentry/sentry-python/pull/4884/commits/8810ee649c700cf9089db69f0b7af988ffc09398
https://github.com/apps/cursor
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F4884
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4884
https://github.com/sentrivana
sentrivanahttps://github.com/sentrivana
Oct 7, 2025 https://github.com/getsentry/sentry-python/pull/4884#pullrequestreview-3309852593
View reviewed changes https://github.com/getsentry/sentry-python/pull/4884/files/96b3ad699977fec9ee4934793a3930867ea5d9a0
sentrivanahttps://github.com/sentrivana
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4884
https://github.com/getsentry/sentry-python/pull/4884#pullrequestreview-3309852593
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4884
tests/integrations/anthropic/test_anthropic.pyhttps://github.com/getsentry/sentry-python/pull/4884/files/8810ee649c700cf9089db69f0b7af988ffc09398#diff-3f015b03855e3bb647b04195c2a27a75ece9eb2c427a13c79a5ab81660a1365d
sentrivanahttps://github.com/sentrivana
Oct 7, 2025https://github.com/getsentry/sentry-python/pull/4884#discussion_r2410437083
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4884
shellmayrhttps://github.com/shellmayr
Oct 7, 2025https://github.com/getsentry/sentry-python/pull/4884#discussion_r2410450386
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4884
sentrivanahttps://github.com/sentrivana
October 7, 2025 14:23https://github.com/getsentry/sentry-python/pull/4884#commits-pushed-96b3ad6
https://github.com/sentrivana
Merge branch 'master' into shellmayr/fix/gen_ai-map-message-roleshttps://github.com/getsentry/sentry-python/pull/4884/commits/96b3ad699977fec9ee4934793a3930867ea5d9a0
96b3ad6https://github.com/getsentry/sentry-python/pull/4884/commits/96b3ad699977fec9ee4934793a3930867ea5d9a0
https://github.com/shellmayr
move import uphttps://github.com/getsentry/sentry-python/pull/4884/commits/16342b109248fa26e73b7877fe73a12852ad285e
16342b1https://github.com/getsentry/sentry-python/pull/4884/commits/16342b109248fa26e73b7877fe73a12852ad285e
https://github.com/shellmayr
add to langchainhttps://github.com/getsentry/sentry-python/pull/4884/commits/32862926352c456b4323850dd9b83514132be661
3286292https://github.com/getsentry/sentry-python/pull/4884/commits/32862926352c456b4323850dd9b83514132be661
https://github.com/apps/cursor
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F4884
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4884
shellmayrhttps://github.com/shellmayr
October 7, 2025 16:18https://github.com/getsentry/sentry-python/pull/4884#commits-pushed-eb8c05d
https://github.com/shellmayr
add langchain testhttps://github.com/getsentry/sentry-python/pull/4884/commits/eb8c05dfdb013192f03406d75c7cd9f5b0ecb9d5
eb8c05dhttps://github.com/getsentry/sentry-python/pull/4884/commits/eb8c05dfdb013192f03406d75c7cd9f5b0ecb9d5
https://github.com/shellmayr
Merge branch 'master' into shellmayr/fix/gen_ai-map-message-roleshttps://github.com/getsentry/sentry-python/pull/4884/commits/0473c7fd86c48d069ba2cb77c7d4658a6543ee29
0473c7fhttps://github.com/getsentry/sentry-python/pull/4884/commits/0473c7fd86c48d069ba2cb77c7d4658a6543ee29
https://github.com/shellmayr
fix langchain on_llm_starthttps://github.com/getsentry/sentry-python/pull/4884/commits/526acf3836093bdbed772fea26300d59cbd17c0f
526acf3https://github.com/getsentry/sentry-python/pull/4884/commits/526acf3836093bdbed772fea26300d59cbd17c0f
https://github.com/apps/cursor
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F4884
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4884
https://github.com/shellmayr
fix naming of tool call consthttps://github.com/getsentry/sentry-python/pull/4884/commits/8be69b2facead64f49b6128f8c7e5f59da93ace8
8be69b2https://github.com/getsentry/sentry-python/pull/4884/commits/8be69b2facead64f49b6128f8c7e5f59da93ace8
https://github.com/sentrivana
sentrivanahttps://github.com/sentrivana
Oct 8, 2025 https://github.com/getsentry/sentry-python/pull/4884#pullrequestreview-3313963830
View reviewed changes https://github.com/getsentry/sentry-python/pull/4884/files/8be69b2facead64f49b6128f8c7e5f59da93ace8
https://github.com/shellmayr
shellmayrhttps://github.com/shellmayr
b1dd2dchttps://github.com/getsentry/sentry-python/commit/b1dd2dcf3b63c73ab91f25ca217a28cf3ea7f6e9
Oct 8, 2025https://github.com/getsentry/sentry-python/pull/4884#event-20160810341
https://github.com/shellmayr
shellmayrhttps://github.com/shellmayr
October 8, 2025 10:41https://github.com/getsentry/sentry-python/pull/4884#event-20160810967
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%2F4884
https://github.com/apps/cursor
cursor[bot] https://github.com/apps/cursor
https://github.com/getsentry/sentry-python/pull/4884/files/526acf3836093bdbed772fea26300d59cbd17c0f
https://github.com/sentrivana
sentrivana https://github.com/sentrivana
https://github.com/getsentry/sentry-python/pull/4884/files/8be69b2facead64f49b6128f8c7e5f59da93ace8
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4884
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4884
https://github.com/shellmayr
https://github.com/sentrivana
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.