mirror of
https://github.com/prometheus/prometheus
synced 2025-03-05 13:08:30 +00:00
Include goversion in build_info metric
This commit is contained in:
parent
17079952c1
commit
f3e55cba1d
@ -43,11 +43,11 @@ func init() {
|
|||||||
buildInfo := prometheus.NewGaugeVec(
|
buildInfo := prometheus.NewGaugeVec(
|
||||||
prometheus.GaugeOpts{
|
prometheus.GaugeOpts{
|
||||||
Name: "prometheus_build_info",
|
Name: "prometheus_build_info",
|
||||||
Help: "A metric with a constant '1' value labeled by version, revision, and branch from which Prometheus was built.",
|
Help: "A metric with a constant '1' value labeled by version, revision, branch, and goversion from which Prometheus was built.",
|
||||||
},
|
},
|
||||||
[]string{"version", "revision", "branch"},
|
[]string{"version", "revision", "branch", "goversion"},
|
||||||
)
|
)
|
||||||
buildInfo.WithLabelValues(Version, Revision, Branch).Set(1)
|
buildInfo.WithLabelValues(Version, Revision, Branch, GoVersion).Set(1)
|
||||||
|
|
||||||
prometheus.MustRegister(buildInfo)
|
prometheus.MustRegister(buildInfo)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user