Skip to content

Commit

Permalink
Fix dropped samples metric
Browse files Browse the repository at this point in the history
Signed-off-by: Paschalis Tsilias <paschalis.tsilias@grafana.com>
  • Loading branch information
tpaschalis committed Jan 5, 2024
1 parent 3e2c486 commit 43cadd5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions storage/remote/queue_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,6 @@ outer:
t.seriesMtx.Lock()
lbls, ok := t.seriesLabels[s.Ref]
if !ok {
t.metrics.droppedSamplesTotal.WithLabelValues(reasonDroppedSeries).Inc()
t.dataDropped.incr(1)
if _, ok := t.droppedSeries[s.Ref]; !ok {
level.Info(t.logger).Log("msg", "Dropped sample for series that was not explicitly dropped via relabelling", "ref", s.Ref)
Expand Down Expand Up @@ -803,8 +802,8 @@ outer:
if !ok {
t.dataDropped.incr(1)
if _, ok := t.droppedSeries[h.Ref]; !ok {
t.metrics.droppedHistogramsTotal.WithLabelValues(reasonUnintentionalDroppedSeries).Inc()
level.Info(t.logger).Log("msg", "Dropped histogram for series that was not explicitly dropped via relabelling", "ref", h.Ref)
t.metrics.droppedHistogramsTotal.WithLabelValues(reasonUnintentionalDroppedSeries).Inc()
} else {
t.metrics.droppedHistogramsTotal.WithLabelValues(reasonDroppedSeries).Inc()
}
Expand Down

0 comments on commit 43cadd5

Please sign in to comment.