Skip to content

Commit

Permalink
fix panic when adjusting buckets (#2168)
Browse files Browse the repository at this point in the history
  • Loading branch information
dashpole authored Nov 17, 2020
1 parent 131ff3e commit 6b67312
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions receiver/prometheusreceiver/internal/metrics_adjuster.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,7 @@ func (ma *MetricsAdjuster) adjustBuckets(current, initial []*metricspb.Distribut
if len(current) != len(initial) {
// this shouldn't happen
ma.logger.Info("Bucket sizes not equal", zap.Int("len(current)", len(current)), zap.Int("len(initial)", len(initial)))
return
}
for i := 0; i < len(current); i++ {
current[i].Count -= initial[i].Count
Expand Down

0 comments on commit 6b67312

Please sign in to comment.