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

feat(metrics)!: expose identify metrics for connected peers only #3325

Merged
merged 10 commits into from
May 15, 2023
28 changes: 25 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion misc/metrics/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ libp2p-ping = { version = "0.42.0", path = "../../protocols/ping", optional = tr
libp2p-relay = { version = "0.15.0", path = "../../protocols/relay", optional = true }
libp2p-swarm = { version = "0.42.0", path = "../../swarm" }
libp2p-identity = { version = "0.1.0", path = "../../identity" }
prometheus-client = "0.19.0"
prometheus-client = { git = "https://github.com/prometheus/client_rust.git", branch = "master" }
once_cell = "1.16.0"

[target.'cfg(not(target_os = "unknown"))'.dependencies]
libp2p-gossipsub = { version = "0.44.0", path = "../../protocols/gossipsub", optional = true }
Expand Down
2 changes: 1 addition & 1 deletion misc/metrics/examples/metrics/http_service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const METRICS_CONTENT_TYPE: &str = "application/openmetrics-text;charset=utf-8;v

pub async fn metrics_server(registry: Registry) -> Result<(), std::io::Error> {
// Serve on localhost.
let addr = ([127, 0, 0, 1], 0).into();
let addr = ([127, 0, 0, 1], 8080).into();

// Use the tokio runtime to run the hyper server.
let rt = tokio::runtime::Runtime::new()?;
Expand Down
Loading