pub trait MetricsReader: Send + Sync {
// Required methods
fn get_channel_delta_stats<'life0, 'async_trait>(
&'life0 self,
at: Option<i64>,
time_offset: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<HashMap<ChannelKey, ChannelDeltaStats>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn get_kafka_source_metrics<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<KafkaPartitionMetrics>>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
}Expand description
Trait for reading metrics from the meta node via RPC calls.
Required Methods§
Sourcefn get_channel_delta_stats<'life0, 'async_trait>(
&'life0 self,
at: Option<i64>,
time_offset: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<HashMap<ChannelKey, ChannelDeltaStats>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_channel_delta_stats<'life0, 'async_trait>(
&'life0 self,
at: Option<i64>,
time_offset: Option<i64>,
) -> Pin<Box<dyn Future<Output = Result<HashMap<ChannelKey, ChannelDeltaStats>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetches channel delta statistics from the meta node.
§Arguments
at- Unix timestamp in seconds for the evaluation time. If None, defaults to current Prometheus server time.time_offset- Time offset for throughput and backpressure rate calculation in seconds. If None, defaults to 60s.
§Returns
Result<HashMap<ChannelKey, ChannelDeltaStats>>- The channel delta stats mapped by channel key or an error
Sourcefn get_kafka_source_metrics<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<KafkaPartitionMetrics>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_kafka_source_metrics<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<KafkaPartitionMetrics>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Fetch Kafka source lag related metrics from Prometheus.
Returns one row per (source_id, partition_id) with optional high watermark and
latest consumed offset.