1
0
mirror of https://github.com/prometheus-community/postgres_exporter.git synced 2025-08-09 15:42:47 +03:00

Add error log when probe collector creation fails (#918)

Signed-off-by: Joe Adams <github@joeadams.io>
This commit is contained in:
Joe Adams
2023-09-21 07:13:14 -04:00
committed by GitHub
parent e3eaa91c0b
commit 30d7d25a7e

View File

@@ -85,6 +85,7 @@ func handleProbe(logger log.Logger, excludeDatabases []string) http.HandlerFunc
// Run the probe
pc, err := collector.NewProbeCollector(tl, excludeDatabases, registry, dsn)
if err != nil {
level.Error(logger).Log("msg", "Error creating probe collector", "err", err)
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}