1use lazy_static::lazy_static;
18use prometheus::*;
19
20pub const OPERATION_LABEL: &str = "operation";
22
23lazy_static! {
24 pub static ref PHYSICAL_REGION_COUNT: IntGauge =
26 register_int_gauge!("greptime_metric_engine_physical_region_count", "metric engine physical region count").unwrap();
27
28 pub static ref PHYSICAL_COLUMN_COUNT: IntGauge =
30 register_int_gauge!("greptime_metric_engine_physical_column_count", "metric engine physical column count").unwrap();
31
32 pub static ref LOGICAL_REGION_COUNT: IntGauge =
34 register_int_gauge!("greptime_metric_engine_logical_region_count", "metric engine logical region count").unwrap();
35
36 pub static ref MITO_DDL_DURATION: Histogram =
38 register_histogram!("greptime_metric_engine_mito_ddl", "metric engine mito ddl").unwrap();
39
40 pub static ref FORBIDDEN_OPERATION_COUNT: IntCounter =
42 register_int_counter!("greptime_metric_engine_forbidden_request", "metric forbidden request").unwrap();
43
44 pub static ref MITO_OPERATION_ELAPSED: HistogramVec = register_histogram_vec!(
46 "greptime_metric_engine_mito_op_elapsed",
47 "metric engine's mito operation elapsed",
48 &[OPERATION_LABEL],
49 exponential_buckets(0.01, 10.0, 7).unwrap(),
51 )
52 .unwrap();
53}