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