pub struct ExemplarConfig { /* private fields */ }Expand description
The sampling configuration cell: rate and frequency ceiling as
shared atomics, so a dynamic control can move every sampler
reading the cell with ONE store — push-on-set, no polling, no
per-op control traffic (the cql_trace_rate pattern). Readers
pay one atomic load, and only on the retry path.
Scoping: the activity owns one shared cell for every tries
wrapper that does not pin its own values; an op that declares
retry_exemplar_* params gets a private cell the controls
deliberately do not move (authored matter wins).
Implementations§
Source§impl ExemplarConfig
impl ExemplarConfig
pub fn new(rate: f64, max_hz: f64) -> Self
Sourcepub fn set_rate(&self, rate: f64)
pub fn set_rate(&self, rate: f64)
Publish a new sampling fraction (clamped to [0, 1]; non-finite = off). One atomic store — this IS the dynamic control’s applier body.
Sourcepub fn set_max_hz(&self, max_hz: f64)
pub fn set_max_hz(&self, max_hz: f64)
Publish a new frequency ceiling (events/sec; 0 or
non-finite = uncapped). Converted to an interval here so
admission never divides.
Auto Trait Implementations§
impl !Freeze for ExemplarConfig
impl RefUnwindSafe for ExemplarConfig
impl Send for ExemplarConfig
impl Sync for ExemplarConfig
impl Unpin for ExemplarConfig
impl UnsafeUnpin for ExemplarConfig
impl UnwindSafe for ExemplarConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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