pub struct PrometheusObserver { /* private fields */ }Expand description
Publishes DialCache diagnostics to Prometheus collectors.
Clones share the collectors; hand one observer to every instance that exports to the same registry.
Implementations§
Source§impl PrometheusObserver
impl PrometheusObserver
Sourcepub fn new(
registry: &Registry,
prefix: &str,
) -> Result<PrometheusObserver, PrometheusError>
pub fn new( registry: &Registry, prefix: &str, ) -> Result<PrometheusObserver, PrometheusError>
Register the DialCache collectors named <prefix>dialcache_* on
registry. Registering the same names twice on one registry is a
PrometheusError::Conflict: clone the observer instead.
Sourcepub fn schemas(&self) -> Vec<CollectorSchema>
pub fn schemas(&self) -> Vec<CollectorSchema>
The wire schemas of this observer’s collectors.
Trait Implementations§
Source§impl Clone for PrometheusObserver
impl Clone for PrometheusObserver
Source§fn clone(&self) -> PrometheusObserver
fn clone(&self) -> PrometheusObserver
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrometheusObserver
impl Debug for PrometheusObserver
Source§impl Observer for PrometheusObserver
impl Observer for PrometheusObserver
Auto Trait Implementations§
impl !RefUnwindSafe for PrometheusObserver
impl !UnwindSafe for PrometheusObserver
impl Freeze for PrometheusObserver
impl Send for PrometheusObserver
impl Sync for PrometheusObserver
impl Unpin for PrometheusObserver
impl UnsafeUnpin for PrometheusObserver
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