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> |
||
|---|---|---|
| .. | ||
| images | ||
| anthropic.mdx | ||
| auth0.mdx | ||
| authkit.mdx | ||
| aws-cognito.mdx | ||
| azure.mdx | ||
| chatgpt.mdx | ||
| claude-code.mdx | ||
| claude-desktop.mdx | ||
| cursor-install-mcp.png | ||
| cursor.mdx | ||
| descope.mdx | ||
| discord.mdx | ||
| eunomia-authorization.mdx | ||
| fastapi.mdx | ||
| gemini-cli.mdx | ||
| gemini.mdx | ||
| github.mdx | ||
| google.mdx | ||
| mcp-json-configuration.mdx | ||
| oci.mdx | ||
| openai.mdx | ||
| openapi.mdx | ||
| opentelemetry.mdx | ||
| permit.mdx | ||
| scalekit.mdx | ||
| workos.mdx | ||