Trait opentelemetry::sdk::export::metrics::MetricsExporter
source · [−]pub trait MetricsExporter: TemporalitySelector {
fn export(
&self,
cx: &Context,
res: &Resource,
reader: &dyn InstrumentationLibraryReader
) -> Result<(), MetricsError>;
}
Available on crate feature
metrics
only.Expand description
Exporter handles presentation of the checkpoint of aggregate metrics. This is the final stage of a metrics export pipeline, where metric data are formatted for a specific system.
Required Methods
sourcefn export(
&self,
cx: &Context,
res: &Resource,
reader: &dyn InstrumentationLibraryReader
) -> Result<(), MetricsError>
fn export(
&self,
cx: &Context,
res: &Resource,
reader: &dyn InstrumentationLibraryReader
) -> Result<(), MetricsError>
Export is called immediately after completing a collection pass in the SDK.
The Context comes from the controller that initiated collection.
The InstrumentationLibraryReader interface refers to the Processor that just completed collection.