Report non-fatal collection errors in the exporter metric. (#1439)
As per prometheus/client_golang#543, pass the Registry for exporter metrics when setting up the /metrics HTTP handler. With this, the `promhttp_metric_handler_errors_total` metric will increment on (possibly non-fatal) collection-time errors, such as duplicate metrics from text files. Signed-off-by: Matthias Rampke <mr@soundcloud.com>
This commit is contained in:
parent
d2be72be4a
commit
b133213c7a
3 changed files with 9 additions and 0 deletions
|
|
@ -116,6 +116,7 @@ func (h *handler) innerHandler(filters ...string) (http.Handler, error) {
|
|||
ErrorLog: log.NewErrorLogger(),
|
||||
ErrorHandling: promhttp.ContinueOnError,
|
||||
MaxRequestsInFlight: h.maxRequests,
|
||||
Registry: h.exporterMetricsRegistry,
|
||||
},
|
||||
)
|
||||
if h.includeExporterMetrics {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue