Struct opentelemetry_jaeger::PipelineBuilder
source · [−]pub struct PipelineBuilder { /* private fields */ }
Expand description
Jaeger exporter builder
Implementations
Assign the agent endpoint.
Config whether to export information of instrumentation library.
pub fn with_collector_endpoint<T>(self, collector_endpoint: T) -> Self where
Uri: TryFrom<T>,
<Uri as TryFrom<T>>::Error: Into<InvalidUri>,
This is supported on crate features collector_client
or wasm_collector_client
only.
pub fn with_collector_endpoint<T>(self, collector_endpoint: T) -> Self where
Uri: TryFrom<T>,
<Uri as TryFrom<T>>::Error: Into<InvalidUri>,
collector_client
or wasm_collector_client
only.Assign the collector endpoint.
E.g. “http://localhost:14268/api/traces”
Assign the collector username
Get collector’s username set in the builder. Default to be the value of
OTEL_EXPORTER_JAEGER_USER
environment variable.
If users uses custom http client. This function can help retrieve the value of
OTEL_EXPORTER_JAEGER_USER
environment variable.
Assign the collector password
Get the collector’s password set in the builder. Default to be the value of
OTEL_EXPORTER_JAEGER_PASSWORD
environment variable.
If users uses custom http client. This function can help retrieve the value of
OTEL_EXPORTER_JAEGER_PASSWORD
environment variable.
Assign the process service name.
👎 Deprecated since 0.16.0: please pass those tags as resource in sdk::trace::Config. Then use with_trace_config method to pass the config. All key value pairs in resources will be reported as process tags
please pass those tags as resource in sdk::trace::Config. Then use with_trace_config method to pass the config. All key value pairs in resources will be reported as process tags
Assign the process tags.
Note that resource in trace Config is also reported as process tags in jaeger. If there is duplicate tags between resource and tags. Resource’s value take priority even if it’s empty.
Assign the max packet size in bytes. Jaeger defaults is 65000.
Config whether to auto split batches.
When auto split is set to true, the exporter will try to split the batch into smaller ones so that there will be minimal data loss. It will impact the performance.
Note that if one span is too large to export, other spans within the same batch may or may not be exported. In this case, exporter will return errors as we cannot split spans.
Assign the SDK config for the exporter pipeline.
Examples
Set service name via resource.
use opentelemetry_jaeger::PipelineBuilder;
use opentelemetry::sdk;
use opentelemetry::sdk::Resource;
use opentelemetry::KeyValue;
let pipeline = PipelineBuilder::default()
.with_trace_config(
sdk::trace::Config::default()
.with_resource(Resource::new(vec![KeyValue::new("service.name", "my-service")]))
);
Assign the http client to use
Install a Jaeger pipeline with a simple span processor.
Install a Jaeger pipeline with a batch span processor using the specified runtime.
Build a configured sdk::trace::TracerProvider
with a simple span processor.
pub fn build_batch<R: JaegerTraceRuntime>(
self,
runtime: R
) -> Result<TracerProvider, TraceError>
pub fn build_batch<R: JaegerTraceRuntime>(
self,
runtime: R
) -> Result<TracerProvider, TraceError>
Build a configured sdk::trace::TracerProvider
with a batch span processor using the
specified runtime.
Initialize a new simple exporter.
This is useful if you are manually constructing a pipeline.
pub fn init_async_exporter<R: JaegerTraceRuntime>(
self,
runtime: R
) -> Result<Exporter, TraceError>
pub fn init_async_exporter<R: JaegerTraceRuntime>(
self,
runtime: R
) -> Result<Exporter, TraceError>
Initialize a new exporter.
This is useful if you are manually constructing a pipeline.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for PipelineBuilder
impl Send for PipelineBuilder
impl Sync for PipelineBuilder
impl Unpin for PipelineBuilder
impl !UnwindSafe for PipelineBuilder
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more