Cargo Features

[dependencies]
iroh-metrics = { version = "0.32.0", default-features = false, features = ["metrics", "service"] }
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?

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 core::Counter.counter, core::Gauge.gauge, core::Metric.new, core::Metric.with_metric

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::metrics