mirror of
https://github.com/tendermint/tendermint.git
synced 2026-08-27 19:37:08 +00:00
label vote sent with peer_id
This commit is contained in:
@@ -268,7 +268,7 @@ func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics {
|
||||
Subsystem: MetricsSubsystem,
|
||||
Name: "vote_sent",
|
||||
Help: "Number of votes of each type sent.",
|
||||
}, append(labels, "vote_type")).With(labelsAndValues...),
|
||||
}, append(labels, "peer_id", "vote_type")).With(labelsAndValues...),
|
||||
VoteReceived: prometheus.NewCounterFrom(stdprometheus.CounterOpts{
|
||||
Namespace: namespace,
|
||||
Subsystem: MetricsSubsystem,
|
||||
|
||||
@@ -1172,7 +1172,7 @@ func (ps *PeerState) PickSendVote(votes types.VoteSetReader) bool {
|
||||
Vote: vote.ToProto(),
|
||||
},
|
||||
}, ps.logger) {
|
||||
ps.conMetrics.VoteSent.With("vote_type", vote.Type.String()).Add(1)
|
||||
ps.conMetrics.VoteSent.With("peer_id", string(ps.peer.ID()), "vote_type", vote.Type.String()).Add(1)
|
||||
ps.SetHasVote(vote)
|
||||
psVotes := ps.getVoteBitArray(votes.GetHeight(), votes.GetRound(), tmproto.SignedMsgType(votes.Type()))
|
||||
ps.conMetrics.PeerVoteCount.With("peer_id", string(ps.peer.ID()), "vote_type", vote.Type.String()).Set(float64(len(psVotes.GetTrueIndices())))
|
||||
|
||||
Reference in New Issue
Block a user