Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initialise reason="connect-timeout" series for cache operation_failures_total metric #545

Merged
merged 2 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
Loading