fastmcp/tests/telemetry
Chris Guidry 8a13032419
Use standard traceparent/tracestate keys per OTel MCP semconv (#3221)
* Use standard traceparent/tracestate keys per OTel MCP semconv

The OTel semantic conventions for MCP (https://opentelemetry.io/docs/specs/semconv/gen-ai/mcp/)
put `traceparent` and `tracestate` directly in `params._meta` without a prefix.
FastMCP was using `fastmcp.traceparent` / `fastmcp.tracestate`, which meant
non-FastMCP clients sending the standard keys couldn't propagate traces.

Switches injection to the bare keys and adds fallback extraction for the old
prefixed keys so older FastMCP clients still work.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: Update SDK documentation

* Drop legacy fastmcp.-prefixed trace key fallback

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: Update SDK documentation

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: marvin-context-protocol[bot] <225465937+marvin-context-protocol[bot]@users.noreply.github.com>
2026-02-18 15:51:24 -05:00
..
__init__.py Add OpenTelemetry tracing support 2026-01-14 09:45:41 -05:00
test_module.py Use standard traceparent/tracestate keys per OTel MCP semconv (#3221) 2026-02-18 15:51:24 -05:00