swarm-controller: extract jobq_metrics into its own hive-jobq-metrics crate

This commit is contained in:
damocles 2026-08-19 17:52:12 +02:00 committed by mara
commit f5ff8698f3
7 changed files with 100 additions and 59 deletions

View file

@ -37,7 +37,6 @@ use utoipa_axum::{router::OpenApiRouter, routes};
mod auth;
mod forge;
mod jobq_metrics;
mod status;
mod webhook;
@ -921,7 +920,8 @@ async fn main() -> Result<()> {
// `PeriodicReader`, so it must live as long as `main` does (which it
// does here: this binding never goes out of scope before the process
// exits via `axum::serve(...).await` below).
let _jobq_metrics_provider = jobq_metrics::spawn_exporter(Arc::clone(&jobq));
let _jobq_metrics_provider =
hive_jobq_metrics::spawn_exporter(Arc::clone(&jobq), "swarm-controller");
// Same "log and carry on" shape as the queue/bridge/forge wiring above.
// A controller that cannot hold a webhook secret still serves every