[][src]Struct metrics_observer_prometheus::PrometheusBuilder

pub struct PrometheusBuilder { /* fields omitted */ }

Builder for PrometheusObserver.

Implementations

impl PrometheusBuilder[src]

pub fn new() -> Self[src]

Creates a new PrometheusBuilder with default values.

pub fn set_quantiles(self, quantiles: &[f64]) -> Self[src]

Sets the quantiles to use when rendering histograms.

Quantiles represent a scale of 0 to 1, where percentiles represent a scale of 1 to 100, so a quantile of 0.99 is the 99th percentile, and a quantile of 0.99 is the 99.9th percentile.

By default, the quantiles will be set to: 0.0, 0.5, 0.9, 0.95, 0.99, 0.999, and 1.0.

pub fn set_buckets(self, values: &[u64]) -> Self[src]

Sets the buckets to use when rendering summaries.

Buckets values represent the higher bound of each buckets.

This option changes the observer's output of histogram-type metric into summaries.

pub fn set_buckets_for_metric(self, name: &str, values: &[u64]) -> Self[src]

Sets the buckets for a specific metric, overidding the default.

Matches the metric name's suffix, the longest match will be used.

This option changes the observer's output of histogram-type metric into summaries. It only affects matching metrics if set_buckets was not used.

Trait Implementations

impl Builder for PrometheusBuilder[src]

type Output = PrometheusObserver

The observer created by this builder.

impl Default for PrometheusBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.