iota_data_ingestion_core/
metrics.rs1use prometheus::{IntGaugeVec, Registry, register_int_gauge_vec_with_registry};
6
7#[derive(Clone)]
8pub struct DataIngestionMetrics {
9 pub data_ingestion_checkpoint: IntGaugeVec,
10}
11
12impl DataIngestionMetrics {
13 pub fn new(registry: &Registry) -> Self {
14 Self {
15 data_ingestion_checkpoint: register_int_gauge_vec_with_registry!(
16 "data_ingestion_checkpoint",
17 "Number of uploaded checkpoints.",
18 &["task"],
19 registry,
20 )
21 .unwrap(),
22 }
23 }
24}