Crate metricus

Crate metricus 

Source
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.
MetricsHandle
Metrics backend handle.
Span
Used for measuring how long given operation takes. The duration is recorded in nanoseconds.

Enums§

PreAllocatedMetric
Pre-allocated metric consists of name, id and tags.

Traits§

CounterOps
Defines a series of operations that can be performed on a Counter.
HistogramOps
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.

Type Aliases§

Id
Metric id.
Tag
Metric tag expresses as key-value pair.
Tags
Metrics tags expresses as array of key-value pairs.