Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Add more Prometheus metrics #5571

Merged
merged 4 commits into from
Apr 8, 2020
Merged

Add more Prometheus metrics #5571

merged 4 commits into from
Apr 8, 2020

Conversation

tomaka
Copy link
Contributor

@tomaka tomaka commented Apr 8, 2020

cc paritytech/polkadot-sdk#560 (although none of the metrics I added are mentioned in this issue)

I think this adds all the metrics that we might want to have when it comes to low-level connections. Also modifies the connections metric to show the direction ("in" or "out").

I'm going to test this out on my node, but you can start reviewing.

@tomaka tomaka added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes labels Apr 8, 2020
@tomaka tomaka added this to the 2.0 milestone Apr 8, 2020
@tomaka tomaka requested review from romanb and mxinden April 8, 2020 08:22
Copy link
Contributor

@mxinden mxinden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this!

client/network/src/service.rs Outdated Show resolved Hide resolved
client/network/src/service.rs Outdated Show resolved Hide resolved
client/network/src/service.rs Outdated Show resolved Hide resolved
gavofyork and others added 3 commits April 8, 2020 11:12
Co-Authored-By: Max Inden <mail@max-inden.de>
Co-Authored-By: Max Inden <mail@max-inden.de>
Co-Authored-By: Max Inden <mail@max-inden.de>
@gavofyork gavofyork merged commit 967852f into master Apr 8, 2020
@gavofyork gavofyork deleted the tka-moaaaar-prometheus branch April 8, 2020 09:14
client/network/src/service.rs Outdated Show resolved Hide resolved
client/network/src/service.rs Outdated Show resolved Hide resolved
@@ -868,6 +894,13 @@ impl Metrics {
kbuckets_num_nodes: register(Gauge::new(
"sub_libp2p_kbuckets_num_nodes", "Number of nodes in the Kademlia k-buckets"
)?, registry)?,
listeners_local_addresses: register(Gauge::new(
"sub_libp2p_listeners_local_addresses", "Number of local addresses we're listening on"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"sub_libp2p_listeners_local_addresses", "Number of local addresses we're listening on"
"sub_libp2p_listeners_addresses", "Number of addresses we're listening on"

Aren't listener addresses always "local"?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's to differentiate with "external" addresses, that typically contain external IP addresses.

client/network/src/service.rs Outdated Show resolved Hide resolved
tomaka added a commit that referenced this pull request Apr 8, 2020
@tomaka tomaka mentioned this pull request Apr 9, 2020
tomaka added a commit that referenced this pull request Apr 9, 2020
* Report local force-closing connections to Prometheus

* Also report ping timeouts separately

* Address concerns of #5571
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants