Skip to content
agentgateway has joined the Agentic AI Foundation — Learn more

For the complete documentation index, see llms.txt. Markdown versions of all docs pages are available by appending .md to any docs URL.

Metrics reference

Page as Markdown

Review the metrics that are available in agentgateway.

Note

All counter and histogram metrics only appear in the output after the first request of that type. For example, agentgateway_mcp_requests_total is not present until MCP traffic is received. This is normal Prometheus behavior. Counters and histograms are not pre-initialized.

XDS

These metrics track communication with an XDS management server. They are registered only when agentgateway runs in Kubernetes mode against a control plane, and do not appear on the metrics endpoint of a standalone process.

MetricTypeUnitDescription
agentgateway_xds_connection_terminations_totalCounter—The total number of completed connections to xds server (unstable).
agentgateway_xds_message_bytes_totalCounterbytesTotal number of bytes received (unstable).
agentgateway_xds_message_totalCounter—Total number of messages received (unstable).

HTTP

MetricTypeUnitDescription
agentgateway_request_duration_secondsHistogramsecondsDuration of HTTP requests (seconds).
agentgateway_request_processing_secondsHistogramsecondsDuration from receiving an HTTP request to sending the primary outbound call (seconds).
agentgateway_requests_totalCounter—The total number of HTTP requests sent.
agentgateway_response_bytes_totalCounterbytesTotal HTTP response bytes received.
agentgateway_response_processing_secondsHistogramsecondsDuration from receiving the primary outbound response to sending the HTTP response (seconds).
agentgateway_retries_totalCounter—The total number of request retries.

TCP

MetricTypeUnitDescription
agentgateway_downstream_connections_totalCounter—The total number of downstream connections established.
agentgateway_downstream_received_bytes_totalCounterbytesTotal TCP bytes received per connection labels.
agentgateway_downstream_sent_bytes_totalCounterbytesTotal TCP bytes transmitted per connection labels.
agentgateway_tls_handshake_duration_secondsHistogramsecondsDuration to complete inbound TLS/HTTPS handshake (seconds).
agentgateway_upstream_connect_duration_secondsHistogramsecondsDuration to establish upstream connection (seconds).

MCP

MetricTypeUnitDescription
agentgateway_mcp_requests_totalCounter—Total number of MCP requests.

LLM

These metrics follow the OpenTelemetry semantic conventions for generative AI.

MetricTypeUnitDescription
agentgateway_cost_catalog_lookups_totalCounter—Total number of model cost catalog lookups by resolution status.
agentgateway_gen_ai_client_cost_usd_totalCounterusdCumulative USD cost of generative AI requests.
agentgateway_gen_ai_client_token_usageHistogram—Number of tokens used per request.
agentgateway_gen_ai_server_request_durationHistogram—Duration of generative AI request.
agentgateway_gen_ai_server_time_per_output_tokenHistogram—Time to generate each output token for a given request.
agentgateway_gen_ai_server_time_to_first_tokenHistogram—Time to generate the first token for a given request.
agentgateway_guardrail_checks_totalCounter—Total number of guardrail checks.

Misc

The following metrics reflect the health of the agentgateway process itself and appear on every startup, regardless of traffic.

MetricTypeUnitDescription
agentgateway_build_infoInfo—Agentgateway build information.
agentgateway_config_synchronizedGauge—Whether the last configuration load/reload was successful or not, being synchronized with the on-disk configuration.
agentgateway_upstream_call_duration_secondsHistogramsecondsDuration of outbound calls made by agentgateway (seconds).
agentgateway_tokio_num_workersGauge—The number of worker threads that the async runtime uses.
agentgateway_tokio_num_alive_tasksGauge—The number of tasks that are currently alive in the async runtime.
agentgateway_tokio_global_queue_depthGauge—The number of tasks that are currently scheduled in the async runtime’s global queue.
Was this page helpful?
Agentgateway assistant

Ask me anything about agentgateway configuration, features, or usage.

Note: AI-generated content might contain errors; please verify and test all returned information.

Tip: one topic per conversation gives the best results. Use the + button in the chat header to start a new conversation.

Switching topics? Starting a new conversation improves accuracy.
↑↓ navigate ↵ select esc dismiss

What could be improved?

Your feedback helps us improve assistant answers and identify docs gaps we should fix.

Need more help? Join us on Discord: https://discord.gg/y9efgEmppm

Want to use your own agent? Add the Solo MCP server to query our docs directly. Get started here: https://search.solo.io/.