pub struct AggregatedMetricsState { /* private fields */ }Expand description
Aggregated metrics state.
Implementations§
Source§impl AggregatedMetricsState
impl AggregatedMetricsState
Sourcepub fn visit_metrics<F>(&self, visitor: F)where
F: FnMut(&Context, &AggregatedMetricValue),
pub fn visit_metrics<F>(&self, visitor: F)where
F: FnMut(&Context, &AggregatedMetricValue),
Visits all metrics.
Searches the state for a single metric with a matching name and tags.
The latest value for the metric is returned. Histograms are skipped.
If no metric is found with a matching name and tags, or if multiple metrics are found with a matching name and
tags, None is returned. Tags are matched on a partial basis: a metric must at least have the tags provided,
but may have additional tags as well.
Searches the state for all counter metrics with a matching name and returns their aggregated value.
This method allows rolling up counter metrics that share a common name. For example, a metric may be emitted with the same name, but N different values for a specific tag, potentially as a way to break down the metric by a certain facet. This method can allow re-aggregating the value of each different facet value into a single value.
If multiple metrics are found with a matching name, but they’re not all counter metrics, or if no metrics are
found with a matching name, 0.0 is returned.
Auto Trait Implementations§
impl Freeze for AggregatedMetricsState
impl RefUnwindSafe for AggregatedMetricsState
impl Send for AggregatedMetricsState
impl Sync for AggregatedMetricsState
impl Unpin for AggregatedMetricsState
impl UnsafeUnpin for AggregatedMetricsState
impl UnwindSafe for AggregatedMetricsState
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> 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::RequestSource§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Track for T
impl<T> Track for T
§fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
fn track_resources(self, token: ResourceGroupToken) -> Tracked<Self>
Tracked wrapper. Read more§fn in_current_resource_group(self) -> Tracked<Self>
fn in_current_resource_group(self) -> Tracked<Self>
Tracked wrapper. Read more