swarm-controller: export jobq state rollup as OTEL gauges

This commit is contained in:
damocles 2026-08-19 17:22:55 +02:00 committed by mara
commit 1f5a7b71ed
4 changed files with 278 additions and 0 deletions

View file

@ -38,6 +38,20 @@ problem_details = { version = "0.9.0", features = ["axum"] }
# same shape `hive-c0re/src/job_queue/scheduler.rs` uses over its own graph.
hive-jobq.workspace = true
hive-jobq-wire.workspace = true
# OTEL SDK for the jobq-rollup metrics exporter (`jobq_metrics.rs`). Same
# versions + blocking-client rationale as `hive-c0re`/`hive-metric`: the
# metrics SDK's `PeriodicReader` runs on a background thread with no Tokio
# reactor, where the async client panics. Kept local rather than in
# `workspace.dependencies` — same call `hive-metric` already made, this is
# still the only other crate that needs it.
opentelemetry = "0.32"
opentelemetry_sdk = { version = "0.32", features = ["metrics"] }
opentelemetry-otlp = { version = "0.32", default-features = false, features = [
"metrics",
"http-json",
"reqwest-blocking-client",
"reqwest-rustls",
] }
# The forge webhook HMAC (`webhook.rs`). Kept in this crate rather than
# shared with hive-c0re's equivalent: c0re's copy is scheduled to be deleted
# with its webhook routes once registration moves here, so the second holder