From 30d7d25a7eb7e4e92167fa5ae69499c12dba3450 Mon Sep 17 00:00:00 2001 From: Joe Adams Date: Thu, 21 Sep 2023 07:13:14 -0400 Subject: [PATCH] Add error log when probe collector creation fails (#918) Signed-off-by: Joe Adams --- cmd/postgres_exporter/probe.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/postgres_exporter/probe.go b/cmd/postgres_exporter/probe.go index 827314a7..5945e07b 100644 --- a/cmd/postgres_exporter/probe.go +++ b/cmd/postgres_exporter/probe.go @@ -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 }