This repository was archived by the owner on Nov 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Several tweaks to networking Prometheus metrics #5636
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mxinden
reviewed
Apr 14, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mxinden Sorry to make you review all these changes, but you're "the Prometheus expert"!
More than happy to review all of these. Even happier that Prometheus adoption is happening so rapidly.
client/network/src/service.rs
Outdated
Comment on lines
848
to
849
connections_opened_total: CounterVec<U64>, | ||
connections_closed_total: CounterVec<U64>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
connections_opened_total: CounterVec<U64>, | |
connections_closed_total: CounterVec<U64>, | |
connections_closed_total: CounterVec<U64>, | |
connections_opened_total: CounterVec<U64>, |
Friendly reminder from Pierre from the past that this list is ordered alphabetically.
client/network/src/service.rs
Outdated
@@ -885,7 +886,7 @@ impl Metrics { | |||
"sub_libp2p_connections_closed_total", | |||
"Total number of connections closed, by reason" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
"Total number of connections closed, by reason" | |
"Total number of connections closed, by reason and direction" |
mxinden
approved these changes
Apr 15, 2020
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@mxinden Sorry to make you review all these changes, but you're "the Prometheus expert"!
This PR contains a couple of tweaks to the Prometheus metrics:
connections
(a gauge) and replaced it withconnections_opened_total
(a counter), so that we no longer lose information about connections opening and closing quickly.connections_closed
byin
andout
for parity withconnections_opened_total
.opened_notification_streams
(a gauge) and replaced it withnotifications_streams_opened
andnotifications_streams_closed
, for the same reason.num_channels
.reason
label to thesub_libp2p_incoming_connections_handshake_errors_total
metric.