Line data Source code
1 : //! Broker metrics.
2 :
3 : use metrics::{register_int_gauge, IntGauge};
4 : use once_cell::sync::Lazy;
5 :
6 372 : pub static NUM_PUBS: Lazy<IntGauge> = Lazy::new(|| {
7 372 : register_int_gauge!("storage_broker_active_publishers", "Number of publications")
8 372 : .expect("Failed to register metric")
9 372 : });
10 :
11 372 : pub static NUM_SUBS_TIMELINE: Lazy<IntGauge> = Lazy::new(|| {
12 372 : register_int_gauge!(
13 372 : "storage_broker_per_timeline_active_subscribers",
14 372 : "Number of subsciptions to particular tenant timeline id"
15 372 : )
16 372 : .expect("Failed to register metric")
17 372 : });
18 :
19 372 : pub static NUM_SUBS_ALL: Lazy<IntGauge> = Lazy::new(|| {
20 372 : register_int_gauge!(
21 372 : "storage_broker_all_keys_active_subscribers",
22 372 : "Number of subsciptions to all keys"
23 372 : )
24 372 : .expect("Failed to register metric")
25 372 : });
|