From f839338dbd25537efde0589826bcd60a17f8b472 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Otto=20Kr=C3=B6pke?= Date: Tue, 26 Nov 2024 23:42:50 +0100 Subject: [PATCH] collector: don't fail if perf counters are empty. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Jan-Otto Kröpke --- internal/collector/textfile/textfile.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/collector/textfile/textfile.go b/internal/collector/textfile/textfile.go index f955a1ee5..10b68fb3f 100644 --- a/internal/collector/textfile/textfile.go +++ b/internal/collector/textfile/textfile.go @@ -359,6 +359,7 @@ func (c *Collector) Collect(ch chan<- prometheus.Metric) error { errs = append(errs, fmt.Errorf("error reading textfile directory %q: %w", directory, err)) } } + c.exportMTimes(mTimes, ch) // If duplicates are detected across *multiple* files, return error.