Struct opentelemetry_otlp::OtlpTracePipeline
source · pub struct OtlpTracePipeline { /* private fields */ }
Available on crate feature
trace
only.Expand description
Recommended configuration for an OTLP exporter pipeline.
Examples
let tracing_pipeline = opentelemetry_otlp::new_pipeline().tracing();
Implementations§
source§impl OtlpTracePipeline
impl OtlpTracePipeline
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.
sourcepub fn with_exporter<B: Into<SpanExporterBuilder>>(self, pipeline: B) -> Self
pub fn with_exporter<B: Into<SpanExporterBuilder>>(self, pipeline: B) -> Self
Set the OTLP span exporter builder.
Note that the pipeline will not build the exporter until install_batch
or install_simple
is called.
sourcepub fn install_simple(self) -> Result<Tracer, TraceError>
pub fn install_simple(self) -> Result<Tracer, TraceError>
Install the configured span exporter.
Returns a Tracer
with the name opentelemetry-otlp
and current crate version.
sourcepub fn install_batch<R: RuntimeChannel<BatchMessage>>(
self,
runtime: R
) -> Result<Tracer, TraceError>
pub fn install_batch<R: RuntimeChannel<BatchMessage>>( self, runtime: R ) -> Result<Tracer, TraceError>
Install the configured span exporter and a batch span processor using the specified runtime.
Returns a Tracer
with the name opentelemetry-otlp
and current crate version.
install_batch
will panic if not called within a tokio runtime
Trait Implementations§
source§impl Debug for OtlpTracePipeline
impl Debug for OtlpTracePipeline
source§impl Default for OtlpTracePipeline
impl Default for OtlpTracePipeline
source§fn default() -> OtlpTracePipeline
fn default() -> OtlpTracePipeline
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for OtlpTracePipeline
impl Send for OtlpTracePipeline
impl !Sync for OtlpTracePipeline
impl Unpin for OtlpTracePipeline
impl !UnwindSafe for OtlpTracePipeline
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