pub trait PushMetricsExporter: AggregationSelector + TemporalitySelector + Send + Sync + 'static {
    // Required methods
    fn export<'life0, 'life1, 'async_trait>(
        &'life0 self,
        metrics: &'life1 mut ResourceMetrics
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait;
    fn force_flush<'life0, 'async_trait>(
        &'life0 self
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn shutdown(&self) -> Result<()>;
}
Expand description

Exporter handles the delivery of metric data to external receivers.

This is the final component in the metric push pipeline.

Required Methods§

source

fn export<'life0, 'life1, 'async_trait>( &'life0 self, metrics: &'life1 mut ResourceMetrics ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Export serializes and transmits metric data to a receiver.

All retry logic must be contained in this function. The SDK does not implement any retry logic. All errors returned by this function are considered unrecoverable and will be reported to a configured error Handler.

source

fn force_flush<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Flushes any metric data held by an exporter.

source

fn shutdown(&self) -> Result<()>

Releases any held computational resources.

After Shutdown is called, calls to Export will perform no operation and instead will return an error indicating the shutdown state.

Implementors§