[SEP] Automatic _meta to HTTP Header Forwarding for Distributed Tracing #2029
Replies: 1 comment
-
Status update — SEP-2028 (for Discussion #2029)
📣 Status update: design matured, validated by a real client need, still seeking a sponsorQuick update for folks following this thread since I opened it in December. The proposal in PR #2028 has evolved meaningfully, an open design question has been resolved, and there's now concrete evidence from the VS Code / Copilot team that this gap is real and worth closing. 1. The design moved from "forward by default" to a group-based policy systemThe original proposal was a simple "forward W3C Trace Context headers automatically." Based on feedback, it's now a more robust group-based model where semantically related headers are treated as a unit, each governed by a single
W3C Trace Context ( 2. Conflict resolution (raised by @michaelsafyan) is now resolved in the specMichael asked what should happen when trace context is present in both the inbound
Thanks Michael — this made the proposal stronger. 3. Real-world validation: VS Code / Copilot hit exactly this gapmicrosoft/vscode#302301 ("open telemetry support is not passing trace context to remote MCP server") — closed and shipped in VS Code 1.119.0 — is the same problem this SEP describes: HTTP calls to remote MCP servers weren't carrying In that thread, the VS Code team (@digitarald) referenced this SEP by name, mapping the landscape:
They shipped the SEP-414 half ( 4. Where it stands / what I need
If you're a maintainer working on transports, SDK behavior, or observability and this resonates — I'd love a sponsor. The VS Code issue above shows the demand is concrete and current. Happy to walk through the design, scope it down, or split it if that helps it land. 🙏 Feedback on the group-policy model is also very welcome here. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Pre-submission Checklist
Summary
Scope: Protocol Specification, SDK Implementation
I've submitted SEP PR #2028 proposing automatic forwarding of W3C Trace Context fields from
_metato downstream HTTP headers.This discussion is to gather community feedback on the proposal.
The Problem
When an MCP client sends trace context via
_meta:{ "method": "tools/call", "params": { "name": "get_weather", "arguments": { "location": "Dallas" }, "_meta": { "traceparent": "00-e796ccb939d95b7c54d523095a9bd3b4-e515588135c1c901-01" } } }The MCP server receives
_meta, but when it makes HTTP calls to external APIs, no trace headers are forwarded. This breaks distributed tracing at the MCP boundary.Verification
I verified this gap by:
_metawithtraceparentfrom an MCP client@timlukahorstmann/mcp-weather)Proposed Solution
W3C Trace Context fields (
traceparent,tracestate,baggage): Forwarded by default (opt-out)Custom fields (
correlation_id,tenant_id, etc.): Opt-in with whitelistWhy Default-On for W3C Headers?
PR #666 (typescript-sdk) was rejected with rationale: "This PR introduces transport-specific concerns without protocol-level support."
This SEP provides that protocol-level foundation. But if adoption requires every server author to opt-in, adoption will be minimal and the distributed tracing problem remains unsolved.
Related Work
_metaconvention (marked complete)Discussion Questions
baggagebe opt-in instead of default-on? (It can contain arbitrary key-value pairs)SEP Document
Full specification: PR #2028
Looking for feedback and a potential sponsor for this SEP.
Beta Was this translation helpful? Give feedback.
All reactions