mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 08:12:53 +08:00
K8s: Refactor metrics to share k8s registry (#77957)
Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
@ -16,6 +16,7 @@ import (
|
||||
"github.com/grafana/grafana/pkg/api"
|
||||
gcli "github.com/grafana/grafana/pkg/cmd/grafana-cli/commands"
|
||||
"github.com/grafana/grafana/pkg/infra/log"
|
||||
"github.com/grafana/grafana/pkg/infra/metrics"
|
||||
"github.com/grafana/grafana/pkg/infra/process"
|
||||
"github.com/grafana/grafana/pkg/server"
|
||||
_ "github.com/grafana/grafana/pkg/services/alerting/conditions"
|
||||
@ -97,9 +98,6 @@ func RunServer(opts ServerOptions) error {
|
||||
}
|
||||
}()
|
||||
|
||||
setBuildInfo(opts)
|
||||
checkPrivileges()
|
||||
|
||||
configOptions := strings.Split(ConfigOverrides, " ")
|
||||
cfg, err := setting.NewCfgFromArgs(setting.CommandLineArgs{
|
||||
Config: ConfigFile,
|
||||
@ -111,6 +109,9 @@ func RunServer(opts ServerOptions) error {
|
||||
return err
|
||||
}
|
||||
|
||||
setBuildInfo(metrics.ProvideRegisterer(cfg), opts)
|
||||
checkPrivileges()
|
||||
|
||||
s, err := server.Initialize(
|
||||
cfg,
|
||||
server.Options{
|
||||
|
Reference in New Issue
Block a user