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:
Don Petersen 2020-02-25 03:56:49 -08:00 committed by GitHub
parent 0c4425c4b3
commit f870f9591b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)