Cargo Features

[dependencies]
iroh-metrics = { version = "0.33.0", default-features = false, features = ["metrics", "service", "static_core"] }
default = metrics

The metrics feature is set by default whenever iroh-metrics is added without default-features = false somewhere in the dependency tree.

metrics default service? static_core?

Enables counters and other metrics being tracked. If disabled, all counters return 0. Macros like inc! will do nothing.

Enables prometheus-client ^0.22

metrics feature

Affects base::MetricsGroup.register, base::MetricsGroupSet.register

service = metrics

Enables functionality to run a local metrics server that current metrics are served at in prometheus format.
Pulls in quite a few libraries to make exposing an HTTP server possible.

Enables http-body-util, hyper, hyper-util, reqwest, and tokio

http-body-util:

service feature

Affects iroh-metrics::service, static_core::GlobalRegistry

static_core = metrics

Enables a global, static metrics collector

Enables erased_set

static_core feature

Affects iroh-metrics::static_core