Skip to content

Commit

Permalink
Update prometheus/histogram.go
Browse files Browse the repository at this point in the history
Co-authored-by: Björn Rabenstein <github@rabenste.in>
Signed-off-by: Ziqi Zhao <zhaoziqi9146@gmail.com>
  • Loading branch information
fatsheep9146 and beorn7 committed May 3, 2024
1 parent 013d7a7 commit 21a58de
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions prometheus/histogram.go
Original file line number Diff line number Diff line change
Expand Up @@ -1659,8 +1659,7 @@ func (n *nativeExemplars) addExemplar(e *dto.Exemplar) {

// When the number of exemplars exceeds the limit, remove one exemplar.
var (
// The index where to remove the old exemplar.
rIdx int
rIdx int // The index where to remove the old exemplar.

ot = time.Now() // Oldest timestamp seen.
otIdx = -1 // Index of the exemplar with the oldest timestamp.
Expand Down

0 comments on commit 21a58de

Please sign in to comment.