Struct opentelemetry_otlp::MetricsExporter
source · pub struct MetricsExporter { /* private fields */ }
Available on crate feature
metrics
only.Expand description
Export metrics in OTEL format.
Implementations§
source§impl MetricsExporter
impl MetricsExporter
sourcepub fn new(
client: impl MetricsClient,
temporality_selector: Box<dyn TemporalitySelector>,
aggregation_selector: Box<dyn AggregationSelector>,
) -> MetricsExporter
pub fn new( client: impl MetricsClient, temporality_selector: Box<dyn TemporalitySelector>, aggregation_selector: Box<dyn AggregationSelector>, ) -> MetricsExporter
Create a new metrics exporter
Trait Implementations§
source§impl AggregationSelector for MetricsExporter
impl AggregationSelector for MetricsExporter
source§fn aggregation(&self, kind: InstrumentKind) -> Aggregation
fn aggregation(&self, kind: InstrumentKind) -> Aggregation
Selects the aggregation and the parameters to use for that aggregation based on
the InstrumentKind.
source§impl Debug for MetricsExporter
impl Debug for MetricsExporter
source§impl PushMetricsExporter for MetricsExporter
impl PushMetricsExporter for MetricsExporter
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,
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. Read more
source§impl TemporalitySelector for MetricsExporter
impl TemporalitySelector for MetricsExporter
source§fn temporality(&self, kind: InstrumentKind) -> Temporality
fn temporality(&self, kind: InstrumentKind) -> Temporality
Selects the temporality to use based on the InstrumentKind.
Auto Trait Implementations§
impl Freeze for MetricsExporter
impl !RefUnwindSafe for MetricsExporter
impl Send for MetricsExporter
impl Sync for MetricsExporter
impl Unpin for MetricsExporter
impl !UnwindSafe for MetricsExporter
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request