Skip to main content

fastmcp.server.telemetry

Server-side telemetry helpers.

Functions

get_auth_span_attributes

Get auth attributes for the current request, if authenticated.

get_session_span_attributes

Get session attributes for the current request.

server_span

Create a SERVER span with standard MCP attributes and auth context. Automatically records any exception on the span and sets error status.

delegate_span

Create an INTERNAL span for provider delegation. Used by FastMCPProvider when delegating to mounted servers. Automatically records any exception on the span and sets error status.