prometheus: Separate listpeers
from listpeerchannels
metrics
#700
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.
When experimenting with the metrics, it was very confusing to discover that
lightning_peers_connected
did not refer to the number of connected peers, but rather to the number of peers with channels.A search through the commit log turned up ce078bb#diff-cfc589c146eeee8db6b2db1d8dc6e851722e6ea18a2d7d05ebc49b2851012de1R71-L91 which was supposed to be related to
msat
denominations, but seems to have overridden thelistpeers
metrics withlistpeerchannels
data.This PR does the following:
PeerCollector
toPeerChannelsCollector
PeerCollector
to track raw peers and their connections, regardless of whether they have a channel, introducing alightning_peers
metric to track a count of each peer.lightning_peer_connected
with actual peer data instead of peer-channel data.lightning_peer_connected
metric data to a new, more clear,lightning_peer_channel_connected
metric.Of course, this change could cause unexpected data for users already tracking the
lightning_peer_connected
metric, but IMO the clarification is worth it.