From e651969df05af92086d4b273ad83e5938f6a969c Mon Sep 17 00:00:00 2001 From: Charles Korn Date: Fri, 12 Jul 2024 16:50:27 +1000 Subject: [PATCH 1/2] Initialise `reason="connect-timeout"` series for memcached `operation_failures_total` metric --- cache/client.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cache/client.go b/cache/client.go index 855518751..033d2add6 100644 --- a/cache/client.go +++ b/cache/client.go @@ -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) From 74a82ad9c368293b32c65ec679e59381f6a3e4e2 Mon Sep 17 00:00:00 2001 From: Charles Korn Date: Fri, 12 Jul 2024 16:54:50 +1000 Subject: [PATCH 2/2] Add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbdb40643..41bfcda8e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -247,3 +247,4 @@ * [BUGFIX] middleware: fix issue where applications that used the httpgrpc tracing middleware would generate duplicate spans for incoming HTTP requests. #451 * [BUGFIX] httpgrpc: store headers in canonical form when converting from gRPC to HTTP. #518 * [BUGFIX] Memcached: Don't truncate sub-second TTLs to 0 which results in them being cached forever. #530 +* [BUGFIX] Cache: initialise the `operation_failures_total{reason="connect-timeout"}` metric to 0 for each cache operation type on startup. #545