Skip to main content

Module access_log

Module access_log 

Source
Expand description

Structured access logging middleware.

Logs each MCP request with structured fields including method, tool/resource name, backend name, duration, and status. Uses the mcp::access tracing target so operators can filter access logs independently.

The backend name is derived from the namespace prefix of the tool name. For example, with separator /, a tool named math/add belongs to backend math.

Structsยง

AccessLogLayer
Tower layer that produces an AccessLogService.
AccessLogService
Tower service that emits structured access log entries.