diff --git a/CHANGELOG.md b/CHANGELOG.md index 27f8eefc51..6b2ed3e0b5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ * [FEATURE] * [ENHANCEMENT] Include TCP OutRsts in netstat metrics * [ENHANCEMENT] Added XFS inode operations to XFS metrics -* [BUGFIX] +* [BUGFIX] Add ErrorLog plumbing to promhttp ## 1.0.1 / 2020-06-15 diff --git a/node_exporter.go b/node_exporter.go index d195372efe..3af489598f 100644 --- a/node_exporter.go +++ b/node_exporter.go @@ -15,6 +15,7 @@ package main import ( "fmt" + stdlog "log" "net/http" _ "net/http/pprof" "os" @@ -121,6 +122,7 @@ func (h *handler) innerHandler(filters ...string) (http.Handler, error) { handler := promhttp.HandlerFor( prometheus.Gatherers{h.exporterMetricsRegistry, r}, promhttp.HandlerOpts{ + ErrorLog: stdlog.New(log.NewStdlibAdapter(level.Error(h.logger)), "", 0), ErrorHandling: promhttp.ContinueOnError, MaxRequestsInFlight: h.maxRequests, Registry: h.exporterMetricsRegistry,