You've already forked postgres_exporter
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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user