From b9061f820c15d985c1b2610cc955392d99322ec5 Mon Sep 17 00:00:00 2001 From: SuperQ Date: Fri, 17 Jun 2022 13:27:10 +0200 Subject: [PATCH] Fix up deprecated client_golang use. Signed-off-by: SuperQ --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index a4e16cf..06b866b 100644 --- a/main.go +++ b/main.go @@ -5,6 +5,7 @@ import ( "net/http" "github.com/prometheus/client_golang/prometheus" + "github.com/prometheus/client_golang/prometheus/collectors" "github.com/prometheus/client_golang/prometheus/promhttp" ) @@ -55,8 +56,8 @@ func init() { func main() { reg := prometheus.NewPedanticRegistry() reg.MustRegister( - prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{}), - prometheus.NewGoCollector(), + collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}), + collectors.NewGoCollector(), ) prometheus.WrapRegistererWithPrefix("", reg).MustRegister(SMARTctlManagerCollector{})