prysm-pulse/shared/version/metrics.go
Eduard Klementiev a3781e2ffc
Add prysm version to prometheus (#8527)
* Add prysm version to prometheus

* gofmt

* apply suggestion

Co-authored-by: Raul Jordan <raul@prysmaticlabs.com>
2021-03-01 17:50:20 +00:00

16 lines
345 B
Go

package version
import (
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
var prysmInfo = promauto.NewGauge(prometheus.GaugeOpts{
Name: "prysm_version",
ConstLabels: prometheus.Labels{"version": gitTag, "commit": gitCommit},
})
func init() {
prysmInfo.Set(float64(1))
}