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§
sourcefn 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 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.