René's URL Explorer Experiment


Title: fix(openai-agents): also emit spans for MCP tool calls done by the LLM by constantinius · Pull Request #4875 · getsentry/sentry-python · GitHub

Open Graph Title: fix(openai-agents): also emit spans for MCP tool calls done by the LLM by constantinius · Pull Request #4875 · getsentry/sentry-python

X Title: fix(openai-agents): also emit spans for MCP tool calls done by the LLM by constantinius · Pull Request #4875 · 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: Description We cannot directly intercept MCP Tool calls, as they are done remotely by the LLM and not in the Agent itself. However, we see when such a tool call took place, so we can emit a zero-le...

X Description: Description We cannot directly intercept MCP Tool calls, as they are done remotely by the LLM and not in the Agent itself. However, we see when such a tool call took place, so we can emit a zero-le...

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

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:c20da6c9-130f-44aa-7f79-8a5c5913864e
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idB01C:85EA5:170E3B:1F4061:6B0082A0
html-safe-nonce5d576e4469ab0a22cb5ba545846f6c4568c5f5de9cd852eebfabab1b5860033c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCMDFDOjg1RUE1OjE3MEUzQjoxRjQwNjE6NkIwMDgyQTAiLCJ2aXNpdG9yX2lkIjoiODU4MTQxNDk4MDcwMjczMjk2MCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacb2d51d0d3af3643d91825b87c8bc9c160481cb6721874ce5ea2733b96237b974
hovercard-subject-tagpull_request:2873620344
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/4875/pull_request_layout
twitter:imagehttps://opengraph.githubassets.com/6b53fbf0175e8b945e4a0c5818031d74980b928b026b92ea7decd1ad93e07087/getsentry/sentry-python/pull/4875
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/6b53fbf0175e8b945e4a0c5818031d74980b928b026b92ea7decd1ad93e07087/getsentry/sentry-python/pull/4875
og:image:altDescription We cannot directly intercept MCP Tool calls, as they are done remotely by the LLM and not in the Agent itself. However, we see when such a tool call took place, so we can emit a zero-le...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameconstantinius
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/4875#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F4875
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%2F4875
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/4875
Reloadhttps://github.com/getsentry/sentry-python/pull/4875
Reloadhttps://github.com/getsentry/sentry-python/pull/4875
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
constantiniushttps://github.com/constantinius
masterhttps://github.com/getsentry/sentry-python/tree/master
constantinius/fix/openai-agents/mcp-execute-tool-spanshttps://github.com/getsentry/sentry-python/tree/constantinius/fix/openai-agents/mcp-execute-tool-spans
Conversationhttps://github.com/getsentry/sentry-python/pull/4875
Commits8 (8)https://github.com/getsentry/sentry-python/pull/4875/commits
Checkshttps://github.com/getsentry/sentry-python/pull/4875/checks
Files changedhttps://github.com/getsentry/sentry-python/pull/4875/files
fix(openai-agents): also emit spans for MCP tool calls done by the LLMhttps://github.com/getsentry/sentry-python/pull/4875#top
constantiniushttps://github.com/constantinius
masterhttps://github.com/getsentry/sentry-python/tree/master
constantinius/fix/openai-agents/mcp-execute-tool-spanshttps://github.com/getsentry/sentry-python/tree/constantinius/fix/openai-agents/mcp-execute-tool-spans
https://github.com/constantinius
constantiniushttps://github.com/constantinius
Sep 30, 2025https://github.com/getsentry/sentry-python/pull/4875#issue-3468378769
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4875
https://linear.app/getsentry/issue/TET-1192/openai-agents-hosted-mcp-calls-cannot-be-wrapped-in-an-execute-toolhttps://linear.app/getsentry/issue/TET-1192/openai-agents-hosted-mcp-calls-cannot-be-wrapped-in-an-execute-tool
Cursor Bugbothttps://cursor.com/dashboard?tab=bugbot
96df8c1https://github.com/getsentry/sentry-python/commit/96df8c1c08768d7f1d1369e66a9c4e7f6ebfc04c
herehttps://cursor.com/dashboard?tab=bugbot
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4875
https://github.com/constantinius
fix(openai-agents): also emit spans for MCP tool calls done by the LLMhttps://github.com/getsentry/sentry-python/pull/4875/commits/6cb7b43591471c26196e0ca9ef4099f39f431224
6cb7b43https://github.com/getsentry/sentry-python/pull/4875/commits/6cb7b43591471c26196e0ca9ef4099f39f431224
https://github.com/constantinius
constantiniushttps://github.com/constantinius
code ownerhttps://github.com/getsentry/sentry-python/blob/9b58d3155db85947cb951649f8651d3afdf559f9/.github/CODEOWNERS#L1
September 30, 2025 09:20https://github.com/getsentry/sentry-python/pull/4875#event-20003896107
https://github.com/apps/linear
linearhttps://github.com/apps/linear
Sep 30, 2025https://github.com/getsentry/sentry-python/pull/4875#issuecomment-3350893296
TET-1192 OpenAI Agents: hosted MCP calls cannot be wrapped in an `execute_tool` span but used tools by the LLM can be shownhttps://linear.app/getsentry/issue/TET-1192/openai-agents-hosted-mcp-calls-cannot-be-wrapped-in-an-execute-tool
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4875
https://github.com/apps/codecov
codecovhttps://github.com/apps/codecov
Sep 30, 2025https://github.com/getsentry/sentry-python/pull/4875#issuecomment-3350902828
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4875
Test Analytics Dashboardhttps://app.codecov.io/gh/getsentry/sentry-python/tests/constantinius%2Ffix%2Fopenai-agents%2Fmcp-execute-tool-spans
Take this short surveyhttps://forms.gle/22i53Qa1CySZjA6c7
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4875
https://github.com/apps/cursor
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F4875
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4875
https://github.com/constantinius
fix(openai-agents): improve span handling in MCP tool executionhttps://github.com/getsentry/sentry-python/pull/4875/commits/96df8c1c08768d7f1d1369e66a9c4e7f6ebfc04c
96df8c1https://github.com/getsentry/sentry-python/pull/4875/commits/96df8c1c08768d7f1d1369e66a9c4e7f6ebfc04c
https://github.com/apps/cursor
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F4875
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4875
https://github.com/sentrivana
sentrivanahttps://github.com/sentrivana
Oct 1, 2025 https://github.com/getsentry/sentry-python/pull/4875#pullrequestreview-3287938418
View reviewed changes https://github.com/getsentry/sentry-python/pull/4875/files/96df8c1c08768d7f1d1369e66a9c4e7f6ebfc04c
sentrivanahttps://github.com/sentrivana
https://github.com/getsentry/sentry-python/pull/4875#pullrequestreview-3287938418
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4875
sentry_sdk/integrations/openai_agents/utils.pyhttps://github.com/getsentry/sentry-python/pull/4875/files/96df8c1c08768d7f1d1369e66a9c4e7f6ebfc04c#diff-17339ab388e25807056ef77733200c6040af786fcf6cbe379cb58b2049cde38c
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4875
https://github.com/constantinius
fix(openai-agents): correct span data assignment for tool execution o…https://github.com/getsentry/sentry-python/pull/4875/commits/99b1ddb643c217449a2eaa8f5e11cd6ee474b45d
99b1ddbhttps://github.com/getsentry/sentry-python/pull/4875/commits/99b1ddb643c217449a2eaa8f5e11cd6ee474b45d
https://github.com/constantinius
constantiniushttps://github.com/constantinius
sentrivanahttps://github.com/sentrivana
October 1, 2025 09:18https://github.com/getsentry/sentry-python/pull/4875#event-20029380605
https://github.com/apps/cursor
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F4875
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4875
constantiniushttps://github.com/constantinius
October 1, 2025 11:41https://github.com/getsentry/sentry-python/pull/4875#commits-pushed-b219cd8
https://github.com/constantinius
fix(openai-agents): refactor span data assignment to use set_data_nor…https://github.com/getsentry/sentry-python/pull/4875/commits/b219cd8ae4c52c5eff6793c0efa6846a3419bd31
b219cd8https://github.com/getsentry/sentry-python/pull/4875/commits/b219cd8ae4c52c5eff6793c0efa6846a3419bd31
https://github.com/constantinius
test(integrations): add tests for MCP Tool call spanshttps://github.com/getsentry/sentry-python/pull/4875/commits/3012e3a8f75b5dd395663b85556daf7d1ea01f41
3012e3ahttps://github.com/getsentry/sentry-python/pull/4875/commits/3012e3a8f75b5dd395663b85556daf7d1ea01f41
https://github.com/apps/cursor
Sign in to viewhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgetsentry%2Fsentry-python%2Fpull%2F4875
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4875
constantiniushttps://github.com/constantinius
October 2, 2025 13:01https://github.com/getsentry/sentry-python/pull/4875#commits-pushed-94a3695
https://github.com/constantinius
test(openai-agents): fix some testshttps://github.com/getsentry/sentry-python/pull/4875/commits/94a369519dfd075009c0cb59fe17e3849b9e57a8
94a3695https://github.com/getsentry/sentry-python/pull/4875/commits/94a369519dfd075009c0cb59fe17e3849b9e57a8
https://github.com/constantinius
test(openai-agents): fix testshttps://github.com/getsentry/sentry-python/pull/4875/commits/58027509fd39fe7838e6da78ccd8a4baf20a0956
5802750https://github.com/getsentry/sentry-python/pull/4875/commits/58027509fd39fe7838e6da78ccd8a4baf20a0956
https://github.com/sentrivana
sentrivanahttps://github.com/sentrivana
Oct 2, 2025 https://github.com/getsentry/sentry-python/pull/4875#pullrequestreview-3294900365
View reviewed changes https://github.com/getsentry/sentry-python/pull/4875/files/58027509fd39fe7838e6da78ccd8a4baf20a0956
sentrivanahttps://github.com/sentrivana
https://github.com/getsentry/sentry-python/pull/4875#pullrequestreview-3294900365
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4875
tests/integrations/openai_agents/test_openai_agents.pyhttps://github.com/getsentry/sentry-python/pull/4875/files/58027509fd39fe7838e6da78ccd8a4baf20a0956#diff-3994ad06a0ebc1f49b0088b4c7210c4804d91e21c4886e98cf02b0da097dc06f
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4875
https://github.com/constantinius
https://github.com/sentrivana
Update tests/integrations/openai_agents/test_openai_agents.pyhttps://github.com/getsentry/sentry-python/pull/4875/commits/c485fde4732d4418679221cabdf663b12b1306cb
c485fdehttps://github.com/getsentry/sentry-python/pull/4875/commits/c485fde4732d4418679221cabdf663b12b1306cb
https://github.com/constantinius
constantiniushttps://github.com/constantinius
October 2, 2025 14:25https://github.com/getsentry/sentry-python/pull/4875#event-20061242307
https://github.com/constantinius
constantiniushttps://github.com/constantinius
2e4457chttps://github.com/getsentry/sentry-python/commit/2e4457c8da5112e095362899ef8464bc304cc54a
Oct 2, 2025https://github.com/getsentry/sentry-python/pull/4875#event-20061453427
https://github.com/constantinius
constantiniushttps://github.com/constantinius
October 2, 2025 14:35https://github.com/getsentry/sentry-python/pull/4875#event-20061453787
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%2F4875
https://github.com/apps/cursor
cursor[bot] https://github.com/apps/cursor
https://github.com/getsentry/sentry-python/pull/4875/files/3012e3a8f75b5dd395663b85556daf7d1ea01f41
https://github.com/sentrivana
sentrivana https://github.com/sentrivana
https://github.com/getsentry/sentry-python/pull/4875/files/58027509fd39fe7838e6da78ccd8a4baf20a0956
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4875
Please reload this pagehttps://github.com/getsentry/sentry-python/pull/4875
https://github.com/constantinius
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.