Expand description
§metricus
Contains building blocks.
Structs§
- Counter
- Provides methods to create a new counter, increment it, and increment it by a specified amount. It automatically deletes the counter when it is dropped.
- Histogram
- Facilitates the creation of a new histogram, recording of values, and
generation of spans for timing operations.
The
Histogram
does not have an inherent notion of measurement units (e.g., milliseconds, bytes) and some convention should be in place. - Metrics
Handle - Metrics backend handle.
- Span
- Used for measuring how long given operation takes. The duration is recorded in nanoseconds.
Enums§
- PreAllocated
Metric - Pre-allocated metric consists of name, id and tags.
Traits§
- Counter
Ops - Defines a series of operations that can be performed on a
Counter
. - Histogram
Ops - Defines a series of operations that can be performed on a
Histogram
. - Metrics
- Common interface for metrics backend. Each new backend must implement this trait.
Functions§
- empty_
tags - Returns empty tags.
- get_
metrics_ backend_ name - Get name of the active metrics backend.
- set_
metrics - Set a new metrics backend. This should be called as early as possible. Otherwise,
all metrics calls will delegate to the
NoOpMetrics
.