mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-04-01 22:48:15 +00:00
Add error log when probe collector creation fails (#918)
Signed-off-by: Joe Adams <github@joeadams.io>
This commit is contained in:
parent
e3eaa91c0b
commit
30d7d25a7e
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user