Skip to content

fix(daemon): decouple vLLM Prometheus scraping from enable_docker#104

Open
michaelroy-amd wants to merge 2 commits into
mainfrom
fix/vllm-metrics-ungate
Open

fix(daemon): decouple vLLM Prometheus scraping from enable_docker#104
michaelroy-amd wants to merge 2 commits into
mainfrom
fix/vllm-metrics-ungate

Conversation

@michaelroy-amd

Copy link
Copy Markdown
Member

Summary

  • VllmPrometheusCollector (the vLLM /metrics HTTP scraper) was only constructed when opts.enable_docker && !opts.disable_vllm_metrics, even though the scraper has zero Docker dependency — it's a plain HTTP GET against a vLLM instance's /metrics endpoint.
  • apps/rocm/src/dash.rs::maybe_spawn_embedded_daemon always calls runner_options(config, paths, false), hardcoding enable_docker = false. Combined with the gate above, this made the vLLM Prometheus scraper permanently dead for the embedded daemon — the common no-Docker / managed-vLLM path.
  • Fix: gate vllm construction in run_loop on !opts.disable_vllm_metrics alone. enable_docker continues to gate only DockerDiscovery, which is the only genuinely Docker-dependent piece.

Root cause

Managed (native) vLLM instances are already discovered independently of Docker via services_dir, so the scraper never needed enable_docker as a precondition. The original gate conflated "Docker discovery is enabled" with "scrape metrics from any known vLLM instance," silently disabling metrics for every embedded-daemon deployment.

Relates to EAI-7359

Test Plan

  • cargo build clean
  • cargo clippy --all-targets --all-features -- -D warnings clean
  • cargo test -p rocm-dash-daemon runner:: — 11 passed, including new vllm_metrics_enabled_is_independent_of_docker regression test
  • cargo test -p rocm dash:: -- --test-threads=1 — 8 passed, including new runner_options_keeps_vllm_metrics_enabled_without_docker regression test

VllmPrometheusCollector was constructed only when
opts.enable_docker && !opts.disable_vllm_metrics, but the scraper is a
plain HTTP GET against a vLLM instance's /metrics endpoint with no
Docker dependency. Managed (native) instances are already discovered
independently of Docker via services_dir.

apps/rocm/src/dash.rs::maybe_spawn_embedded_daemon always calls
runner_options(config, paths, false), hardcoding enable_docker=false,
which made the scraper permanently dead for the embedded daemon - the
common no-Docker / managed-vLLM path.

Gate vllm construction on !opts.disable_vllm_metrics alone; enable_docker
continues to gate only DockerDiscovery.

Relates to EAI-7359

Signed-off-by: Michael Roy <michael.roy@amd.com>
… shipped flag

Adversarial-review follow-up for EAI-7359 (wording only, no behavior
change): disable_vllm_metrics is hardcoded false and not wired to any
CLI flag or config field, so it is not user-reachable today. Soften the
field doc and test comments to describe it as the internal seam a future
opt-out would flip, rather than implying a live off-switch.

Relates to EAI-7359

Signed-off-by: Michael Roy <michael.roy@amd.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant