mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-31 19:43:19 +02:00
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> |
||
|---|---|---|
| .. | ||
| .cursor/rules | ||
| assets | ||
| clients | ||
| community | ||
| css | ||
| deployment | ||
| development | ||
| getting-started | ||
| integrations | ||
| patterns | ||
| public/schemas/fastmcp.json | ||
| python-sdk | ||
| servers | ||
| snippets | ||
| tutorials | ||
| .ccignore | ||
| changelog.mdx | ||
| docs.json | ||
| updates.mdx | ||