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
- Functions to start services that deal with metrics exposed by 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. - Gauge
- OpenMetrics
Gauge. - Histogram
- OpenMetrics
Histogramto track distributions of values. - Metric
Item - A metric item with its current value.
- Registry
- A registry for
MetricsGroup.
Enums§
- Error
- Potential errors from this library.
- Metric
Type - The types of metrics supported by this crate.
- Metric
Value - The value of an individual metric item.
Traits§
- 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§
- RwLock
Registry - A cloneable
Registryin a read-write lock.
Derive Macros§
- Metrics
Group - Derives
MetricsGroupandIterable. - Metrics
Group Set - Derives
MetricsGroupSetfor a struct.