moira-alert/moira

Replace deprecated method of prometheus

Dimedrolity opened this issue · 0 comments

Overview

Moira uses prometheus pkg

Problem

Linter error

metrics\prometheus.go:15:24: SA1019: prometheus.NewGoCollector is deprecated: Use collectors.NewGoCollector instead. (staticcheck)
        registry.MustRegister(prometheus.NewGoCollector(), prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{}))

Solution

Replace deprecated methods that linter suggests and check that all works as before