pub struct MetricExporter { /* private fields */ }
Available on crate feature
metrics
and (crate features http-proto
or http-json
or grpc-tonic
) only.Expand description
Export metrics in OTEL format.
Implementations§
Source§impl MetricExporter
impl MetricExporter
Sourcepub fn builder() -> MetricExporterBuilder<NoExporterBuilderSet>
pub fn builder() -> MetricExporterBuilder<NoExporterBuilderSet>
Obtain a builder to configure a MetricExporter.
Sourcepub fn new(
client: impl MetricsClient,
temporality: Temporality,
) -> MetricExporter
pub fn new( client: impl MetricsClient, temporality: Temporality, ) -> MetricExporter
Create a new metrics exporter
Trait Implementations§
Source§impl Debug for MetricExporter
impl Debug for MetricExporter
Source§impl PushMetricExporter for MetricExporter
impl PushMetricExporter for MetricExporter
Source§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 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. Read more
Source§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 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.
Source§fn temporality(&self) -> Temporality
fn temporality(&self) -> Temporality
Access the Temporality of the MetricExporter.
Auto Trait Implementations§
impl Freeze for MetricExporter
impl !RefUnwindSafe for MetricExporter
impl Send for MetricExporter
impl Sync for MetricExporter
impl Unpin for MetricExporter
impl !UnwindSafe for MetricExporter
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