pub struct PrometheusRecorder { /* private fields */ }
Expand description
Records metrics in the Prometheus exposition format.
Implementations§
Source§impl PrometheusRecorder
impl PrometheusRecorder
Sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new PrometheusRecorder
with a default set of quantiles.
Configures the recorder with these default quantiles: 0.0, 0.5, 0.9, 0.95, 0.99, 0.999, and
1.0. If you want to customize the quantiles used, you can call
PrometheusRecorder::with_quantiles
.
The configured quantiles are used when rendering any histograms.
Sourcepub fn with_quantiles(quantiles: &[f64]) -> Self
pub fn with_quantiles(quantiles: &[f64]) -> Self
Creates a new PrometheusRecorder
with the given set of quantiles.
The configured quantiles are used when rendering any histograms.
Trait Implementations§
Source§impl Clone for PrometheusRecorder
impl Clone for PrometheusRecorder
Source§impl Into<String> for PrometheusRecorder
impl Into<String> for PrometheusRecorder
Source§impl Recorder for PrometheusRecorder
impl Recorder for PrometheusRecorder
Auto Trait Implementations§
impl Freeze for PrometheusRecorder
impl RefUnwindSafe for PrometheusRecorder
impl Send for PrometheusRecorder
impl Sync for PrometheusRecorder
impl Unpin for PrometheusRecorder
impl UnwindSafe for PrometheusRecorder
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