Log message after collecting metrics failed
Some checks failed
Run tests / test (push) Has been cancelled
Release / release (push) Has been cancelled

This commit is contained in:
Michael Hanselmann 2024-06-05 21:07:25 +02:00
parent f198a1d8df
commit 9d70ce7143

View file

@ -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)