Struct opentelemetry::sdk::trace::Config[][src]

pub struct Config {
    pub sampler: Box<dyn ShouldSample>,
    pub id_generator: Box<dyn IdGenerator>,
    pub span_limits: SpanLimits,
    pub resource: Option<Arc<Resource>>,
}
This is supported on crate feature trace only.
Expand description

Tracer configuration

Fields

sampler: Box<dyn ShouldSample>

The sampler that the sdk should use

id_generator: Box<dyn IdGenerator>

The id generator that the sdk should use

span_limits: SpanLimits

span limits

resource: Option<Arc<Resource>>

Contains attributes representing an entity that produces telemetry.

Implementations

Specify the sampler to be used.

Specify the id generator to be used.

Specify the number of events to be recorded per span.

Specify the number of attributes to be recorded per span.

Specify the number of events to be recorded per span.

Specify the number of attributes one event can have.

Specify the number of attributes one link can have.

Specify all limit via the span_limits

Specify the attributes representing the entity that produces telemetry

Use empty resource instead of default resource in this config.

Usually if no resource is provided, SDK will assign a default resource to the TracerProvider, which could impact the performance. Performance sensitive application can use function to disable such behavior and assign no resource to TracerProvider.

Trait Implementations

Formats the value using the given formatter. Read more

Create default global sdk configuration.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.