Struct opentelemetry::sdk::trace::Builder
source · pub struct Builder { /* private fields */ }
Available on crate feature
trace
only.Expand description
Builder for provider attributes.
Implementations§
source§impl Builder
impl Builder
sourcepub fn with_simple_exporter<T>(self, exporter: T) -> Builderwhere
T: SpanExporter + 'static,
pub fn with_simple_exporter<T>(self, exporter: T) -> Builderwhere T: SpanExporter + 'static,
The SpanExporter
that this provider should use.
sourcepub fn with_batch_exporter<T, R>(self, exporter: T, runtime: R) -> Builderwhere
T: SpanExporter + 'static,
R: TraceRuntime,
pub fn with_batch_exporter<T, R>(self, exporter: T, runtime: R) -> Builderwhere T: SpanExporter + 'static, R: TraceRuntime,
The SpanExporter
setup using a default BatchSpanProcessor
that this provider should use.
sourcepub fn with_span_processor<T>(self, processor: T) -> Builderwhere
T: SpanProcessor + 'static,
pub fn with_span_processor<T>(self, processor: T) -> Builderwhere T: SpanProcessor + 'static,
The SpanProcessor
that this provider should use.
sourcepub fn with_config(self, config: Config) -> Builder
pub fn with_config(self, config: Config) -> Builder
The sdk crate::trace::Config
that this provider will use.
sourcepub fn build(self) -> TracerProvider
pub fn build(self) -> TracerProvider
Create a new provider from this configuration.