pub struct DynamicCounterSetSeries { /* private fields */ }Expand description
A reusable handle to one dynamic-label grouped counter series.
Resolve this once with DynamicCounterSet::get_or_create or
DynamicCounterSet::series, then use index-based methods on hot paths.
Implementations§
Source§impl DynamicCounterSetSeries
impl DynamicCounterSetSeries
Sourcepub fn add_index(&self, counter_idx: usize, value: isize)
pub fn add_index(&self, counter_idx: usize, value: isize)
Add value to one pre-resolved counter index.
Sourcepub fn add_values(&self, updates: &[(&str, isize)])
pub fn add_values(&self, updates: &[(&str, isize)])
Add named counter values in one grouped call.
Sourcepub fn add_index_values(&self, updates: &[(usize, isize)])
pub fn add_index_values(&self, updates: &[(usize, isize)])
Add pre-resolved (counter_idx, value) updates in one grouped call.
Sourcepub fn add_all_values(&self, values: &[isize])
pub fn add_all_values(&self, values: &[isize])
Add one value for every counter in index order.
Sourcepub fn get_index(&self, counter_idx: usize) -> isize
pub fn get_index(&self, counter_idx: usize) -> isize
Return the current total for one pre-resolved counter index.
Sourcepub fn counter_index(&self, counter: &str) -> Option<usize>
pub fn counter_index(&self, counter: &str) -> Option<usize>
Return the index for counter, if it exists in this grouped set.
Sourcepub fn counter_names(&self) -> &[String]
pub fn counter_names(&self) -> &[String]
Return counter names in index order.
Sourcepub fn is_evicted(&self) -> bool
pub fn is_evicted(&self) -> bool
Check if this series handle has been evicted.
If true, writes go to a detached series that is no longer exported.
Callers holding long-lived handles can check this and re-resolve via
DynamicCounterSet::series if needed.
Trait Implementations§
Source§impl Clone for DynamicCounterSetSeries
impl Clone for DynamicCounterSetSeries
Source§fn clone(&self) -> DynamicCounterSetSeries
fn clone(&self) -> DynamicCounterSetSeries
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for DynamicCounterSetSeries
impl RefUnwindSafe for DynamicCounterSetSeries
impl Send for DynamicCounterSetSeries
impl Sync for DynamicCounterSetSeries
impl Unpin for DynamicCounterSetSeries
impl UnsafeUnpin for DynamicCounterSetSeries
impl UnwindSafe for DynamicCounterSetSeries
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request