Feature hasn't been suggested before.
Describe the enhancement you want to request
Problem
When opencode connects to an MCP server over HTTP, the outbound requests do not carry the W3C traceparent / tracestate headers.
Expected Behavior
With OTel tracing enabled (OTEL_EXPORTER_OTLP_ENDPOINT set and experimental.openTelemetry: true), every outbound MCP HTTP request should carry the W3C traceparent (and tracestate when present) header derived from the currently-active trace context, so the MCP server's spans attach as children of the originating opencode span in the same trace.
Use Case
Operating a tracing-enabled MCP server (whether self-hosted or shared) and needing a single, complete trace per tool call across all hops.
Concretely, this unblocks:
- Debugging tool-call latency end-to-end (where time is spent on the opencode side vs. inside the MCP server vs. in whatever the MCP server calls downstream).
- Correlating errors raised inside the MCP server with the originating opencode session in a single view.
- Consistent sampling
Related Issues
Feature hasn't been suggested before.
Describe the enhancement you want to request
Problem
When opencode connects to an MCP server over HTTP, the outbound requests do not carry the W3C
traceparent/tracestateheaders.Expected Behavior
With OTel tracing enabled (OTEL_EXPORTER_OTLP_ENDPOINT set and experimental.openTelemetry: true), every outbound MCP HTTP request should carry the W3C traceparent (and tracestate when present) header derived from the currently-active trace context, so the MCP server's spans attach as children of the originating opencode span in the same trace.
Use Case
Operating a tracing-enabled MCP server (whether self-hosted or shared) and needing a single, complete trace per tool call across all hops.
Concretely, this unblocks:
Related Issues