Expand description
Metrics library for iroh
Modules§
- encoding
- Functions to encode metrics into the OpenMetrics text format.
- iterable
- Traits for iterating over the fields of structs.
- service
- Background services that expose or forward metrics from this crate.
- static_
core - Metrics collection in a static, process-level global metrics collector.
Macros§
- dec
- Decrements the given metric by 1.
- dec_by
- Decrements the given metric by
n. - inc
- Increments the given metric by 1.
- inc_by
- Increments the given metric by
n. - set
- Sets the given metric to
n.
Structs§
- Counter
- OpenMetrics
Counterto measure discrete events. - Family
- A family of metrics indexed by labels.
- Family
Item - A family metric item for iteration.
- Gauge
- OpenMetrics
Gauge. - Histogram
- OpenMetrics
Histogramto track distributions of values. - Metric
Item - A metric item with its current value.
- NoLabels
- Empty label set for metrics that don’t need labels.
- Registry
- A registry for
MetricsGroup.
Enums§
- Error
- Potential errors from this library.
- Label
Value - A label value that can be encoded as a string for OpenMetrics output.
- Metric
Type - The types of metrics supported by this crate.
- Metric
Value - The value of an individual metric item.
Traits§
- Encode
Label Set - Trait for types that can be encoded as a set of labels.
- Encode
Label Value - Encodes a single field as a
LabelValue. - Family
Encoder - Type-erased encoding interface for a
Family. - Metric
- Trait for metric items.
- Metrics
Group - Trait for structs containing metric items.
- Metrics
Group Set - Trait for a set of structs implementing
MetricsGroup. - Metrics
Source - Helper trait to abstract over different ways to access metrics.
Functions§
- parse_
prometheus_ metrics - Parses Prometheus metrics from a string.
Type Aliases§
- Label
Pair - A key-value label pair.
- RwLock
Registry - A cloneable
Registryin a read-write lock.
Derive Macros§
- Encode
Label Set - Derives
EncodeLabelSetfor a struct. - Encode
Label Value - Derives
EncodeLabelValuefor an enum with only unit variants. - Metrics
Group - Derives
MetricsGroupandIterable. - Metrics
Group Set - Derives
MetricsGroupSetfor a struct.