Skip to content

Commit

Permalink
core/consensus: fix incorrect metric label (#2443)
Browse files Browse the repository at this point in the history
Fixes the consensus duration metric label to duty type, which fixes the high cardinality and memory issue.

category: bug
ticket: #2438
  • Loading branch information
corverroos authored Jul 17, 2023
1 parent 63b59f3 commit 55c4c45
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/consensus/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ func (c *Component) propose(ctx context.Context, duty core.Duty, value proto.Mes
case decidedAt := <-inst.decidedAtCh:
timerType := c.timerFunc(duty).Type()
duration := decidedAt.Sub(proposedAt)
consensusDuration.WithLabelValues(duty.String(), string(timerType)).Observe(duration.Seconds())
consensusDuration.WithLabelValues(duty.Type.String(), string(timerType)).Observe(duration.Seconds())
default:
}
}()
Expand Down

0 comments on commit 55c4c45

Please sign in to comment.