Skip to content

Commit 740fb8b

Browse files
authored
Merge pull request prometheus#4166 from prometheus/superq/fix_build_info
Fix build info metric
2 parents 0d28327 + ef79cbd commit 740fb8b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmd/alertmanager/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import (
3333
"github.com/KimMachineGun/automemlimit/memlimit"
3434
"github.com/alecthomas/kingpin/v2"
3535
"github.com/prometheus/client_golang/prometheus"
36-
"github.com/prometheus/client_golang/prometheus/collectors"
36+
versioncollector "github.com/prometheus/client_golang/prometheus/collectors/version"
3737
"github.com/prometheus/client_golang/prometheus/promhttp"
3838
"github.com/prometheus/common/model"
3939
"github.com/prometheus/common/promslog"
@@ -116,7 +116,7 @@ func init() {
116116
prometheus.MustRegister(configuredReceivers)
117117
prometheus.MustRegister(configuredIntegrations)
118118
prometheus.MustRegister(configuredInhibitionRules)
119-
prometheus.MustRegister(collectors.NewBuildInfoCollector())
119+
prometheus.MustRegister(versioncollector.NewCollector("alertmanager"))
120120
}
121121

122122
func instrumentHandler(handlerName string, handler http.HandlerFunc) http.HandlerFunc {

0 commit comments

Comments
 (0)