diff --git a/vllm/v1/metrics/prometheus.py b/vllm/v1/metrics/prometheus.py index 1eacb785aa84..c8740276713b 100644 --- a/vllm/v1/metrics/prometheus.py +++ b/vllm/v1/metrics/prometheus.py @@ -64,7 +64,7 @@ def unregister_vllm_metrics(): registry = REGISTRY # Unregister any existing vLLM collectors for collector in list(registry._collector_to_names): - if hasattr(collector, "_name") and "vllm" in collector._name: + if hasattr(collector, "_name") and collector._name.startswith("vllm:"): registry.unregister(collector)