vLLM Observability
vLLM exposes request, latency, scheduler, and disaggregation metrics through Dynamo’s Prometheus /metrics endpoint.
Overview
When running vLLM through Dynamo, vLLM engine metrics are automatically passed through and exposed on Dynamo’s /metrics endpoint (default port 8081). This allows you to access both vLLM engine metrics (prefixed with vllm:) and Dynamo runtime metrics (prefixed with dynamo_*) from a single worker backend endpoint.
For the complete and authoritative list of all vLLM metrics, always refer to the official vLLM Metrics Design documentation.
For LMCache setup and its separate metrics endpoint, see KV Cache Offloading.
For Dynamo runtime metrics, see the Metrics Catalog.
For a visualization walkthrough, see Metrics and Dashboards.
Environment Variables and Flags
Exposing Custom Component Metrics
The worker exposes only engine metrics whose names start with a built-in allowlist (vllm: and lmcache: on vLLM; sglang: and trtllm_ on the other backends). Metrics emitted by custom components loaded into the engine process — for example a custom KV connector — are silently dropped. Set DYN_EXTRA_METRIC_PREFIXES to append your own prefixes:
Notes:
- Matching is a literal prefix match: include the trailing separator —
myconnectorwould also matchmyconnectorfoo_*. Whitespace around commas is trimmed and empty segments are ignored. - Extra series get the standard
dynamo_namespace,dynamo_component,dynamo_endpoint, andworker_idlabels injected, so they aggregate in Prometheus like native engine series. - The variable is read by the worker process at metrics-setup time, not by the frontend. On Kubernetes, set it in the worker container’s environment:
- On vLLM this only takes effect when
disable_log_statsis false (the default); otherwise the engine-metrics path is not registered at all. - On vLLM, in the multiprocess conflict-fallback path (when the
.dbcollector cannot merge into the global registry and two separate callbacks are used), only database-backed metrics — standardCounter/Gauge/Histogramtypes — are covered. Metrics from custom in-memory collectors are not exposed on that path. Normal multiprocess and single-process deployments are unaffected.
Getting Started Quickly
This is a single machine example.
Start Observability Stack
To visualize metrics with Prometheus and Grafana, start the stack as described in Install Observability.
Launch Dynamo Components
The launch scripts in examples/backends/vllm/launch/ already enable metrics on port 8081 by default. For example:
Once the deployment is running, send a request and check metrics:
Exposed Metrics
vLLM exposes metrics in Prometheus Exposition Format text at the /metrics HTTP endpoint. All vLLM engine metrics use the vllm: prefix and include labels (e.g., model_name, finished_reason, scheduling_event) to identify the source.
Example Prometheus Exposition Format text:
Note: The specific metrics shown above are examples and may vary depending on your vLLM version. Always inspect your actual /metrics endpoint or refer to the official documentation for the current list.
Metric Categories
vLLM provides metrics in the following categories (all prefixed with vllm:):
- Request metrics - Request success, failure, and completion tracking
- Performance metrics - Latency, throughput, and timing measurements
- Resource usage - System resource consumption
- Scheduler metrics - Scheduling and queue management
- Disaggregation metrics - Metrics specific to disaggregated deployments (when enabled)
Note: Specific metrics are subject to change between vLLM versions. Always refer to the official documentation or inspect the /metrics endpoint for your vLLM version.
Available Metrics
The official vLLM documentation includes complete metric definitions with:
- Detailed explanations and design rationale
- Counter, Gauge, and Histogram metric types
- Metric labels (e.g.,
model_name,finished_reason,scheduling_event) - Information about v1 metrics migration
- Future work and deprecated metrics
For the complete and authoritative list of all vLLM metrics, see the official vLLM Metrics Design documentation.
LMCache Metrics
The lmcache server runs as an out-of-process sidecar and exposes its metrics (prefixed lmcache_mp_) on its own HTTP admin port (default :8080/metrics). vLLM and Dynamo metrics remain on Dynamo’s :8081/metrics.
To try it out, use the LMCache launch script:
Send a request and view LMCache metrics:
Troubleshooting
Troubleshooting LMCache-related metrics and logs is documented in:
For complete LMCache configuration and metric details, see:
- KV Cache Offloading - Local setup and verification
- LMCache Observability Documentation - Complete metrics reference
Implementation Details
- vLLM v1 uses multiprocess metrics collection via
prometheus_client.multiprocess PROMETHEUS_MULTIPROC_DIR: (optional). By default, Dynamo automatically manages this environment variable, setting it to a temporary directory where multiprocess metrics are stored as memory-mapped files. Each worker process writes its metrics to separate files in this directory, which are aggregated when/metricsis scraped. Users only need to set this explicitly where complete control over the metrics directory is required.- Dynamo uses
MultiProcessCollectorto aggregate metrics from all worker processes - Metrics on Dynamo’s
:8081/metricsare filtered tovllm:*anddynamo_*series.lmcache_mp_*series are served by thelmcache serverprocess on its own:8080/metrics. - The integration uses Dynamo’s
register_engine_metrics_callback()function with the globalREGISTRY - Metrics appear after vLLM engine initialization completes
- vLLM v1 metrics are different from v0 - see the official documentation for migration details
Related Documentation
vLLM Metrics
- Official vLLM Metrics Design Documentation
- vLLM Production Metrics User Guide
- vLLM GitHub - Metrics Implementation
Dynamo Metrics
- Metrics Catalog - Dynamo runtime metric definitions
- Metrics and Dashboards - Visualization walkthrough
- Dynamo runtime metrics (prefixed with
dynamo_*) are available at the same/metricsendpoint alongside vLLM metrics- Implementation:
lib/runtime/src/metrics.rs(Rust runtime metrics) - Metric names:
lib/runtime/src/metrics/prometheus_names.rs(metric name constants) - Integration code:
components/src/dynamo/common/utils/prometheus.py- Prometheus utilities and callback registration
- Implementation: