pub trait Metrics: Send + Sync {
// Required methods
fn record_counter<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
value: u64,
labels: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn record_gauge<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
value: f64,
labels: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn record_histogram<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
value: f64,
labels: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
}Expand description
Metrics collection interface
Required Methods§
Sourcefn record_counter<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
value: u64,
labels: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn record_counter<'life0, 'life1, 'async_trait>(
&'life0 self,
name: &'life1 str,
value: u64,
labels: HashMap<String, String>,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Record a counter metric