Skip to main content

NoOpCoreMeter

Struct NoOpCoreMeter 

Source
pub struct NoOpCoreMeter;
Expand description

A CoreMeter implementation that discards all metric recordings.

Trait Implementations§

Source§

impl CoreMeter for NoOpCoreMeter

Source§

fn new_attributes(&self, attribs: 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

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, _: MetricParameters) -> Counter

Create a new counter instrument.
Source§

fn histogram(&self, _: MetricParameters) -> Histogram

Create a new histogram instrument recording u64 values.
Source§

fn histogram_f64(&self, _: MetricParameters) -> HistogramF64

Create a new histogram instrument recording f64 values.
Source§

fn histogram_duration(&self, _: 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, _: MetricParameters) -> Gauge

Create a new gauge instrument recording u64 values.
Source§

fn gauge_f64(&self, _: MetricParameters) -> GaugeF64

Create a new gauge instrument recording f64 values.
Source§

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

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

Create a gauge with in-memory tracking for worker heartbeating reporting
Source§

impl Debug for NoOpCoreMeter

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,