Don't use prometheus.DefaultRegisterer in annotationsimpl/loki. (#107311)

* Don't use prometheus.DefaultRegisterer in annotationsimpl/loki.
This commit is contained in:
Peter Štibraný
2025-06-27 16:22:28 +02:00
committed by GitHub
parent 6f3b619f59
commit 4f34a57ce2
4 changed files with 12 additions and 6 deletions
@@ -3,6 +3,8 @@ package service
import (
"testing"
"github.com/prometheus/client_golang/prometheus"
"github.com/grafana/grafana/pkg/infra/db"
"github.com/grafana/grafana/pkg/infra/log"
"github.com/grafana/grafana/pkg/infra/tracing"
@@ -35,7 +37,7 @@ func newPublicDashboardServiceImpl(
}
tagService := tagimpl.ProvideService(store)
if annotationsRepo == nil {
annotationsRepo = annotationsimpl.ProvideService(store, cfg, featuremgmt.WithFeatures(), tagService, tracing.InitializeTracerForTest(), nil, dashboardService)
annotationsRepo = annotationsimpl.ProvideService(store, cfg, featuremgmt.WithFeatures(), tagService, tracing.InitializeTracerForTest(), nil, dashboardService, prometheus.NewPedanticRegistry())
}
if publicDashboardStore == nil {