Instrumentation: Adds environment_info metric (#28355) (#28388)

Signed-off-by: bergquist <carl.bergquist@gmail.com>

Co-authored-by: Arve Knudsen <arve.knudsen@gmail.com>
(cherry picked from commit 89ebb97fca)

Co-authored-by: Carl Bergquist <carl@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2020-10-20 09:59:52 +02:00
committed by GitHub
co-authored by Carl Bergquist
parent 5ac4ae37a2
commit 2110d4e9b4
6 changed files with 84 additions and 9 deletions
+4
View File
@@ -22,6 +22,7 @@ import (
_ "github.com/grafana/grafana/pkg/extensions"
"github.com/grafana/grafana/pkg/infra/localcache"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/infra/metrics"
_ "github.com/grafana/grafana/pkg/infra/metrics"
_ "github.com/grafana/grafana/pkg/infra/remotecache"
_ "github.com/grafana/grafana/pkg/infra/serverlock"
@@ -117,6 +118,9 @@ func (s *Server) init(cfg *Config) error {
s.loadConfiguration()
s.writePIDFile()
if err := metrics.SetEnvironmentInformation(s.cfg.MetricsGrafanaEnvironmentInfo); err != nil {
return err
}
login.Init()
social.NewOAuthService()