Title: OpenTelemetry MCP client spans by aabmass · Pull Request #2132 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: OpenTelemetry MCP client spans by aabmass · Pull Request #2132 · modelcontextprotocol/python-sdk
X Title: OpenTelemetry MCP client spans by aabmass · Pull Request #2132 · modelcontextprotocol/python-sdk
Description: Part of #421 Depends on #2093 #1996 #2133 Motivation and Context Implements the minimal client side tracing portion as specified in https://github.com/open-telemetry/semantic-conventions/blob/v1.40.0/docs/gen-ai/mcp.md#client This only includes the "required" attributes for now. I threaded a new TracerProvider optional parameter into the MCP client and server sessions for DI purposes. That way users and test code can isolate the span creation. This also covers calls from server -> client like sampling and notifications. How Has This Been Tested? Added lots of new test cases showing spans and their parent child relationships. Breaking Changes No Types of changes Bug fix (non-breaking change which fixes an issue) New feature (non-breaking change which adds functionality) Breaking change (fix or feature that would cause existing functionality to change) Documentation update Checklist I have read the MCP Documentation My code follows the repository's style guidelines New and existing tests pass locally I have added appropriate error handling I have added or updated documentation as needed Additional context
Open Graph Description: Part of #421 Depends on #2093 #1996 #2133 Motivation and Context Implements the minimal client side tracing portion as specified in https://github.com/open-telemetry/semantic-conventions/blob...
X Description: Part of #421 Depends on #2093 #1996 #2133 Motivation and Context Implements the minimal client side tracing portion as specified in https://github.com/open-telemetry/semantic-conventions/blob...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/2132
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:9133e7d3-9293-a261-fa5b-97e4f900ccbe |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A4DA:37BBED:8B350A:C42153:6A6248F2 |
| html-safe-nonce | cb02828f969c8b3ba64bcd01cbb82bd53310367f402c7358c2ad9c77f3d5b9da |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNERBOjM3QkJFRDo4QjM1MEE6QzQyMTUzOjZBNjI0OEYyIiwidmlzaXRvcl9pZCI6IjU2OTg4Mjg1OTMxNDczMDAwODIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a957737a42dc963b2c0cf17dfee7a89f791168c313953f2f1d54d920f812e919 |
| hovercard-subject-tag | pull_request:3319099134 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/modelcontextprotocol/python-sdk/pull/2132/files |
| twitter:image | https://avatars.githubusercontent.com/u/1510004?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1510004?s=400&v=4 |
| og:image:alt | Part of #421 Depends on #2093 #1996 #2133 Motivation and Context Implements the minimal client side tracing portion as specified in https://github.com/open-telemetry/semantic-conventions/blob... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5d6ba65d73ecc4e3394fe318d2b2f98e6f8eed4878b5421b938e20d30bde267b |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2dadc56fd5989b76a8ae7304e3aa56d0b485e5dc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width