pub struct MetricsLayer<I: MetricsIntercept> { /* private fields */ }Expand description
MetricsLayer reports operation and HTTP metrics to an interceptor.
The layer wraps both the storage service and the HTTP transport in the
operator’s [OperationContext]. It reports the metric names and labels
documented in the crate-level metrics reference through
MetricsIntercept::observe.
The interceptor must be cheap to clone because each wrapped operation and HTTP request can retain a clone.
Implementations§
Source§impl<I: MetricsIntercept> MetricsLayer<I>
impl<I: MetricsIntercept> MetricsLayer<I>
Trait Implementations§
Source§impl<I: Clone + MetricsIntercept> Clone for MetricsLayer<I>
impl<I: Clone + MetricsIntercept> Clone for MetricsLayer<I>
Source§fn clone(&self) -> MetricsLayer<I>
fn clone(&self) -> MetricsLayer<I>
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<I: Debug + MetricsIntercept> Debug for MetricsLayer<I>
impl<I: Debug + MetricsIntercept> Debug for MetricsLayer<I>
Source§impl<I: MetricsIntercept> Layer for MetricsLayer<I>
impl<I: MetricsIntercept> Layer for MetricsLayer<I>
Source§fn apply_service(&self, inner: Servicer) -> Servicer
fn apply_service(&self, inner: Servicer) -> Servicer
Intercept the operation service stack. Read more
Source§fn apply_context(
&self,
srv: Servicer,
inner: OperationContext,
) -> OperationContext
fn apply_context( &self, srv: Servicer, inner: OperationContext, ) -> OperationContext
Intercept the operation context (HTTP transport and executor). Read more
Auto Trait Implementations§
impl<I> Freeze for MetricsLayer<I>where
I: Freeze,
impl<I> RefUnwindSafe for MetricsLayer<I>where
I: RefUnwindSafe,
impl<I> Send for MetricsLayer<I>
impl<I> Sync for MetricsLayer<I>
impl<I> Unpin for MetricsLayer<I>
impl<I> UnsafeUnpin for MetricsLayer<I>where
I: UnsafeUnpin,
impl<I> UnwindSafe for MetricsLayer<I>where
I: UnwindSafe,
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