From 9d70ce7143b9d87c35e4007836fb6a14f06daceb Mon Sep 17 00:00:00 2001 From: Michael Hanselmann Date: Wed, 5 Jun 2024 21:07:25 +0200 Subject: [PATCH] Log message after collecting metrics failed --- multicollector.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/multicollector.go b/multicollector.go index f3c8276..522732d 100644 --- a/multicollector.go +++ b/multicollector.go @@ -2,6 +2,7 @@ package main import ( "context" + "log" "runtime" "time" @@ -53,6 +54,7 @@ func (c *multiCollector) Collect(ch chan<- prometheus.Metric) { } if err := g.Wait(); err != nil { + log.Printf("Metrics collection failed: %v", err.Error()) ch <- prometheus.NewInvalidMetric( prometheus.NewDesc("paperless_error", "Metrics collection failed", nil, nil), err)