From d5dc6fca3c35d29a62fa546ab34826f4ff38dcf0 Mon Sep 17 00:00:00 2001 From: William Banfield Date: Wed, 23 Nov 2022 11:18:53 -0500 Subject: [PATCH] add metric to all places --- consensus/reactor.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/consensus/reactor.go b/consensus/reactor.go index afab9d458..c09543382 100644 --- a/consensus/reactor.go +++ b/consensus/reactor.go @@ -755,6 +755,7 @@ OUTER_LOOP: // If peer is lagging by height 1, send LastCommit. if prs.Height != 0 && rs.Height == prs.Height+1 { if ps.PickSendVote(rs.LastCommit) { + conR.Metrics.VoteSent.With("type", "precommit").Add(1) logger.Debug("Picked rs.LastCommit to send", "height", prs.Height) continue OUTER_LOOP } @@ -768,6 +769,7 @@ OUTER_LOOP: // which contains precommit signatures for prs.Height. if commit := conR.conS.blockStore.LoadBlockCommit(prs.Height); commit != nil { if ps.PickSendVote(commit) { + conR.Metrics.VoteSent.With("type", "precommit").Add(1) logger.Debug("Picked Catchup commit to send", "height", prs.Height) continue OUTER_LOOP } @@ -800,6 +802,7 @@ func (conR *Reactor) gossipVotesForHeight( // If there are lastCommits to send... if prs.Step == cstypes.RoundStepNewHeight { if ps.PickSendVote(rs.LastCommit) { + conR.Metrics.VoteSent.With("type", "precommit").Add(1) logger.Debug("Picked rs.LastCommit to send") return true }