Skip to content

Commit

Permalink
Switch to Prometheus' collectors package
Browse files Browse the repository at this point in the history
Address a report by staticcheck: prometheus.[…] is deprecated: Use
collectors.[…] instead.  (SA1019)
  • Loading branch information
hansmi committed Dec 25, 2022
1 parent f4b1d3a commit 551563e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions luxws-exporter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

"github.com/hansmi/wp2reg-luxws/luxwslang"
"github.com/prometheus/client_golang/prometheus"
"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"
Expand Down Expand Up @@ -71,9 +72,9 @@ func main() {
reg.MustRegister(newCollector(opts))
if !*disableExporterMetrics {
reg.MustRegister(
prometheus.NewBuildInfoCollector(),
prometheus.NewProcessCollector(prometheus.ProcessCollectorOpts{}),
prometheus.NewGoCollector(),
collectors.NewBuildInfoCollector(),
collectors.NewProcessCollector(collectors.ProcessCollectorOpts{}),
collectors.NewGoCollector(),
version.NewCollector("luxws_exporter"),
)
}
Expand Down

0 comments on commit 551563e

Please sign in to comment.