Skip to content

Commit

Permalink
use github.com/prometheus/client_golang/prometheus/collectors/version…
Browse files Browse the repository at this point in the history
…/version.NewCollector which replaces github.com/prometheus/common/version.NewCollector
  • Loading branch information
gmllt authored and benjaminguttmann-avtq committed Jun 21, 2024
1 parent 75700e9 commit 59de361
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 1 deletion.
3 changes: 2 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"github.com/cloudfoundry/cf_exporter/fetcher"
"github.com/cloudfoundry/cf_exporter/filters"
"github.com/prometheus/client_golang/prometheus"
versionCollector "github.com/prometheus/client_golang/prometheus/collectors/version"
"github.com/prometheus/client_golang/prometheus/promhttp"
"github.com/prometheus/common/version"
log "github.com/sirupsen/logrus"
Expand Down Expand Up @@ -99,7 +100,7 @@ var (
)

func init() {
prometheus.MustRegister(version.NewCollector(*metricsNamespace))
prometheus.MustRegister(versionCollector.NewCollector(*metricsNamespace))
}

type basicAuthHandler struct {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ github.com/onsi/gomega/types
# github.com/prometheus/client_golang v1.19.1
## explicit; go 1.20
github.com/prometheus/client_golang/prometheus
github.com/prometheus/client_golang/prometheus/collectors/version
github.com/prometheus/client_golang/prometheus/internal
github.com/prometheus/client_golang/prometheus/promhttp
# github.com/prometheus/client_model v0.6.1
Expand Down

0 comments on commit 59de361

Please sign in to comment.