fastmcp/tests/server/telemetry
Jeremiah Lowin a04f6fd911
Add telemetry off-switch and mcp.protocol.version span attribute (#4481)
* Turn OpenTelemetry instrumentation on by default with explicit off-switch

Add FASTMCP_ENABLE_TELEMETRY setting (default true) and mcp.protocol.version
span attribute for SDK parity.

* Make disabled telemetry a transparent pass-through, not a NoOpTracer

The stock NoOpTracer.start_as_current_span attaches a NonRecordingSpan, hijacking the current OTel context from any enclosing application span. When telemetry is disabled, get_tracer() now returns a non-attaching pass-through tracer so trace.get_current_span() inside handlers still resolves to the caller's span.
2026-07-17 17:02:48 -04:00
..
__init__.py Add OpenTelemetry tracing support 2026-01-14 09:45:41 -05:00
test_delegate_method.py OTEL: Instrument all MCP list operations and enrich delegate spans (#3890) 2026-04-16 18:45:50 -04:00
test_list_tracing.py OTEL: Instrument all MCP list operations and enrich delegate spans (#3890) 2026-04-16 18:45:50 -04:00
test_provider_tracing.py Fix ty 0.0.17 diagnostics and bump lockfile 2026-02-16 16:13:38 -05:00
test_sampling_tracing.py Migrate to MCP Python SDK v2 (#4437) 2026-07-06 17:36:45 -04:00
test_server_tracing.py Add telemetry off-switch and mcp.protocol.version span attribute (#4481) 2026-07-17 17:02:48 -04:00