pub struct MetricsGuard { /* private fields */ }Expand description
RAII guard that tracks one in-flight request.
On creation, increments the http_active_requests gauge.
Call .record(status) to record the request counter + latency histogram.
On drop, decrements the gauge.
Implementations§
Trait Implementations§
Source§impl Drop for MetricsGuard
Available on crate feature metrics only.
impl Drop for MetricsGuard
Available on crate feature
metrics only.Auto Trait Implementations§
impl Freeze for MetricsGuard
impl RefUnwindSafe for MetricsGuard
impl Send for MetricsGuard
impl Sync for MetricsGuard
impl Unpin for MetricsGuard
impl UnsafeUnpin for MetricsGuard
impl UnwindSafe for MetricsGuard
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