pub struct PrometheusHandler {}Expand description
Prometheus metrics handler for Axum
Implementations§
Source§impl PrometheusHandler
impl PrometheusHandler
Sourcepub fn get_handle() -> Result<PrometheusHandle, ApiError>
pub fn get_handle() -> Result<PrometheusHandle, ApiError>
Install the global Prometheus recorder using
DEFAULT_DURATION_BUCKETS for the request-duration histogram.
Sourcepub fn get_handle_with_buckets(
buckets: &[f64],
) -> Result<PrometheusHandle, ApiError>
pub fn get_handle_with_buckets( buckets: &[f64], ) -> Result<PrometheusHandle, ApiError>
Install the global Prometheus recorder with custom histogram buckets
(in seconds) for http_requests_duration_seconds. Use this when the
default bucket distribution does not match your service’s latency
profile.
Auto Trait Implementations§
impl Freeze for PrometheusHandler
impl RefUnwindSafe for PrometheusHandler
impl Send for PrometheusHandler
impl Sync for PrometheusHandler
impl Unpin for PrometheusHandler
impl UnsafeUnpin for PrometheusHandler
impl UnwindSafe for PrometheusHandler
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