pub struct NoopMetrics;
Expand description
No-op metrics implementation suitable as a default.
Implementations§
Source§impl NoopMetrics
impl NoopMetrics
Trait Implementations§
Source§impl Default for NoopMetrics
impl Default for NoopMetrics
Source§impl Metrics for NoopMetrics
impl Metrics for NoopMetrics
Source§fn incr_counter<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_value: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn incr_counter<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_value: u64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Increment a named counter by
value
.Source§fn record_gauge<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_value: f64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn record_gauge<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_value: f64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Record a gauge metric.
Source§fn start_timer<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn Timer + Send>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn start_timer<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
) -> Pin<Box<dyn Future<Output = Option<Box<dyn Timer + Send>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Start a timer for a named operation. Returns a boxed Timer which should be stopped
when the operation completes. Implementations may return None if timers aren’t supported.
Source§fn record_histogram<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_value: f64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn record_histogram<'life0, 'life1, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_value: f64,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Record a histogram value for a named metric.
Record a histogram value with tags/labels.
Increment a counter with tags/labels.
Record a gauge with tags/labels.
Source§fn record_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_error_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn record_error<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
_name: &'life1 str,
_error_type: &'life2 str,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Record an error occurrence.
Auto Trait Implementations§
impl Freeze for NoopMetrics
impl RefUnwindSafe for NoopMetrics
impl Send for NoopMetrics
impl Sync for NoopMetrics
impl Unpin for NoopMetrics
impl UnwindSafe for NoopMetrics
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