From: Daniel Swarbrick <dswarbrick@debian.org>
Date: Mon, 18 Mar 2024 05:53:36 +0100
Subject: Support prometheus/common v0.50.0

prometheus/common dropped the version.NewCollector() function, which is
now provided by prometheus/client_golang v1.19.0+.
---
 cmd/prometheus/main.go | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cmd/prometheus/main.go b/cmd/prometheus/main.go
index 9c6e43a..0e9be66 100644
--- a/cmd/prometheus/main.go
+++ b/cmd/prometheus/main.go
@@ -41,6 +41,7 @@ import (
 	"github.com/mwitkow/go-conntrack"
 	"github.com/oklog/run"
 	"github.com/prometheus/client_golang/prometheus"
+	versioncollector "github.com/prometheus/client_golang/prometheus/collectors/version"
 	"github.com/prometheus/common/model"
 	"github.com/prometheus/common/promlog"
 	promlogflag "github.com/prometheus/common/promlog/flag"
@@ -94,7 +95,7 @@ var (
 )
 
 func init() {
-	prometheus.MustRegister(version.NewCollector(strings.ReplaceAll(appName, "-", "_")))
+	prometheus.MustRegister(versioncollector.NewCollector(strings.ReplaceAll(appName, "-", "_")))
 
 	var err error
 	defaultRetentionDuration, err = model.ParseDuration(defaultRetentionString)
