pub struct Metrics { /* private fields */ }Implementations§
Source§impl Metrics
impl Metrics
Sourcepub fn new() -> Result<(Self, Registry)>
pub fn new() -> Result<(Self, Registry)>
Build the meter provider wired to a fresh Prometheus registry; returns both.
pub fn record( &self, route: &str, method: &str, status: u16, outcome: &str, secs: f64, )
pub fn upstream_error(&self, route: &str, reason: &str)
pub fn transform_error(&self, route: &str, transform: &str)
Auto Trait Implementations§
impl !RefUnwindSafe for Metrics
impl !UnwindSafe for Metrics
impl Freeze for Metrics
impl Send for Metrics
impl Sync for Metrics
impl Unpin for Metrics
impl UnsafeUnpin for Metrics
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