Skip to content

Commit

Permalink
Fix metric cardinality left over from backport (#7180)
Browse files Browse the repository at this point in the history
One of the patched uses in #7161 missed the message type field,
triggering panic failures from Prometheus.
  • Loading branch information
M. J. Fromberger committed Oct 28, 2021
1 parent 8314f24 commit 85086d7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/p2p/peer.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ func (p *peer) Send(chID byte, msgBytes []byte) bool {
labels := []string{
"peer_id", string(p.ID()),
"chID", fmt.Sprintf("%#x", chID),
"message_type", "bytes",
}
p.metrics.PeerSendBytesTotal.With(labels...).Add(float64(len(msgBytes)))
}
Expand Down

0 comments on commit 85086d7

Please sign in to comment.