SOLFIND
Web Lens
Portal home

SEP-414: Document OpenTelemetry Trace Context Propagation Conventions - Model Context Protocol

https://modelcontextprotocol.org/seps/414-request-meta • 322 KB fetched
Open original page


SEP-414: Document OpenTelemetry Trace Context Propagation Conventions - Model Context Protocol Documentation Index Fetch the complete documentation index at: /llms.txt Use this file to discover all available pages before exploring further. Skip to main content Model Context Protocol home page Search... ⌘ K Ask Assistant ⌘ I * Blog * GitHub Search... Navigation Final SEP-414: Document OpenTelemetry Trace Context Propagation Conventions Documentation Specification Extensions Registry SEPs Community * SEP Index Final * SEP-414: Document OpenTelemetry Trace Context Pr… * SEP-932: Model Context Protocol Governance * SEP-973: Expose additional metadata for Implemen… * SEP-985: Align OAuth 2.0 Protected Resource Meta… * SEP-986: Specify Format for Tool Names * SEP-990: Enable enterprise IdP policy controls d… * SEP-991: Enable URL-based Client Registration us… * SEP-994: Shared Communication Practices/Guidelin… * SEP-1024: MCP Client Security Requirements for Lo… * SEP-1034: Support default values for all primitiv… * SEP-1036: URL Mode Elicitation for secure out-of-… * SEP-1046: Support OAuth client credentials flow i… * SEP-1302: Formalize Working Groups and Interest G… * SEP-1303: Input Validation Errors as Tool Executi… * SEP-1319: Decouple Request Payload from RPC Metho… * SEP-1330: Elicitation Enum Schema Improvements an… * SEP-1577: Sampling With Tools * SEP-1613: Establish JSON Schema 2020-12 as Defaul… * SEP-1686: Tasks * SEP-1699: Support SSE polling via server-side dis… * SEP-1730: SDKs Tiering System * SEP-1850: PR-Based SEP Workflow * SEP-1865: MCP Apps - Interactive User Interfaces… * SEP-2085: Governance Succession and Amendment Pro… * SEP-2106: Tools `inputSchema` & `outputSchema` Co… * SEP-2133: Extensions * SEP-2148: MCP Contributor Ladder * SEP-2149: MCP Group Governance and Charter Templa… * SEP-2164: Standardize Resource Not Found Error Co… * SEP-2207: OIDC-Flavored Refresh Token Guidance * SEP-2243: HTTP Header Standardization for Streama… * SEP-2260: Require Server requests to be associate… * SEP-2322: Multi Round-Trip Requests * SEP-2468: Recommend Issuer (iss) Parameter in MCP… * SEP-2484: Require Conformance Tests for Standards… * SEP-2549: TTL for List Results * SEP-2567: Sessionless MCP via Explicit State Hand… * SEP-2575: Make MCP Stateless * SEP-2577: Deprecate Roots, Sampling, and Logging * SEP-2596: Specification Feature Lifecycle and Dep… * SEP-2663: Tasks Extension On this page * Abstract * Specification * Non-normative example * Rationale * Why document this? * Related SEPs * Backward Compatibility * Security Implications * Reference Implementation Final SEP-414: Document OpenTelemetry Trace Context Propagation Conventions Copy page Copy page Document OpenTelemetry Trace Context Propagation Conventions Copy page Copy page Final Standards Track This SEP has reached Final status and is preserved as a historical record of the design as accepted. Changes made to the protocol after finalization are not reflected here. Refer to the current specification and its changelog for authoritative requirements. Field Value SEP 414 Title Document OpenTelemetry Trace Context Propagation Conventions Status Final Type Standards Track Created 2025-04-25 Author(s) Adrian Cole ( @codefromthecrypt ) Sponsor Marcelo Trylesinski ( @Kludex ) PR #414 ​ Abstract This SEP documents conventions for OpenTelemetry (OTel) trace context propagation in MCP. OTel semantic conventions for MCP specify using _meta as the carrier for W3C Trace Context keys. This is already in practice in the C# SDK and other implementations. This specification documents an exception to the DNS prefixing convention for keys in _meta . This enables interoperability across existing and new implementations and serves as a foundation for related SEPs (such as SEP-2028 ). ​ Specification This SEP adds documentation to the MCP specification, noting: * When OTel trace context is propagated via _meta , the keys traceparent , tracestate , and baggage follow W3C Trace Context and W3C Baggage value formats. * A non-normative example showing trace context in _meta . * A note clarifying why this an exception to DNS prefixing keys in _meta : to remain compatible with existing implementations and the OpenTelemetry semantic conventions. See agentclientprotocol/agent-client-protocol#297 for equivalent documentation changes in ACP. ​ Non-normative example { "jsonrpc" : "2.0" , "id" : 2 , "method" : "tools/call" , "params" : { "name" : "get_weather" , "arguments" : { "location" : "New York" }, "_meta" : { "traceparent" : "00-0af7651916cd43dd8448eb211c80319c-00f067aa0ba902b7-01" } } } ​ Rationale ​ Why document this? This is currently documented elsewhere, but not as an MCP specification. Doing so ensures that SEPs depending on this pattern can complete, as well as other SDKs in and outside the MCP org can as well, such as Logfire and ToolHive . If we don’t document this shared concern, differing interpretations could materialize, such as namespacing traceparent like io.modelcontextprotocol.traceparent , which will break traces and log correlation. ​ Related SEPs * SEP-1788 - reserved keys in _meta ; should be updated with traceparent , tracestate , and baggage when this SEP is implemented * SEP-2028 - builds on this SEP for forwarding _meta values to HTTP headers ​ Backward Compatibility This SEP documents existing conventions and is backward compatible. ​ Security Implications Trace context in _meta may include correlation IDs. Implementations should follow existing data-handling guidance appropriate to their environment. ​ Reference Implementation Existing implementations using this pattern: * C# SDK instrumentation * Python SDK instrumentation * OpenInference MCP instrumentation (Python) * OpenInference MCP instrumentation (TypeScript) * Envoy AI Gateway * Logfire * ToolHive Was this page helpful? Yes No SEP Index SEP-932: Model Context Protocol Governance github Assistant Responses are generated using AI and may contain mistakes.

