Skip to content

protocols/gossipsub: Enable the protobuf feature of prometheus-client #2911

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

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion protocols/gossipsub/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ serde = { version = "1", optional = true, features = ["derive"] }
wasm-timer = "0.2.5"
instant = "0.1.11"
# Metrics dependencies
prometheus-client = "0.18.0"
# TODO: Change to v0.19 once the version has been released.
prometheus-client = { git = "https://github.com/ackintosh/client_rust.git", rev = "5e145bb0cb52ab4ff01c862a6117fb61ee107f17", features = ["protobuf"] }

[dev-dependencies]
async-std = "1.6.3"
Expand Down
2 changes: 1 addition & 1 deletion protocols/gossipsub/src/metrics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

use std::collections::HashMap;

use prometheus_client::encoding::text::Encode;
use prometheus_client::encoding::Encode;
use prometheus_client::metrics::counter::Counter;
use prometheus_client::metrics::family::{Family, MetricConstructor};
use prometheus_client::metrics::gauge::Gauge;
Expand Down
2 changes: 1 addition & 1 deletion protocols/gossipsub/src/topic.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

use crate::rpc_proto;
use base64::encode;
use prometheus_client::encoding::text::Encode;
use prometheus_client::encoding::Encode;
use prost::Message;
use sha2::{Digest, Sha256};
use std::fmt;
Expand Down
2 changes: 1 addition & 1 deletion protocols/gossipsub/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
use crate::rpc_proto;
use crate::TopicHash;
use libp2p_core::{connection::ConnectionId, PeerId};
use prometheus_client::encoding::text::Encode;
use prometheus_client::encoding::Encode;
use prost::Message;
use std::fmt;
use std::fmt::Debug;
Expand Down