Fix metric cardinality left over from backport (#7180)

One of the patched uses in #7161 missed the message type field,
triggering panic failures from Prometheus.
This commit is contained in:
M. J. Fromberger
2021-10-28 15:29:53 -07:00
committed by GitHub
parent 8314f24d79
commit 85086d7452
+1
View File
@@ -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)))
}