pub struct MetricsCallBuffer<I>where
I: BufferInstrumentRef,{ /* private fields */ }Expand description
Buffers MetricEvents for periodic consumption by lang
Implementations§
Source§impl<I> MetricsCallBuffer<I>where
I: Clone + BufferInstrumentRef,
impl<I> MetricsCallBuffer<I>where
I: Clone + BufferInstrumentRef,
Trait Implementations§
Source§impl<I> CoreMeter for MetricsCallBuffer<I>
impl<I> CoreMeter for MetricsCallBuffer<I>
Source§fn new_attributes(&self, opts: NewAttributes) -> MetricAttributes
fn new_attributes(&self, opts: NewAttributes) -> MetricAttributes
Given some k/v pairs, create a return a new instantiated instance of metric attributes.
Only MetricAttributes created by this meter can be used when calling record on instruments
created by this meter.
Source§fn extend_attributes(
&self,
existing: MetricAttributes,
attribs: NewAttributes,
) -> MetricAttributes
fn extend_attributes( &self, existing: MetricAttributes, attribs: NewAttributes, ) -> MetricAttributes
Extend some existing attributes with new values. Implementations should create new instances
when doing so, rather than mutating whatever is backing the passed in
existing attributes.
Ideally that new instance retains a ref to the extended old attribute, promoting re-use.Source§fn counter(&self, params: MetricParameters) -> Counter
fn counter(&self, params: MetricParameters) -> Counter
Create a new counter instrument.
Source§fn histogram(&self, params: MetricParameters) -> Histogram
fn histogram(&self, params: MetricParameters) -> Histogram
Create a new histogram instrument recording
u64 values.Source§fn histogram_f64(&self, params: MetricParameters) -> HistogramF64
fn histogram_f64(&self, params: MetricParameters) -> HistogramF64
Create a new histogram instrument recording
f64 values.Source§fn histogram_duration(&self, params: MetricParameters) -> HistogramDuration
fn histogram_duration(&self, params: MetricParameters) -> HistogramDuration
Create a histogram which records Durations. Implementations should choose to emit in
either milliseconds or seconds depending on how they have been configured.
MetricParameters::unit should be overwritten by implementations to be
ms or s
accordingly.Source§fn gauge(&self, params: MetricParameters) -> Gauge
fn gauge(&self, params: MetricParameters) -> Gauge
Create a new gauge instrument recording
u64 values.Source§fn gauge_f64(&self, params: MetricParameters) -> GaugeF64
fn gauge_f64(&self, params: MetricParameters) -> GaugeF64
Create a new gauge instrument recording
f64 values.Source§fn up_down_counter(&self, params: MetricParameters) -> UpDownCounter
fn up_down_counter(&self, params: MetricParameters) -> UpDownCounter
Create a new up-down counter instrument recording
i64 values.Source§fn counter_with_in_memory(
&self,
params: MetricParameters,
in_memory_counter: HeartbeatMetricType,
) -> Counter
fn counter_with_in_memory( &self, params: MetricParameters, in_memory_counter: HeartbeatMetricType, ) -> Counter
Create a counter with in-memory tracking for worker heartbeating reporting
Source§fn histogram_duration_with_in_memory(
&self,
params: MetricParameters,
in_memory_hist: HeartbeatMetricType,
) -> HistogramDuration
fn histogram_duration_with_in_memory( &self, params: MetricParameters, in_memory_hist: HeartbeatMetricType, ) -> HistogramDuration
Create a histogram duration with in-memory tracking for worker heartbeating reporting
Source§fn gauge_with_in_memory(
&self,
params: MetricParameters,
in_memory_metrics: HeartbeatMetricType,
) -> Gauge
fn gauge_with_in_memory( &self, params: MetricParameters, in_memory_metrics: HeartbeatMetricType, ) -> Gauge
Create a gauge with in-memory tracking for worker heartbeating reporting
Source§impl<I> Debug for MetricsCallBuffer<I>where
I: BufferInstrumentRef + Debug,
impl<I> Debug for MetricsCallBuffer<I>where
I: BufferInstrumentRef + Debug,
Source§impl<I> MetricCallBufferer<I> for MetricsCallBuffer<I>
impl<I> MetricCallBufferer<I> for MetricsCallBuffer<I>
Source§fn retrieve(&self) -> Vec<MetricEvent<I>>
fn retrieve(&self) -> Vec<MetricEvent<I>>
Drain and return all buffered metric events.
Auto Trait Implementations§
impl<I> Freeze for MetricsCallBuffer<I>
impl<I> RefUnwindSafe for MetricsCallBuffer<I>
impl<I> Send for MetricsCallBuffer<I>
impl<I> Sync for MetricsCallBuffer<I>
impl<I> Unpin for MetricsCallBuffer<I>
impl<I> UnsafeUnpin for MetricsCallBuffer<I>
impl<I> UnwindSafe for MetricsCallBuffer<I>
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> 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>
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 moreSource§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>
Wrap the input message
T in a tonic::Request