Struct opentelemetry_otlp::OtlpMetricPipeline
source · [−]pub struct OtlpMetricPipeline<AS, ES, SP, SO, I, IO> where
AS: AggregatorSelector + Send + Sync + 'static,
ES: ExportKindFor + Send + Sync + Clone + 'static,
SP: Fn(PushControllerWorker) -> SO,
I: Fn(Duration) -> IO, { /* private fields */ }
Expand description
Pipeline to build OTLP metrics exporter
Note that currently the OTLP metrics exporter only supports tonic as it’s grpc layer and tokio as runtime.
Implementations
sourceimpl<AS, ES, SP, SO, I, IO, IOI> OtlpMetricPipeline<AS, ES, SP, SO, I, IO> where
AS: AggregatorSelector + Send + Sync + 'static,
ES: ExportKindFor + Send + Sync + Clone + 'static,
SP: Fn(PushControllerWorker) -> SO,
I: Fn(Duration) -> IO,
IO: Stream<Item = IOI> + Send + 'static,
impl<AS, ES, SP, SO, I, IO, IOI> OtlpMetricPipeline<AS, ES, SP, SO, I, IO> where
AS: AggregatorSelector + Send + Sync + 'static,
ES: ExportKindFor + Send + Sync + Clone + 'static,
SP: Fn(PushControllerWorker) -> SO,
I: Fn(Duration) -> IO,
IO: Stream<Item = IOI> + Send + 'static,
sourcepub fn with_resource<T: IntoIterator<Item = R>, R: Into<KeyValue>>(
self,
resource: T
) -> Self
pub fn with_resource<T: IntoIterator<Item = R>, R: Into<KeyValue>>(
self,
resource: T
) -> Self
Build with resource key value pairs.
sourcepub fn with_exporter<B: Into<MetricsExporterBuilder>>(self, pipeline: B) -> Self
pub fn with_exporter<B: Into<MetricsExporterBuilder>>(self, pipeline: B) -> Self
Build with the exporter
sourcepub fn with_aggregator_selector<T>(
self,
aggregator_selector: T
) -> OtlpMetricPipeline<T, ES, SP, SO, I, IO> where
T: AggregatorSelector + Send + Sync + 'static,
pub fn with_aggregator_selector<T>(
self,
aggregator_selector: T
) -> OtlpMetricPipeline<T, ES, SP, SO, I, IO> where
T: AggregatorSelector + Send + Sync + 'static,
Build with the aggregator selector
sourcepub fn with_spawn(self, spawn: SP) -> Self
pub fn with_spawn(self, spawn: SP) -> Self
Build with spawn function
sourcepub fn with_timeout(self, timeout: Duration) -> Self
pub fn with_timeout(self, timeout: Duration) -> Self
Build with timeout
sourcepub fn with_period(self, period: Duration) -> Self
pub fn with_period(self, period: Duration) -> Self
Build with period, your metrics will be exported with this period
sourcepub fn with_interval(self, interval: I) -> Self
pub fn with_interval(self, interval: I) -> Self
Build with interval function
sourcepub fn with_export_kind<E>(
self,
export_selector: E
) -> OtlpMetricPipeline<AS, E, SP, SO, I, IO> where
E: ExportKindFor + Send + Sync + Clone + 'static,
pub fn with_export_kind<E>(
self,
export_selector: E
) -> OtlpMetricPipeline<AS, E, SP, SO, I, IO> where
E: ExportKindFor + Send + Sync + Clone + 'static,
Build with export kind selector
sourcepub fn build(self) -> Result<PushController>
pub fn build(self) -> Result<PushController>
Build push controller.
Trait Implementations
sourceimpl<AS: Debug, ES: Debug, SP: Debug, SO: Debug, I: Debug, IO: Debug> Debug for OtlpMetricPipeline<AS, ES, SP, SO, I, IO> where
AS: AggregatorSelector + Send + Sync + 'static,
ES: ExportKindFor + Send + Sync + Clone + 'static,
SP: Fn(PushControllerWorker) -> SO,
I: Fn(Duration) -> IO,
impl<AS: Debug, ES: Debug, SP: Debug, SO: Debug, I: Debug, IO: Debug> Debug for OtlpMetricPipeline<AS, ES, SP, SO, I, IO> where
AS: AggregatorSelector + Send + Sync + 'static,
ES: ExportKindFor + Send + Sync + Clone + 'static,
SP: Fn(PushControllerWorker) -> SO,
I: Fn(Duration) -> IO,
Auto Trait Implementations
impl<AS, ES, SP, SO, I, IO> !RefUnwindSafe for OtlpMetricPipeline<AS, ES, SP, SO, I, IO>
impl<AS, ES, SP, SO, I, IO> Send for OtlpMetricPipeline<AS, ES, SP, SO, I, IO> where
I: Send,
SP: Send,
impl<AS, ES, SP, SO, I, IO> Sync for OtlpMetricPipeline<AS, ES, SP, SO, I, IO> where
I: Sync,
SP: Sync,
impl<AS, ES, SP, SO, I, IO> Unpin for OtlpMetricPipeline<AS, ES, SP, SO, I, IO> where
AS: Unpin,
ES: Unpin,
I: Unpin,
SP: Unpin,
impl<AS, ES, SP, SO, I, IO> !UnwindSafe for OtlpMetricPipeline<AS, ES, SP, SO, I, IO>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> FutureExt for T
impl<T> FutureExt for T
sourcefn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
sourcefn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
sourcepub fn into_request(self) -> Request<T>
pub fn into_request(self) -> Request<T>
Wrap the input message T
in a tonic::Request
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more