vllm.v1.metrics.prometheus
_prometheus_multiproc_dir module-attribute
¶
_prometheus_multiproc_dir: Optional[TemporaryDirectory] = (
None
)
get_prometheus_registry ¶
Get the appropriate prometheus registry based on multiprocessing configuration.
Returns:
Name | Type | Description |
---|---|---|
Registry | A prometheus registry |
Source code in vllm/v1/metrics/prometheus.py
setup_multiprocess_prometheus ¶
Set up prometheus multiprocessing directory if not already configured.
Source code in vllm/v1/metrics/prometheus.py
shutdown_prometheus ¶
Shutdown prometheus metrics.
Source code in vllm/v1/metrics/prometheus.py
unregister_vllm_metrics ¶
Unregister any existing vLLM collectors from the prometheus registry.
This is useful for testing and CI/CD where metrics may be registered multiple times across test runs.
Also, in case of multiprocess, we need to unregister the metrics from the global registry.