1
0
mirror of https://github.com/prometheus-community/postgres_exporter.git synced 2025-06-05 22:37:07 +03:00
postgres_exporter/cmd/postgres_exporter
Jonathan Bowe 94e8399935
Feat: Improve Error Handling for Server.Scrape (#1158)
* Update querySettings Error Return in Scrape

If there are errors querying namespace mappings, the potential error from querySettings is obscured. Adding an immediate return if there are errors retreiving settings.

Signed-off-by: Jonathan Bowe <jonathan@bowedev.com>

* Improve Verbosity of queryNamespaceMappings Errors

Previously if any errors were encountered by queryNamespaceMappings, only a count of those errors was returned - making debugging those errors harder than it needs to be.

I'm changing this to immediately return nil if no errors are encountered, and otherwise an error will be formatted with each of the namespaces and what the error was for that namespace.

Signed-off-by: Jonathan Bowe <jonathan@bowedev.com>

* Simplify Error Message

Co-authored-by: Ben Kochie <superq@gmail.com>
Signed-off-by: Jonathan Bowe <bowejonathan99@gmail.com>

---------

Signed-off-by: Jonathan Bowe <jonathan@bowedev.com>
Signed-off-by: Jonathan Bowe <bowejonathan99@gmail.com>
Co-authored-by: Ben Kochie <superq@gmail.com>
2025-05-29 07:53:56 -04:00
..
2022-05-25 11:27:42 +02:00
2025-04-03 17:23:40 +02:00
2025-04-03 17:23:40 +02:00
2023-03-05 22:20:50 +01:00