pub struct Config {
pub sampler: Box<dyn ShouldSample + 'static, Global>,
pub id_generator: Box<dyn IdGenerator + 'static, Global>,
pub span_limits: SpanLimits,
pub resource: Cow<'static, Resource>,
}
Available on crate feature
trace
only.Expand description
Tracer configuration
Fields
sampler: Box<dyn ShouldSample + 'static, Global>
The sampler that the sdk should use
id_generator: Box<dyn IdGenerator + 'static, Global>
The id generator that the sdk should use
span_limits: SpanLimits
span limits
resource: Cow<'static, Resource>
Contains attributes representing an entity that produces telemetry.
Implementations
sourceimpl Config
impl Config
sourcepub fn with_sampler<T>(self, sampler: T) -> Configwhere
T: 'static + ShouldSample,
pub fn with_sampler<T>(self, sampler: T) -> Configwhere
T: 'static + ShouldSample,
Specify the sampler to be used.
sourcepub fn with_id_generator<T>(self, id_generator: T) -> Configwhere
T: 'static + IdGenerator,
pub fn with_id_generator<T>(self, id_generator: T) -> Configwhere
T: 'static + IdGenerator,
Specify the id generator to be used.
sourcepub fn with_max_events_per_span(self, max_events: u32) -> Config
pub fn with_max_events_per_span(self, max_events: u32) -> Config
Specify the number of events to be recorded per span.
sourcepub fn with_max_attributes_per_span(self, max_attributes: u32) -> Config
pub fn with_max_attributes_per_span(self, max_attributes: u32) -> Config
Specify the number of attributes to be recorded per span.
sourcepub fn with_max_links_per_span(self, max_links: u32) -> Config
pub fn with_max_links_per_span(self, max_links: u32) -> Config
Specify the number of events to be recorded per span.
sourcepub fn with_max_attributes_per_event(self, max_attributes: u32) -> Config
pub fn with_max_attributes_per_event(self, max_attributes: u32) -> Config
Specify the number of attributes one event can have.
sourcepub fn with_max_attributes_per_link(self, max_attributes: u32) -> Config
pub fn with_max_attributes_per_link(self, max_attributes: u32) -> Config
Specify the number of attributes one link can have.
sourcepub fn with_span_limits(self, span_limits: SpanLimits) -> Config
pub fn with_span_limits(self, span_limits: SpanLimits) -> Config
Specify all limit via the span_limits
sourcepub fn with_resource(self, resource: Resource) -> Config
pub fn with_resource(self, resource: Resource) -> Config
Specify the attributes representing the entity that produces telemetry
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl !UnwindSafe for Config
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more