diff --git a/internal/consensus/metrics.go b/internal/consensus/metrics.go index b10cebdb5..cf99fa0e4 100644 --- a/internal/consensus/metrics.go +++ b/internal/consensus/metrics.go @@ -223,14 +223,14 @@ func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics { Name: "quorum_prevote_message_delay", Help: "Difference in seconds between the proposal timestamp and the timestamp " + "of the latest prevote that achieved a quorum in the prevote step.", - }, labels).With(labelsAndValues...), + }, append(labels, "proposer_address")).With(labelsAndValues...), FullPrevoteMessageDelay: prometheus.NewGaugeFrom(stdprometheus.GaugeOpts{ Namespace: namespace, Subsystem: MetricsSubsystem, Name: "full_prevote_message_delay", Help: "Difference in seconds between the proposal timestamp and the timestamp " + "of the latest prevote that achieved 100% of the voting power in the prevote step.", - }, labels).With(labelsAndValues...), + }, append(labels, "proposer_address")).With(labelsAndValues...), ProposalTimestampDifference: prometheus.NewHistogramFrom(stdprometheus.HistogramOpts{ Namespace: namespace, Subsystem: MetricsSubsystem, diff --git a/internal/consensus/state.go b/internal/consensus/state.go index a5e2e0551..eb5fb65f1 100644 --- a/internal/consensus/state.go +++ b/internal/consensus/state.go @@ -2540,12 +2540,12 @@ func (cs *State) calculatePrevoteMessageDelayMetrics() { _, val := cs.Validators.GetByAddress(v.ValidatorAddress) votingPowerSeen += val.VotingPower if votingPowerSeen >= cs.Validators.TotalVotingPower()*2/3+1 { - cs.metrics.QuorumPrevoteMessageDelay.Set(v.Timestamp.Sub(cs.Proposal.Timestamp).Seconds()) + cs.metrics.QuorumPrevoteMessageDelay.With("proposer_address", cs.Validators.GetProposer().Address.String()).Set(v.Timestamp.Sub(cs.Proposal.Timestamp).Seconds()) break } } if ps.HasAll() { - cs.metrics.FullPrevoteMessageDelay.Set(pl[len(pl)-1].Timestamp.Sub(cs.Proposal.Timestamp).Seconds()) + cs.metrics.FullPrevoteMessageDelay.With("proposer_address", cs.Validators.GetProposer().Address.String()).Set(pl[len(pl)-1].Timestamp.Sub(cs.Proposal.Timestamp).Seconds()) } }