When query result has rows with identical labels GET to /metric returns 500
When doing a query that results in rows with identical values in the label columns, scrapping /metrics will return 500 with an error saying that it found duplicate values for metric.
This can make it extremely difficult to troubleshoot because there's no error on the logs and the duplication can be sporadic so in time sensitive queries constant monitoring is required to catch the failure and see the actual error by doing a manual GET to /metrics.
Exporter should be improved so that when there's duplicate rows a clear error log message should be emitted, ideally /metrics should still return 200 and just omit the duplicated metric but just having an error in the logs would prove to be a big benefit.
Indeed, that's not ideal. If someone wants to go ahead and implement that I'll happily merge that.