pub trait MetricsConsumer {
    type Metric;

    fn new(client: Client) -> Self;
    fn accept(&mut self, metric: Self::Metric);
    fn flush<'life0, 'async_trait>(
        &'life0 mut self
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }
Expand description

Aggregator for metrics. An aggregator should collect metrics so they can be batch dispatched.

Required Associated Types

The metrics type.

Required Methods

Create a new instance for the given client.

Consume a metric.

Flush all consumed metrics to the database.

Implementors