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
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user