sui_indexer_builder/
metrics.rs

1// Copyright (c) Mysten Labs, Inc.
2// SPDX-License-Identifier: Apache-2.0
3
4use prometheus::{IntCounterVec, IntGaugeVec};
5
6pub trait IndexerMetricProvider: Send + Sync {
7    fn get_tasks_latest_retrieved_checkpoints(&self) -> &IntGaugeVec;
8
9    fn get_tasks_remaining_checkpoints_metric(&self) -> &IntGaugeVec;
10
11    fn get_tasks_processed_checkpoints_metric(&self) -> &IntCounterVec;
12
13    fn get_inflight_live_tasks_metrics(&self) -> &IntGaugeVec;
14
15    fn boxed(self) -> Box<dyn IndexerMetricProvider>
16    where
17        Self: Sized + 'static,
18    {
19        Box::new(self)
20    }
21}