Crate richat_metrics

Crate richat_metrics 

Source

Modules§

atomics
Atomic types used for metrics.

Macros§

count
counter
describe
describe_counter
describe_gauge
describe_histogram
gauge
histogram
key_var
metadata_var

Structs§

ConfigMetrics
Counter
A counter.
Gauge
A gauge.
Histogram
A histogram.
Key
A metric identifier.
KeyHasher
Key-specific hashing algorithm.
KeyName
Name component of a key.
Label
Metadata for a metric key in the form of a key/value pair.
Level
Verbosity of a metric.
LocalRecorderGuard
Guard for setting a local recorder.
Metadata
Metadata describing a metric.
NoopRecorder
A no-op recorder.
SetRecorderError
Error returned when trying to install a global recorder when another has already been installed.

Enums§

GaugeValue
Value of a gauge operation.
MaybeRecorder
Unit
Units for a given metric.

Traits§

CounterFn
A counter handler.
GaugeFn
A gauge handler.
HistogramFn
A histogram handler.
IntoF64
An object which can be converted into a f64 representation.
IntoLabels
A value that can be converted to a vector of Labels.
Recorder
A trait for registering and recording metrics.

Functions§

duration_to_seconds
set_default_local_recorder
Sets the recorder as the default for the current thread for the duration of the lifetime of the returned LocalRecorderGuard.
set_global_recorder
Sets the global recorder.
spawn_server
with_local_recorder
Runs the closure with the given recorder set as the global recorder for the duration.
with_recorder
Runs the closure with a reference to the current recorder for this scope.

Type Aliases§

SharedString
An allocation-optimized string.