pub struct TracingConfig {
pub service_name: String,
pub max_traces: usize,
pub max_spans_per_trace: usize,
pub sampling_rate: f64,
pub enable_baggage: bool,
pub export_interval: Duration,
pub retention_period: Duration,
}Expand description
Tracing configuration
Fields§
§service_name: StringService name for this tracer instance
max_traces: usizeMaximum number of traces to retain
max_spans_per_trace: usizeMaximum number of spans per trace
sampling_rate: f64Sampling rate (0.0 to 1.0)
enable_baggage: boolEnable baggage propagation
export_interval: DurationAuto-export interval
retention_period: DurationTrace retention period
Implementations§
Source§impl TracingConfig
impl TracingConfig
Sourcepub fn max_traces(self, max: usize) -> Self
pub fn max_traces(self, max: usize) -> Self
Set maximum traces
Sourcepub fn sampling_rate(self, rate: f64) -> Self
pub fn sampling_rate(self, rate: f64) -> Self
Set sampling rate
Sourcepub fn export_interval(self, interval: Duration) -> Self
pub fn export_interval(self, interval: Duration) -> Self
Set export interval
Trait Implementations§
Source§impl Clone for TracingConfig
impl Clone for TracingConfig
Source§fn clone(&self) -> TracingConfig
fn clone(&self) -> TracingConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TracingConfig
impl Debug for TracingConfig
Auto Trait Implementations§
impl Freeze for TracingConfig
impl RefUnwindSafe for TracingConfig
impl Send for TracingConfig
impl Sync for TracingConfig
impl Unpin for TracingConfig
impl UnwindSafe for TracingConfig
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more