Links found on this page

  1. /llms.txt [direct]
  2. Skip to main content [direct]
  3. Model Context Protocol home page [direct]
  4. Blog [direct]
  5. GitHub [direct]
  6. Documentation [direct]
  7. Specification [direct]
  8. Extensions [direct]
  9. Registry [direct]
  10. SEPs [direct]
  11. Community [direct]
  12. SEP-932: Model Context Protocol Governance [direct]
  13. SEP-973: Expose additional metadata for Implemen… [direct]
  14. SEP-985: Align OAuth 2.0 Protected Resource Meta… [direct]
  15. SEP-986: Specify Format for Tool Names [direct]
  16. SEP-990: Enable enterprise IdP policy controls d… [direct]
  17. SEP-991: Enable URL-based Client Registration us… [direct]
  18. SEP-994: Shared Communication Practices/Guidelin… [direct]
  19. SEP-1024: MCP Client Security Requirements for Lo… [direct]
  20. SEP-1034: Support default values for all primitiv… [direct]
  21. SEP-1036: URL Mode Elicitation for secure out-of-… [direct]
  22. SEP-1046: Support OAuth client credentials flow i… [direct]
  23. SEP-1302: Formalize Working Groups and Interest G… [direct]
  24. SEP-1303: Input Validation Errors as Tool Executi… [direct]
  25. SEP-1319: Decouple Request Payload from RPC Metho… [direct]
  26. SEP-1330: Elicitation Enum Schema Improvements an… [direct]
  27. SEP-1577: Sampling With Tools [direct]
  28. SEP-1613: Establish JSON Schema 2020-12 as Defaul… [direct]
  29. SEP-1686: Tasks [direct]
  30. SEP-1699: Support SSE polling via server-side dis… [direct]
  31. SEP-1730: SDKs Tiering System [direct]
  32. SEP-1850: PR-Based SEP Workflow [direct]
  33. SEP-1865: MCP Apps - Interactive User Interfaces… [direct]
  34. SEP-2085: Governance Succession and Amendment Pro… [direct]
  35. SEP-2106: Tools `inputSchema` & `outputSchema` Co… [direct]
  36. SEP-2133: Extensions [direct]
  37. SEP-2148: MCP Contributor Ladder [direct]
  38. SEP-2149: MCP Group Governance and Charter Templa… [direct]
  39. SEP-2164: Standardize Resource Not Found Error Co… [direct]
  40. SEP-2207: OIDC-Flavored Refresh Token Guidance [direct]
  41. SEP-2243: HTTP Header Standardization for Streama… [direct]
  42. SEP-2260: Require Server requests to be associate… [direct]
  43. SEP-2322: Multi Round-Trip Requests [direct]
  44. SEP-2468: Recommend Issuer (iss) Parameter in MCP… [direct]
  45. SEP-2484: Require Conformance Tests for Standards… [direct]
  46. SEP-2549: TTL for List Results [direct]
  47. SEP-2567: Sessionless MCP via Explicit State Hand… [direct]
  48. SEP-2575: Make MCP Stateless [direct]
  49. SEP-2577: Deprecate Roots, Sampling, and Logging [direct]
  50. SEP-2596: Specification Feature Lifecycle and Dep… [direct]
  51. SEP-2663: Tasks Extension [direct]
  52. current specification [direct]
  53. @codefromthecrypt [direct]
  54. @Kludex [direct]
  55. #414 [direct]
  56. OTel semantic conventions for MCP [direct]
  57. SEP-2028 [direct]
  58. W3C Trace Context [direct]
  59. W3C Baggage [direct]
  60. agentclientprotocol/agent-client-protocol#297 [direct]
  61. Logfire [direct]
  62. ToolHive [direct]
  63. SEP-1788 [direct]
  64. C# SDK instrumentation [direct]
  65. Python SDK instrumentation [direct]
  66. OpenInference MCP instrumentation (Python) [direct]
  67. OpenInference MCP instrumentation (TypeScript) [direct]
  68. Envoy AI Gateway [direct]