pub struct PrometheusClientLayerBuilder { /* private fields */ }Expand description
PrometheusClientLayerBuilder is a config builder to build a PrometheusClientLayer.
Implementations§
Source§impl PrometheusClientLayerBuilder
impl PrometheusClientLayerBuilder
Sourcepub fn bytes_buckets(self, buckets: Vec<f64>) -> Self
pub fn bytes_buckets(self, buckets: Vec<f64>) -> Self
Set buckets for bytes related histogram like operation_bytes.
Sourcepub fn bytes_rate_buckets(self, buckets: Vec<f64>) -> Self
pub fn bytes_rate_buckets(self, buckets: Vec<f64>) -> Self
Set buckets for bytes rate related histogram like operation_bytes_rate.
Sourcepub fn entries_buckets(self, buckets: Vec<f64>) -> Self
pub fn entries_buckets(self, buckets: Vec<f64>) -> Self
Set buckets for entries related histogram like operation_entries.
Sourcepub fn entries_rate_buckets(self, buckets: Vec<f64>) -> Self
pub fn entries_rate_buckets(self, buckets: Vec<f64>) -> Self
Set buckets for entries rate related histogram like operation_entries_rate.
Sourcepub fn duration_seconds_buckets(self, buckets: Vec<f64>) -> Self
pub fn duration_seconds_buckets(self, buckets: Vec<f64>) -> Self
Set buckets for duration seconds related histogram like operation_duration_seconds.
Sourcepub fn ttfb_buckets(self, buckets: Vec<f64>) -> Self
pub fn ttfb_buckets(self, buckets: Vec<f64>) -> Self
Set buckets for ttfb related histogram like operation_ttfb_seconds.
Sourcepub fn disable_label_root(self, disable: bool) -> Self
pub fn disable_label_root(self, disable: bool) -> Self
The ‘root’ label might have risks of being high cardinality, users can choose to disable it when they found it’s not useful for their metrics.
Sourcepub fn register(self, registry: &mut Registry) -> PrometheusClientLayer
pub fn register(self, registry: &mut Registry) -> PrometheusClientLayer
Register the metrics into the registry and return a PrometheusClientLayer.
§Example
// Pick a builder and configure it.
let builder = services::Memory::default();
let mut registry = prometheus_client::registry::Registry::default();
let _ = Operator::new(builder)?
.layer(PrometheusClientLayer::builder().register(&mut registry))
.finish();Trait Implementations§
Auto Trait Implementations§
impl Freeze for PrometheusClientLayerBuilder
impl RefUnwindSafe for PrometheusClientLayerBuilder
impl Send for PrometheusClientLayerBuilder
impl Sync for PrometheusClientLayerBuilder
impl Unpin for PrometheusClientLayerBuilder
impl UnsafeUnpin for PrometheusClientLayerBuilder
impl UnwindSafe for PrometheusClientLayerBuilder
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