From 97583ff3401a6fdb1b77f834cc377bc1547a276e Mon Sep 17 00:00:00 2001 From: Ben Kochie Date: Tue, 6 Jul 2021 11:51:16 +0200 Subject: [PATCH] Use new client_golang collectors package. Signed-off-by: Ben Kochie --- node_exporter.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/node_exporter.go b/node_exporter.go index e717dc6c..9a0e3d09 100644 --- a/node_exporter.go +++ b/node_exporter.go @@ -28,6 +28,7 @@ import ( "github.com/go-kit/log" "github.com/go-kit/log/level" "github.com/prometheus/client_golang/prometheus" + promcollectors "github.com/prometheus/client_golang/prometheus/collectors" "github.com/prometheus/client_golang/prometheus/promhttp" "github.com/prometheus/common/version" "github.com/prometheus/exporter-toolkit/web" @@ -57,8 +58,8 @@ func newHandler(includeExporterMetrics bool, maxRequests int, logger log.Logger) } if h.includeExporterMetrics { h.exporterMetricsRegistry.MustRegister( - prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{}), - prometheus.NewGoCollector(), + promcollectors.NewProcessCollector(promcollectors.ProcessCollectorOpts{}), + promcollectors.NewGoCollector(), ) } if innerHandler, err := h.innerHandler(); err != nil {