mirror of
https://github.com/prometheus-community/postgres_exporter
synced 2025-01-24 15:12:56 +00:00
Don't ignore errors in parseUserQueries (#362)
Failures in parsing the user's queries are just being swallowed, which makes troubleshooting YAML issues frustrating/impossible. I'm presuming this was not intentional, since there is error handling code in the function that calls this one, though it is unreachable as far as I can tell without this change. Co-authored-by: Will Rouesnel <wrouesnel@wrouesnel.com>
This commit is contained in:
parent
0c4425c4b3
commit
f870f9591b
@ -542,7 +542,7 @@ func parseUserQueries(content []byte) (map[string]intermediateMetricMap, map[str
|
||||
func addQueries(content []byte, pgVersion semver.Version, server *Server) error {
|
||||
metricMaps, newQueryOverrides, err := parseUserQueries(content)
|
||||
if err != nil {
|
||||
return nil
|
||||
return err
|
||||
}
|
||||
// Convert the loaded metric map into exporter representation
|
||||
partialExporterMap := makeDescMap(pgVersion, server.labels, metricMaps)
|
||||
|
Loading…
Reference in New Issue
Block a user