pub trait PushMetricExporter:
Send
+ Sync
+ 'static {
// Required methods
fn export<'life0, 'life1, 'async_trait>(
&'life0 self,
metrics: &'life1 mut ResourceMetrics,
) -> Pin<Box<dyn Future<Output = MetricResult<()>> + 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 = MetricResult<()>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait;
fn shutdown(&self) -> MetricResult<()>;
fn temporality(&self) -> Temporality;
}
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 = MetricResult<()>> + 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 = MetricResult<()>> + 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.
sourcefn force_flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = MetricResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn force_flush<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = MetricResult<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Flushes any metric data held by an exporter.
sourcefn shutdown(&self) -> MetricResult<()>
fn shutdown(&self) -> MetricResult<()>
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.
sourcefn temporality(&self) -> Temporality
fn temporality(&self) -> Temporality
Access the Temporality of the MetricExporter.