Expand description
Prometheus metrics for the MCP HTTP endpoints.
Tracks request counts, tool call counts, and tool call durations,
labeled by endpoint type (agent / developer) and either the
JSON-RPC method name or the MCP tool name. The status label is ok
for successful calls and the McpRequestError error type
(e.g. ToolNotFound, DataProductNotFound) for failures.
Structs§
- McpMetrics
- Metrics emitted by the MCP HTTP handlers.
- Tool
Call Guard - RAII guard for a single
tools/callinvocation. On drop, incrementstool_calls_totalwith the current status and observestool_call_duration_secondsvia the embeddedHistogramTimer’s own drop. Designed so that if the surrounding future is dropped before completion (e.g. bytokio::time::timeout), the metric still records with the default"cancelled"status instead of being silently lost.