Skip to content

Commit 44817d7

Browse files
committed
feature gate metrics code
1 parent 4a72161 commit 44817d7

10 files changed

Lines changed: 126 additions & 61 deletions

File tree

protocols/gossipsub/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
## 0.49.0
2+
- Feature gate metrics related code. This changes some `Behaviour` constructor methods.
3+
See [PR XXXX](https://github.com/libp2p/rust-libp2p/pull/XXXX)
24
- Send IDONTWANT before Publishing a new message.
35
See [PR 6017](https://github.com/libp2p/rust-libp2p/pull/6017)
46

protocols/gossipsub/Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ categories = ["network-programming", "asynchronous"]
1212

1313
[features]
1414
wasm-bindgen = ["getrandom/js", "futures-timer/wasm-bindgen"]
15+
metrics = ["prometheus-client"]
1516

1617
[dependencies]
1718
async-channel = "2.3.1"
@@ -24,7 +25,7 @@ fnv = "1.0.7"
2425
futures = { workspace = true }
2526
futures-timer = "3.0.2"
2627
getrandom = { workspace = true }
27-
hashlink = { workspace = true}
28+
hashlink = { workspace = true }
2829
hex_fmt = "0.3.0"
2930
web-time = { workspace = true }
3031
libp2p-core = { workspace = true }
@@ -39,7 +40,7 @@ sha2 = "0.10.8"
3940
tracing = { workspace = true }
4041

4142
# Metrics dependencies
42-
prometheus-client = { workspace = true }
43+
prometheus-client = { workspace = true, optional = true }
4344

4445
[dev-dependencies]
4546
libp2p-core = { workspace = true }

0 commit comments

Comments
 (0)