iroh_metrics

Trait MetricsGroup

Source
pub trait MetricsGroup:
    Any
    + Iterable
    + IntoIterable
    + Debug
    + 'static
    + Send
    + Sync {
    // Required method
    fn name(&self) -> &'static str;

    // Provided methods
    fn register(&self, registry: &mut Registry) { ... }
    fn iter(&self) -> MetricsIter<'_>  { ... }
}
Expand description

Trait for structs containing metric items.

Required Methods§

Source

fn name(&self) -> &'static str

Returns the name of this metrics group.

Provided Methods§

Source

fn register(&self, registry: &mut Registry)

Available on crate feature metrics only.

Registers all metric items in this metrics group to a prometheus_client::registry::Registry.

Source

fn iter(&self) -> MetricsIter<'_>

Returns an iterator over all metric items with their values and helps.

Implementors§