René's URL Explorer Experiment


Title: Adding Opentelemetry to MCP SDK · Issue #421 · modelcontextprotocol/python-sdk · GitHub

Open Graph Title: Adding Opentelemetry to MCP SDK · Issue #421 · modelcontextprotocol/python-sdk

X Title: Adding Opentelemetry to MCP SDK · Issue #421 · modelcontextprotocol/python-sdk

Description: Is your feature request related to a problem? Please describe. I would like to see Opentelemetry traces and Metrics baked into SDK. E.g. Traces emitted on all Requests from client and server side of MCP SDK. Metrics for tool/prompt/resou...

Open Graph Description: Is your feature request related to a problem? Please describe. I would like to see Opentelemetry traces and Metrics baked into SDK. E.g. Traces emitted on all Requests from client and server side o...

X Description: Is your feature request related to a problem? Please describe. I would like to see Opentelemetry traces and Metrics baked into SDK. E.g. Traces emitted on all Requests from client and server side o...

Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/421

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Adding Opentelemetry to MCP SDK","articleBody":"**Is your feature request related to a problem? Please describe.**\n\nI would like to see Opentelemetry traces and Metrics baked into SDK. \nE.g. \n1. Traces emitted on all Requests from client and server side of MCP SDK. \n2. Metrics for tool/prompt/resource calls\n\n**Describe the solution you'd like**\n\nI am trying to use Opentelemetry sdk to add traces and metrics features.\n### Steps\n1. Creating session in client and server.\n2. Initialise tracer (Opentelemetry tracer instances) in `BaseSession` (`src/mcp/shared/session.py`).\n3. Binding trace context (`traceparent`) to `_meta` of `RequestParams.Meta` before sending request from client (`send_request` in `src/mcp/shared/session.py`)\n4. In server use the `traceparent` from received request to create new span with incoming span as parent span.\n\n**Describe alternatives you've considered**\n\nI tried to implement the same via traceloop. I was not able to get correct parent - child relationship between spans while doing so.\n\n**Additional context**\n\nI am able to achieve distributed tracing across my Agentic application and MCP server.\n\n\u003cimg width=\"1728\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/2165c7ca-6283-447b-9495-a9e9406fda4f\" /\u003e","author":{"url":"https://github.com/fali007","@type":"Person","name":"fali007"},"datePublished":"2025-04-03T12:02:53.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":19},"url":"https://github.com/421/python-sdk/issues/421"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:2683ffa8-588a-7033-3ddb-6c7e36ca8495
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDC92:2453EE:1DF19B2:2830D77:6A598A77
html-safe-nonce17d1ce13b6d80b3f654f5bb2fcf691c6662fb2c9662273033e6ae471e80342fb
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQzkyOjI0NTNFRToxREYxOUIyOjI4MzBENzc6NkE1OThBNzciLCJ2aXNpdG9yX2lkIjoiNzEzODY2MDg3MDk3MzM5MzUyNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac53825bd66cf534feb030e365c3d3ad29aa7544aa5b4beb92aeb4ed3b5e9e6387
hovercard-subject-tagissue:2969356115
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/modelcontextprotocol/python-sdk/421/issue_layout
twitter:imagehttps://opengraph.githubassets.com/129c8d686d571e94bf690878493db06de4fcd9add56a968c6ce33ce36f36ab87/modelcontextprotocol/python-sdk/issues/421
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/129c8d686d571e94bf690878493db06de4fcd9add56a968c6ce33ce36f36ab87/modelcontextprotocol/python-sdk/issues/421
og:image:altIs your feature request related to a problem? Please describe. I would like to see Opentelemetry traces and Metrics baked into SDK. E.g. Traces emitted on all Requests from client and server side o...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamefali007
hostnamegithub.com
expected-hostnamegithub.com
Nonea540949572872b935b393b36db38922db390ae71c859537d741b8f3eb7e545b5
turbo-cache-controlno-preview
go-importgithub.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git
octolytics-dimension-user_id182288589
octolytics-dimension-user_loginmodelcontextprotocol
octolytics-dimension-repository_id862584018
octolytics-dimension-repository_nwomodelcontextprotocol/python-sdk
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id862584018
octolytics-dimension-repository_network_root_nwomodelcontextprotocol/python-sdk
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
release624bb50a7497aa346bef8cc3743af408a9ea10ca
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/modelcontextprotocol/python-sdk/issues/421#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2F421
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
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
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://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
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fmodelcontextprotocol%2Fpython-sdk%2Fissues%2F421
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%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=modelcontextprotocol%2Fpython-sdk
Reloadhttps://github.com/modelcontextprotocol/python-sdk/issues/421
Reloadhttps://github.com/modelcontextprotocol/python-sdk/issues/421
Reloadhttps://github.com/modelcontextprotocol/python-sdk/issues/421
Please reload this pagehttps://github.com/modelcontextprotocol/python-sdk/issues/421
modelcontextprotocol https://github.com/modelcontextprotocol
python-sdkhttps://github.com/modelcontextprotocol/python-sdk
Notifications https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fpython-sdk
Fork 3.7k https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fpython-sdk
Star 23.6k https://github.com/login?return_to=%2Fmodelcontextprotocol%2Fpython-sdk
Code https://github.com/modelcontextprotocol/python-sdk
Issues 255 https://github.com/modelcontextprotocol/python-sdk/issues
Pull requests 301 https://github.com/modelcontextprotocol/python-sdk/pulls
Actions https://github.com/modelcontextprotocol/python-sdk/actions
Projects https://github.com/modelcontextprotocol/python-sdk/projects
Models https://github.com/modelcontextprotocol/python-sdk/models
Security and quality 6 https://github.com/modelcontextprotocol/python-sdk/security
Insights https://github.com/modelcontextprotocol/python-sdk/pulse
Code https://github.com/modelcontextprotocol/python-sdk
Issues https://github.com/modelcontextprotocol/python-sdk/issues
Pull requests https://github.com/modelcontextprotocol/python-sdk/pulls
Actions https://github.com/modelcontextprotocol/python-sdk/actions
Projects https://github.com/modelcontextprotocol/python-sdk/projects
Models https://github.com/modelcontextprotocol/python-sdk/models
Security and quality https://github.com/modelcontextprotocol/python-sdk/security
Insights https://github.com/modelcontextprotocol/python-sdk/pulse
Adding Opentelemetry to MCP SDKhttps://github.com/modelcontextprotocol/python-sdk/issues/421#top
https://github.com/Kludex
P3Nice to haves, rare edge caseshttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22P3%22
enhancementRequest for a new feature that's not currently supportedhttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22enhancement%22
ready for workEnough information for someone to start working onhttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22ready%20for%20work%22
v2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixeshttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22v2%22
https://github.com/fali007
fali007https://github.com/fali007
on Apr 3, 2025https://github.com/modelcontextprotocol/python-sdk/issues/421#issue-2969356115
https://private-user-images.githubusercontent.com/28902818/429943561-2165c7ca-6283-447b-9495-a9e9406fda4f.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODQyNTMzNDcsIm5iZiI6MTc4NDI1MzA0NywicGF0aCI6Ii8yODkwMjgxOC80Mjk5NDM1NjEtMjE2NWM3Y2EtNjI4My00NDdiLTk0OTUtYTllOTQwNmZkYTRmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MTclMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzE3VDAxNTA0N1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWM0MDUyOWM1N2U5MTY3NWRlOWIwYjE1MTBiYmQxYjgyYjEyNjU1OWI3Mjc3ZTgyZjA2MzlhMTM0OTM4NDllOGUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.at2xKF_8ch7tUmXs7AxftTucAKxvn4aUJJspyC2DCTo
Kludexhttps://github.com/Kludex
P3Nice to haves, rare edge caseshttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22P3%22
enhancementRequest for a new feature that's not currently supportedhttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22enhancement%22
ready for workEnough information for someone to start working onhttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22ready%20for%20work%22
v2Ideas, requests and plans for v2 of the SDK which will incorporate major changes and fixeshttps://github.com/modelcontextprotocol/python-sdk/issues?q=state%3Aopen%20label%3A%22v2%22
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.