fastmcp/tests
claude[bot] a9b6e71966 Add trace context propagation to OpenTelemetry middleware
Enable distributed tracing across protocols that don't support HTTP headers (like SSE) by propagating W3C Trace Context through MCP _meta fields.

- Add propagate_context parameter (default: True) to OpenTelemetryMiddleware
- Implement _extract_trace_context() to read traceparent/tracestate from request metadata
- Implement _inject_trace_context() to write trace context to response metadata
- Update all operation handlers to extract parent context and inject into results
- Add comprehensive test coverage for context propagation
- Update documentation with examples and configuration details

This enables trace continuity across MCP calls, allowing clients to link server spans to their traces and propagate context downstream.

Co-authored-by: William Easton <strawgate@users.noreply.github.com>
2025-12-03 23:58:17 +00:00
..
cli Fix: URL-encode server name in Cursor deeplinks (#2369) 2025-11-04 11:26:57 -05:00
client Update FastMCP for MCP SDK 1.23.1 auth changes 2025-12-03 11:50:08 -05:00
contrib feat: Add title, annotations and meta to mixin decorators 2025-10-10 14:23:02 +05:30
deprecated Switch to new OpenAPI parser as default (#2513) 2025-12-01 20:29:18 -05:00
experimental Switch to new OpenAPI parser as default (#2513) 2025-12-01 20:29:18 -05:00
integration_tests Fix typos and formatting 2025-11-15 12:21:15 -05:00
prompts Enable more type checking rules (#1775) 2025-09-07 11:11:44 -04:00
resources Fix query-only resource templates not matching URIs without query strings (#2323) 2025-11-01 11:27:37 -04:00
server Add trace context propagation to OpenTelemetry middleware 2025-12-03 23:58:17 +00:00
tools Fix type errors in oauth_proxy and test_auth_integration 2025-11-15 12:21:15 -05:00
utilities Switch to new OpenAPI parser as default (#2513) 2025-12-01 20:29:18 -05:00
__init__.py Update type handling for resources 2024-11-29 19:42:46 -05:00
conftest.py Fix Windows test timeouts from SQLite locking (#2368) 2025-11-04 10:58:49 -05:00
test_examples.py Cleanup content conversion 2025-09-06 17:32:33 -05:00
test_mcp_config.py Bump ty to ==0.0.1a25 (#2350) 2025-11-02 20:02:45 -05:00