Struct ore::metrics::MetricsRegistry [−][src]
metrics
only.Expand description
The materialize metrics registry.
Fields
inner: Registry
third_party: Registry
Implementations
Register a metric defined with the metric
macro.
pub fn register_computed_gauge<F, P>(
&self,
opts: Opts,
f: F
) -> ComputedGenericGauge<P> where
F: Fn() -> P::T + Send + Sync + 'static,
P: Atomic + 'static,
pub fn register_computed_gauge<F, P>(
&self,
opts: Opts,
f: F
) -> ComputedGenericGauge<P> where
F: Fn() -> P::T + Send + Sync + 'static,
P: Atomic + 'static,
Registers a gauge whose value is computed when observed.
pub fn register_third_party_visible<M>(&self, opts: Opts) -> ThirdPartyMetric<M> where
M: MakeCollector,
pub fn register_third_party_visible<M>(&self, opts: Opts) -> ThirdPartyMetric<M> where
M: MakeCollector,
Register a metric that can be scraped from both the “normal” registry, as well as the registry that is accessible to third parties (like cloud providers and infrastructure orchestrators).
Take care to vet metrics that are visible to third parties: metrics containing sensitive information as labels (e.g. source/sink names or other user-defined identifiers), or “traffic” type labels can lead to information getting exposed that users might not be comfortable sharing.
Register a pre-defined prometheus collector.
Gather all the metrics from the metrics registry for reporting.
See also prometheus::Registry::gather
.
pub fn gather_third_party_visible(&self) -> Vec<MetricFamily>ⓘ
pub fn gather_third_party_visible(&self) -> Vec<MetricFamily>ⓘ
Gather all the metrics from the metrics registry that’s visible to third parties.
See also prometheus::Registry::gather
.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for MetricsRegistry
impl Send for MetricsRegistry
impl Sync for MetricsRegistry
impl Unpin for MetricsRegistry
impl !UnwindSafe for MetricsRegistry
Blanket Implementations
Mutably borrows from an owned value. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more