1pub(crate) const METRIC_DB_LABEL: &str = "db";
16
17use lazy_static::lazy_static;
18use prometheus::*;
19
20lazy_static! {
21 pub static ref METRIC_CATALOG_MANAGER_CATALOG_COUNT: IntGauge =
22 register_int_gauge!("greptime_catalog_catalog_count", "catalog catalog count").unwrap();
23 pub static ref METRIC_CATALOG_MANAGER_SCHEMA_COUNT: IntGauge =
24 register_int_gauge!("greptime_catalog_schema_count", "catalog schema count").unwrap();
25 pub static ref METRIC_CATALOG_MANAGER_TABLE_COUNT: IntGaugeVec = register_int_gauge_vec!(
26 "greptime_catalog_table_count",
27 "catalog table count",
28 &[METRIC_DB_LABEL]
29 )
30 .unwrap();
31 pub static ref METRIC_CATALOG_KV_REMOTE_GET: Histogram =
32 register_histogram!("greptime_catalog_kv_get_remote", "catalog kv get remote").unwrap();
33 pub static ref METRIC_CATALOG_KV_GET: Histogram =
34 register_histogram!("greptime_catalog_kv_get", "catalog kv get").unwrap();
35 pub static ref METRIC_CATALOG_KV_BATCH_GET: Histogram =
36 register_histogram!("greptime_catalog_kv_batch_get", "catalog kv batch get").unwrap();
37}