pub struct QueueStats {Show 13 fields
pub queue: String,
pub weight: u32,
pub unfinished_jobs: u64,
pub max_unfinished_jobs: Option<u64>,
pub by_state: Vec<(String, i64)>,
pub counts_approximate: bool,
pub arrival_rate: f64,
pub drain_rate: f64,
pub time_to_drain_ms: Option<i64>,
pub oldest_available_ms: Option<i64>,
pub quiet_groups: QuietGroupMetrics,
pub paused: bool,
pub memory_bytes: Option<u64>,
}Fields§
§queue: String§weight: u32Fleet policy used by the atomic gate to choose BETWEEN queues. This is unrelated
to an envelope’s rate-budget weight, which prices one job after a queue wins.
unfinished_jobs: u64Exact O(1) backlog count used by enqueue backpressure. Unlike by_state, this
is never approximate and excludes every terminal state.
max_unfinished_jobs: Option<u64>None disables producer backpressure for this queue. Zero is a useful intake
kill switch and is deliberately distinct from queue pause (which stops drain).
by_state: Vec<(String, i64)>§counts_approximate: bool§arrival_rate: f64backlog metrics jobs/sec over the last minute — a READ, not a Prometheus recording rule.
drain_rate: f64§time_to_drain_ms: Option<i64>None when arrival >= drain: THIS is the alert condition, not depth.
oldest_available_ms: Option<i64>backlog metrics store-clock age of the oldest job that is currently available.
None means the queue has no available job. This is an age rather than the
underlying timestamp so callers can compare it directly with a latency SLO.
quiet_groups: QuietGroupMetricsbacklog metrics the same four backlog signals after partitions with disproportionate in-flight work are excluded. One tenant’s flood must not page an operator about every other tenant’s latency.
paused: bool§memory_bytes: Option<u64>Last bounded, explicitly sampled storage estimate. Never computed synchronously
by this read; None means this backend or queue has no sample yet.