pub struct OtlpTracePipeline<EB> { /* private fields */ }
Expand description
Recommended configuration for an OTLP exporter pipeline.
§Examples
let tracing_pipeline = opentelemetry_otlp::new_pipeline().tracing();
Implementations§
Source§impl<EB> OtlpTracePipeline<EB>
impl<EB> OtlpTracePipeline<EB>
Sourcepub fn with_trace_config(self, trace_config: Config) -> Self
pub fn with_trace_config(self, trace_config: Config) -> Self
Set the trace provider configuration.
Sourcepub fn with_batch_config(self, batch_config: BatchConfig) -> Self
pub fn with_batch_config(self, batch_config: BatchConfig) -> Self
Set the batch span processor configuration, and it will override the env vars.
Source§impl OtlpTracePipeline<NoExporterConfig>
impl OtlpTracePipeline<NoExporterConfig>
Sourcepub fn with_exporter<B: Into<SpanExporterBuilder>>(
self,
pipeline: B,
) -> OtlpTracePipeline<SpanExporterBuilder>
pub fn with_exporter<B: Into<SpanExporterBuilder>>( self, pipeline: B, ) -> OtlpTracePipeline<SpanExporterBuilder>
Set the OTLP span exporter builder.
Note that the pipeline will not build the exporter until install_batch
or install_simple
is called.
Source§impl OtlpTracePipeline<SpanExporterBuilder>
impl OtlpTracePipeline<SpanExporterBuilder>
Sourcepub fn install_simple(self) -> Result<TracerProvider, TraceError>
pub fn install_simple(self) -> Result<TracerProvider, TraceError>
Install the configured span exporter.
Returns a TracerProvider
.
Sourcepub fn install_batch<R: RuntimeChannel>(
self,
runtime: R,
) -> Result<TracerProvider, TraceError>
pub fn install_batch<R: RuntimeChannel>( self, runtime: R, ) -> Result<TracerProvider, TraceError>
Install the configured span exporter and a batch span processor using the specified runtime.
Returns a TracerProvider
.
install_batch
will panic if not called within a tokio runtime
Trait Implementations§
Auto Trait Implementations§
impl<EB> Freeze for OtlpTracePipeline<EB>where
EB: Freeze,
impl<EB> !RefUnwindSafe for OtlpTracePipeline<EB>
impl<EB> Send for OtlpTracePipeline<EB>where
EB: Send,
impl<EB> Sync for OtlpTracePipeline<EB>where
EB: Sync,
impl<EB> Unpin for OtlpTracePipeline<EB>where
EB: Unpin,
impl<EB> !UnwindSafe for OtlpTracePipeline<EB>
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