Skip to navigation

LLM Request Router Metrics

View as MarkdownOpen in Claude

The LLM Request Router serves Prometheus metrics from llm-request-router:9090/metrics when llmRequestRouter.metrics.enabled is true. The standalone request-router chart defaults this value to false.

The self-managed stack maps addons.llm.requestRouter.metrics.enabled to this chart value. It defaults to true when the LLM add-on is enabled. The request-router chart passes --metrics-port and uses Stargate’s default stargate_ metric prefix and stargate trace service name.

Label Boundaries

Use bounded labels only. Keep routing_key, model, inference_server_id, algorithm, selection, session_state, status, result, reason, and cache to bounded service dimensions. Routing expression content never becomes a label value. Do not add request IDs, session IDs, function IDs, organization IDs, project IDs, raw URLs, raw prompts, authorization values, or other unbounded request fields as metric labels.

Metrics

Metric nameTypeSource endpointLabelsNotes
stargate_requests_totalCounterllm-request-router:9090/metricsrouting_key, model, inference_server_id, statusTotal proxied requests by selected backend and status.
stargate_proxy_attempts_totalCounterllm-request-router:9090/metricsrouting_key, model, inference_server_id, resultUpstream proxy attempts by selected backend and result.
stargate_proxy_retries_totalCounterllm-request-router:9090/metricsrouting_key, model, reasonTotal proxy retries by retry reason.
stargate_routing_selections_totalCounterllm-request-router:9090/metricsrouting_key, model, algorithm, selectionPrimary and ranked fallback cluster choices used for upstream attempts.
stargate_routing_kv_free_token_fallback_selections_totalCounterllm-request-router:9090/metricsrouting_key, model, algorithmRoutes selected after a higher-ranked candidate failed the KV free-token check.
stargate_routing_session_selections_totalCounterllm-request-router:9090/metricsrouting_key, model, algorithm, session_state, selectionCluster choices for requests classified by last_cluster_affinity. session_state is new, returning, or stale. For returning, primary means the request went to its last cluster; for new and stale, it means the cluster came from the affinity group. Every state and selection pair starts at zero once a routing key, model, and algorithm records its first classified request.
stargate_routing_expressions_totalCounterllm-request-router:9090/metricsalgorithm, cacheAccepted x-routing-method values with parameters. cache is hit, build, or rebuild. Values without parameters and rejected values are not counted. Rejected x-routing-method values write the warn log invalid routing algorithm header with their rejection_reason.
stargate_routing_expression_cache_entriesGaugellm-request-router:9090/metricsnoneApproximate number of routing targets that hold a routing expression configuration, with a capacity of 16384 per process. The router runs cache maintenance once a minute to remove entries idle for 15 minutes. Scrapes read the count without maintenance, so it can lag behind pending insertions or removals until the next maintenance run.
stargate_proxy_retry_exhausted_totalCounterllm-request-router:9090/metricsrouting_key, model, reasonTotal requests that exhausted retry options.
stargate_admission_rejections_totalCounterllm-request-router:9090/metricsrouting_key, model, reasonRequests rejected before an upstream attempt: input_work_limit_exceeded and input_work_capacity_unavailable from input-work admission, routing_capacity_unavailable when every eligible backend lacks capacity. These return 503 with overloaded_error.
stargate_quic_connection_evictions_totalCounterllm-request-router:9090/metricsinference_server_id, reasonTotal QUIC pool evictions by backend and reason.
stargate_quic_hot_path_reconnect_totalCounterllm-request-router:9090/metricsinference_server_id, resultDirect QUIC reconnect attempts from the proxy hot path.
stargate_tls_reloads_totalCounterllm-request-router:9090/metricsmaterial_type, resultMounted TLS server identity reload attempts by result.
stargate_tls_certificate_expiry_secondsGaugellm-request-router:9090/metricsmaterial_typeUnix timestamp when the active server identity expires.
stargate_proxy_replay_buffer_bytesHistogramllm-request-router:9090/metricsmodelProxied request replay buffer size in bytes.
stargate_proxy_duration_secondsHistogramllm-request-router:9090/metricsrouting_key, model, inference_server_idTime to first byte from upstream in seconds.
stargate_routing_duration_secondsHistogramllm-request-router:9090/metricsrouting_key, modelLoad-balancer decision time in seconds.
stargate_active_inference_serversGaugellm-request-router:9090/metricsrouting_key, modelCurrently routable inference servers for a routing target.
stargate_routing_reservations_activeGaugellm-request-router:9090/metricsrouting_key, modelLocal routing reservations not yet released or pruned. A reservation counts until its backend sends a registration update received at or after the soft TTL; time alone never ends it. Release after a queue estimate mismatch and removing or deregistering the backend also end it, so a backend that stops reporting keeps this gauge raised until it reports or deregisters.
stargate_routing_reservation_ttl_secondsHistogramllm-request-router:9090/metricsrouting_key, modelRTT-based soft reservation TTL in seconds after applying the configured bounds. After it, the next registration update from the backend ends the reservation.