mirror of
https://github.com/openai/codex.git
synced 2026-11-11 21:10:39 +00:00
## Why MCP requests need to retain inbound W3C trace context even when no OpenTelemetry tracing layer is installed. ## What changed - Carry validated request trace context through app-server MCP tasks, connection startup, and resource listing tasks, while preferring active span context. - Forward fallback `traceparent` and `tracestate` headers for MCP HTTP requests, including discovery and initialization. - Use HTTP trace headers as a fallback for exec-server RPC calls when active span context is unavailable. ## Testing Add an app-server integration test that disables trace exporting and verifies that `mcpServer/resource/read` forwards the inbound `traceparent` and `tracestate` to the MCP server. GitOrigin-RevId: c886a55ce0a3992f1b2e04614efec80a20cb4b49