fix (unified-storage): stop registering unified storage metrics in global state (#101322)
* move prometheus.register for unified storage metrics into metrics.go and do most of the plumbing to get it to work * convert StorageApiMetrics to pointer and check for nil before using it * rename type and variables to something more sensible --------- Co-authored-by: Jean-Philippe Quéméner <jeanphilippe.quemener@grafana.com>
This commit is contained in:
co-authored by
Jean-Philippe Quéméner
parent
7fb0d1b3e6
commit
f5e5824bab
@@ -104,7 +104,7 @@ func StartGrafanaEnv(t *testing.T, grafDir, cfgPath string) (string, *server.Tes
|
||||
var storage sql.UnifiedStorageGrpcService
|
||||
if runstore {
|
||||
storage, err = sql.ProvideUnifiedStorageGrpcService(env.Cfg, env.FeatureToggles, env.SQLStore,
|
||||
env.Cfg.Logger, prometheus.NewPedanticRegistry(), nil)
|
||||
env.Cfg.Logger, prometheus.NewPedanticRegistry(), nil, nil)
|
||||
require.NoError(t, err)
|
||||
ctx := context.Background()
|
||||
err = storage.StartAsync(ctx)
|
||||
|
||||
Reference in New Issue
Block a user