1use lazy_static::lazy_static;
16use prometheus::*;
17
18lazy_static! {
19 pub static ref METRIC_GRPC_CREATE_TABLE: Histogram =
20 register_histogram!("greptime_grpc_create_table", "grpc create table").unwrap();
21 pub static ref METRIC_GRPC_PROMQL_RANGE_QUERY: Histogram = register_histogram!(
22 "greptime_grpc_promql_range_query",
23 "grpc promql range query"
24 )
25 .unwrap();
26 pub static ref METRIC_GRPC_INSERT: Histogram =
27 register_histogram!("greptime_grpc_insert", "grpc insert").unwrap();
28 pub static ref METRIC_GRPC_DELETE: Histogram =
29 register_histogram!("greptime_grpc_delete", "grpc delete").unwrap();
30 pub static ref METRIC_GRPC_SQL: Histogram =
31 register_histogram!("greptime_grpc_sql", "grpc sql").unwrap();
32 pub static ref METRIC_GRPC_LOGICAL_PLAN: Histogram =
33 register_histogram!("greptime_grpc_logical_plan", "grpc logical plan").unwrap();
34 pub static ref METRIC_GRPC_ALTER: Histogram =
35 register_histogram!("greptime_grpc_alter", "grpc alter").unwrap();
36 pub static ref METRIC_GRPC_DROP_TABLE: Histogram =
37 register_histogram!("greptime_grpc_drop_table", "grpc drop table").unwrap();
38 pub static ref METRIC_GRPC_TRUNCATE_TABLE: Histogram =
39 register_histogram!("greptime_grpc_truncate_table", "grpc truncate table").unwrap();
40 pub static ref METRIC_GRPC_DO_GET: Histogram =
41 register_histogram!("greptime_grpc_do_get", "grpc do get").unwrap();
42 pub static ref METRIC_REGION_REQUEST_GRPC: HistogramVec = register_histogram_vec!(
43 "greptime_grpc_region_request",
44 "grpc region request",
45 &["request_type"]
46 )
47 .unwrap();
48}