Skip to content

Commit 9dd14ba

Browse files
fix: counter variables should not have total at the end (#17982)
1 parent 4e017eb commit 9dd14ba

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pkg/limits/frontend/ring.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ type ringGatherer struct {
4141
zoneCmp func(a, b string) int
4242

4343
// Metrics.
44-
streams prometheus.Counter
45-
streamsFailed prometheus.Counter
46-
partitionsMissingTotal *prometheus.CounterVec
44+
streams prometheus.Counter
45+
streamsFailed prometheus.Counter
46+
partitionsMissing *prometheus.CounterVec
4747
}
4848

4949
// newRingGatherer returns a new ringGatherer.
@@ -74,7 +74,7 @@ func newRingGatherer(
7474
Help: "The total number of received streams that could not be checked.",
7575
},
7676
),
77-
partitionsMissingTotal: promauto.With(reg).NewCounterVec(
77+
partitionsMissing: promauto.With(reg).NewCounterVec(
7878
prometheus.CounterOpts{
7979
Name: "loki_ingest_limits_frontend_partitions_missing_total",
8080
Help: "The total number of times an instance was missing for a requested partition.",
@@ -154,7 +154,7 @@ func (g *ringGatherer) doExceedsLimitsRPCs(ctx context.Context, tenant string, s
154154
partition := int32(stream.StreamHash % uint64(g.numPartitions))
155155
addr, ok := partitions[partition]
156156
if !ok {
157-
g.partitionsMissingTotal.WithLabelValues(zone).Inc()
157+
g.partitionsMissing.WithLabelValues(zone).Inc()
158158
continue
159159
}
160160
instancesForStreams[addr] = append(instancesForStreams[addr], stream)

0 commit comments

Comments
 (0)