Skip to content

Commit 71e761a

Browse files
authored
Merge pull request prometheus-community#18 from grafana/andrii/do-not-use-deprecated-method
Do not use deprecated method github.com/prometheus/common/version.NewCollector
2 parents ece8297 + 88cd988 commit 71e761a

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)