iroh-metrics 0.31.0

metrics for iroh
Documentation
[package]
name = "iroh-metrics"
version = "0.31.0"
edition = "2021"
readme = "README.md"
description = "metrics for iroh"
license = "MIT OR Apache-2.0"
authors = ["arqu <asmir@n0.computer>", "n0 team"]
repository = "https://github.com/n0-computer/iroh-metrics"

# Sadly this also needs to be updated in .github/workflows/ci.yml
rust-version = "1.81"

[lints.rust]
missing_debug_implementations = "warn"
# We use this --cfg for documenting the cargo features on which an API
# is available.  To preview this locally use: RUSTFLAGS="--cfg
# iroh_docsrs cargo +nightly doc --all-features".  We use our own
# iroh_docsrs instead of the common docsrs to avoid also enabling this
# feature in any dependencies, because some indirect dependencies
# require a feature enabled when using `--cfg docsrs` which we can not
# do.  To enable for a crate set `#![cfg_attr(iroh_docsrs,
# feature(doc_cfg))]` in the crate.
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(iroh_docsrs)"] }

[lints.clippy]
unused-async = "warn"

[dependencies]
erased_set = "0.8"
serde = { version = "1", features = ["derive"] }
struct_iterable = "0.1"
thiserror = "2.0.6"
tracing = "0.1"

# metrics feature
http-body-util = { version = "0.1.0", optional = true }
hyper = { version = "1", features = ["server", "http1"], optional = true }
hyper-util = { version = "0.1.1", features = ["tokio"], optional = true }
prometheus-client = { version = "0.22", optional = true }
reqwest = { version = "0.12", default-features = false, features = ["json", "rustls-tls"], optional = true }
tokio = { version = "1", features = ["rt", "net", "fs"], optional = true }

[dev-dependencies]
tokio = { version = "1", features = ["io-util", "sync", "rt", "net", "fs", "macros", "time", "test-util"] }

[features]
default = ["metrics"]
metrics = [
    "dep:http-body-util",
    "dep:hyper",
    "dep:hyper-util",
    "dep:prometheus-client",
    "dep:reqwest",
    "dep:tokio",
]

[package.metadata.docs.rs]
all-features = true