Title: OpenTelemetry inject trace context propagation in `_meta` by aabmass · Pull Request #2093 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: OpenTelemetry inject trace context propagation in `_meta` by aabmass · Pull Request #2093 · modelcontextprotocol/python-sdk
X Title: OpenTelemetry inject trace context propagation in `_meta` by aabmass · Pull Request #2093 · modelcontextprotocol/python-sdk
Description: Part of #421 Motivation and Context This implements OpenTelemetry context forward propagation (if available) through _meta, as specified in SEP414 modelcontextprotocol/modelcontextprotocol#414 OpenTelemetry semantic conventions https://github.com/open-telemetry/semantic-conventions/blob/v1.39.0/docs/gen-ai/mcp.md MCP C# SDK has a similar implementation: https://github.com/modelcontextprotocol/csharp-sdk/blob/v0.8.0-preview.1/src/ModelContextProtocol.Core/Diagnostics.cs#L64. This is working for normal client to server calls, and for server calls back to the client like MCP Sampling. How Has This Been Tested? Added new test cases 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 Extracting the context from _meta into OTel context in the receiving side is the next PR (#2133), but depends on merging #1996
Open Graph Description: Part of #421 Motivation and Context This implements OpenTelemetry context forward propagation (if available) through _meta, as specified in SEP414 modelcontextprotocol/modelcontextprotocol#414 Op...
X Description: Part of #421 Motivation and Context This implements OpenTelemetry context forward propagation (if available) through _meta, as specified in SEP414 modelcontextprotocol/modelcontextprotocol#414 Op...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/2093
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:e5dff9af-3389-9e77-84c9-de788c5fcee9 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DB22:277C68:270190:376BC8:6A621D0B |
| html-safe-nonce | 08f6912ea95602c297bfc3b5e313ff6c121e2c12363703d6791dd8e29c36b1ee |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQjIyOjI3N0M2ODoyNzAxOTA6Mzc2QkM4OjZBNjIxRDBCIiwidmlzaXRvcl9pZCI6IjI5MzU1Mzg4Nzc5MTM1MDUwMzUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 190d2a718fa543a6c988de6b74aa4f31fe3f2a7fac0e307985a7e495e2929e5e |
| hovercard-subject-tag | pull_request:3300388783 |
| 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/2093/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 Motivation and Context This implements OpenTelemetry context forward propagation (if available) through _meta, as specified in SEP414 modelcontextprotocol/modelcontextprotocol#414 Op... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | be68eaf9abf2a202afbd94047d7200fb88b7edb0338f533bf171bbb1a69fab4e |
| 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 | 3d00b04c8874615454dfbdb32a7d2ca4db66d3f4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width