Trait MetricsReader

Source
pub trait MetricsReader: Send + Sync {
    // Required method
    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;
}
Expand description

Trait for reading metrics from the meta node via RPC calls.

Required Methods§

Source

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

Implementors§