Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gossipsub] Add optional metrics #2235

Closed
wants to merge 13 commits into from
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ floodsub = ["libp2p-floodsub"]
identify = ["libp2p-identify", "libp2p-metrics/identify"]
kad = ["libp2p-kad", "libp2p-metrics/kad"]
gossipsub = ["libp2p-gossipsub"]
gossipsub-metrics = ["libp2p-gossipsub/metrics"]
metrics = ["libp2p-metrics"]
mdns = ["libp2p-mdns"]
mplex = ["libp2p-mplex"]
Expand Down
10 changes: 4 additions & 6 deletions protocols/gossipsub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,10 @@ repository = "https://github.com/libp2p/rust-libp2p"
keywords = ["peer-to-peer", "libp2p", "networking"]
categories = ["network-programming", "asynchronous"]


[features]
metrics = ["strum", "strum_macros"]

[dependencies]
libp2p-swarm = { version = "0.31.0", path = "../../swarm" }
libp2p-core = { version = "0.30.0", path = "../../core", default-features = false }
libp2p-metrics = { path = "../../misc/metrics"}
bytes = "1.0"
byteorder = "1.3.4"
fnv = "1.0.7"
Expand All @@ -32,8 +29,9 @@ prost = "0.8"
hex_fmt = "0.3.0"
regex = "1.4.0"
# Metrics dependencies
strum = { version = "0.21", optional = true }
strum_macros = { version = "0.21", optional = true}
open-metrics-client = "0.12.0"
strum = "0.21"
strum_macros = "0.21"

[dev-dependencies]
async-std = "1.6.3"
Expand Down
Loading