Available on crate feature
component
only.Expand description
Crate-specific metrics functionality.
This module re-exports the contents of the metrics
crate. This is
effectively a way to monkey-patch the functions in this module into the
metrics
crate, at least from the point of view of the other code in this
crate.
Code in this crate that wants to use metrics should use crate::metrics;
,
so that this module shadows the metrics
crate.
This trick is probably good to avoid in general, because it could be confusing, but in this limited case, it seems like a clean option.
Modules§
- Atomic types used for metrics.
Macros§
- Registers a counter.
- Describes a counter.
- Describes a gauge.
- Describes a histogram.
- Registers a gauge.
- Registers a histogram.
Structs§
- A counter.
- A gauge.
- A histogram.
- A metric identifier.
- Key-specific hashing algorithm.
- Name component of a key.
- Metadata for a metric key in the form of a key/value pair.
- Describes the level of verbosity of a metric event.
- Metadata describing a metric event. This provides additional context to
Recorder
, allowing for fine-grained filtering. - A no-op recorder.
- Error returned when trying to install a global recorder when another has already been installed.
Enums§
- Value of a gauge operation.
- Units for a given metric.
Constants§
Traits§
- A counter handler.
- A gauge handler.
- A histogram handler.
- An object which can be converted into a
f64
representation. - A value that can be converted to a vector of
Label
s. - An extension trait providing DEX-related interfaces for [
PrometheusBuilder
]. - A trait for registering and recording metrics.
Functions§
- Registers all metrics used by this crate.
- Sets the global recorder.
- Runs the closure with the given recorder set as the global recorder for the duration.
Type Aliases§
- An allocation-optimized string.