Skip to content

Commit

Permalink
Initialise reason="connect-timeout" series for memcached `operation…
Browse files Browse the repository at this point in the history
…_failures_total` metric
  • Loading branch information
charleskorn committed Jul 12, 2024
1 parent 6c2188e commit e651969
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cache/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ func newClientMetrics(reg prometheus.Registerer) *clientMetrics {
Help: "Total number of operations against cache that failed.",
}, []string{"operation", "reason"})
for _, op := range []string{opGetMulti, opSet, opDelete, opIncrement, opFlush, opTouch, opCompareAndSwap} {
cm.failures.WithLabelValues(op, reasonConnectTimeout)
cm.failures.WithLabelValues(op, reasonTimeout)
cm.failures.WithLabelValues(op, reasonMalformedKey)
cm.failures.WithLabelValues(op, reasonServerError)
Expand Down

0 comments on commit e651969

Please sign in to comment.