Skip to content

Commit be6ab8e

Browse files
committed
Include group name in Valkey allow/forbid metrics
1 parent 7809168 commit be6ab8e

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ratelimit/valkey.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,9 @@ func (c *clusterLimitValkey) Allow(ctx context.Context, clearText string) bool {
135135
c.measureQuery(valkeyAllowMetricsFormat, valkeyAllowMetricsFormatWithGroup, &failed, now)
136136

137137
if allow {
138-
c.metrics.IncCounter(valkeyMetricsPrefix + "allows")
138+
c.metrics.IncCounter(fmt.Sprintf("%s.%s.allows", valkeyMetricsPrefix, c.group))
139139
} else {
140-
c.metrics.IncCounter(valkeyMetricsPrefix + "forbids") // TODO(sszuecs) forbids or better deny?
140+
c.metrics.IncCounter(fmt.Sprintf("%s.%s.forbids", valkeyMetricsPrefix, c.group)) // TODO(sszuecs) forbids or better deny?
141141
}
142142
return allow
143143
}

0 commit comments

Comments
 (0)