From 95572c8af4040fde0a90d0cc9e771bb3a7f0180c Mon Sep 17 00:00:00 2001 From: Albin Severinson Date: Wed, 31 Jan 2024 15:28:51 +0000 Subject: [PATCH] Add missing field to metrics (#3353) --- internal/scheduler/metrics/metrics.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/scheduler/metrics/metrics.go b/internal/scheduler/metrics/metrics.go index 2ebf1752a1f..da578cea950 100644 --- a/internal/scheduler/metrics/metrics.go +++ b/internal/scheduler/metrics/metrics.go @@ -51,7 +51,6 @@ type Metrics struct { // Pre-compiled regexes for error categorisation. errorRegexes []*regexp.Regexp - // Map from error message to the index of the first matching regex. // Messages that match no regex map to -1. matchedRegexIndexByErrorMessage *lru.Cache @@ -87,6 +86,7 @@ func New(config configuration.MetricsConfig) (*Metrics, error) { buffer: make([]string, 0, 8), + errorRegexes: errorRegexes, matchedRegexIndexByErrorMessage: matchedRegexIndexByError, transitions: prometheus.NewCounterVec(