use commonware_runtime::{
telemetry::metrics::{Gauge, MetricsExt as _},
Metrics as RuntimeMetrics,
};
pub struct Metrics {
pub tip: Gauge,
pub floor: Gauge,
pub next: Gauge,
}
impl Metrics {
pub fn init<E: RuntimeMetrics>(context: &E) -> Self {
Self {
tip: context.gauge("tip", "Total enqueued items"),
floor: context.gauge("floor", "Acknowledged items"),
next: context.gauge("next", "Next item to dequeue"),
}
}
}