Add new build info metrics that contains more info (#13876)

* Add new build info metrics that contains more info

The goal was to add more information about Grafana. But rather than
just adding those to the current metrics I created a new metric
since its a common pattern in the prometheus community to expose that
info in a metric named `*_build_info`.

We keep the old metric to avoid introducing any breaking changes but
we should be able to remove it the next breaking change
This commit is contained in:
Carl Bergquist
2018-10-30 11:18:43 +01:00
committed by GitHub
parent 1dc8b898bb
commit 42d902b07d
2 changed files with 28 additions and 4 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ func main() {
setting.BuildBranch = buildBranch
setting.IsEnterprise = extensions.IsEnterprise
metrics.M_Grafana_Version.WithLabelValues(version).Set(1)
metrics.SetBuildInformation(version, commit, buildBranch)
server := NewGrafanaServer()