Skip to content

Commit

Permalink
Do not use deprecated NewCollector method
Browse files Browse the repository at this point in the history
  • Loading branch information
andriikushch committed Apr 9, 2024
1 parent 9f99da3 commit 0a5e3b9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion internal/build/build.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package build

import (
"github.com/prometheus/client_golang/prometheus"
cversion "github.com/prometheus/client_golang/prometheus/collectors/version"
"github.com/prometheus/common/version"
)

Expand Down Expand Up @@ -34,7 +35,7 @@ func injectVersion() {
func NewCollector(program string) prometheus.Collector {
injectVersion()

return version.NewCollector(program)
return cversion.NewCollector(program)
}

// Print returns version information.
Expand Down

0 comments on commit 0a5e3b9

Please sign in to comment.