Log message after collecting metrics failed
This commit is contained in:
parent
f198a1d8df
commit
9d70ce7143
1 changed files with 2 additions and 0 deletions
|
@ -2,6 +2,7 @@ package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
|
"log"
|
||||||
"runtime"
|
"runtime"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
@ -53,6 +54,7 @@ func (c *multiCollector) Collect(ch chan<- prometheus.Metric) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := g.Wait(); err != nil {
|
if err := g.Wait(); err != nil {
|
||||||
|
log.Printf("Metrics collection failed: %v", err.Error())
|
||||||
ch <- prometheus.NewInvalidMetric(
|
ch <- prometheus.NewInvalidMetric(
|
||||||
prometheus.NewDesc("paperless_error", "Metrics collection failed", nil, nil),
|
prometheus.NewDesc("paperless_error", "Metrics collection failed", nil, nil),
|
||||||
err)
|
err)
|
||||||
|
|
Loading…
Reference in a new issue