Skip to content

Commit 88cd988

Browse files
committed
Do not use the deprecated method version.NewCollector
prometheus/common@9fbe2ed
1 parent ece8297 commit 88cd988

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cmd/postgres_exporter/main.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import (
2525
"github.com/prometheus-community/postgres_exporter/collector"
2626
"github.com/prometheus-community/postgres_exporter/config"
2727
"github.com/prometheus/client_golang/prometheus"
28+
cversion "github.com/prometheus/client_golang/prometheus/collectors/version"
2829
"github.com/prometheus/client_golang/prometheus/promhttp"
2930
"github.com/prometheus/common/promlog"
3031
"github.com/prometheus/common/promlog/flag"
@@ -122,7 +123,7 @@ func main() {
122123
exporter.servers.Close()
123124
}()
124125

125-
prometheus.MustRegister(version.NewCollector(exporterName))
126+
prometheus.MustRegister(cversion.NewCollector(exporterName))
126127

127128
prometheus.MustRegister(exporter)
128129

0 commit comments

Comments
 (0)