diff --git a/cmd/jaeger/internal/extension/jaegerquery/server.go b/cmd/jaeger/internal/extension/jaegerquery/server.go index dc7ab04249c..68c4f034ca8 100644 --- a/cmd/jaeger/internal/extension/jaegerquery/server.go +++ b/cmd/jaeger/internal/extension/jaegerquery/server.go @@ -24,7 +24,6 @@ import ( "github.com/jaegertracing/jaeger/plugin/metrics/disabled" "github.com/jaegertracing/jaeger/storage/metricsstore" "github.com/jaegertracing/jaeger/storage/metricsstore/metricstoremetrics" - "github.com/jaegertracing/jaeger/storage/storagemetrics" ) var ( @@ -60,7 +59,6 @@ func (s *server) Start(ctx context.Context, host component.Host) error { if err != nil { return fmt.Errorf("cannot find primary storage %s: %w", s.config.Storage.TracesPrimary, err) } - f = storagemetrics.NewDecoratorFactory(f, baseFactory) spanReader, err := f.CreateSpanReader() if err != nil { diff --git a/cmd/jaeger/internal/extension/jaegerstorage/extension.go b/cmd/jaeger/internal/extension/jaegerstorage/extension.go index a1f50de8ee2..45927757690 100644 --- a/cmd/jaeger/internal/extension/jaegerstorage/extension.go +++ b/cmd/jaeger/internal/extension/jaegerstorage/extension.go @@ -24,6 +24,7 @@ import ( "github.com/jaegertracing/jaeger/plugin/storage/grpc" "github.com/jaegertracing/jaeger/plugin/storage/memory" "github.com/jaegertracing/jaeger/storage" + "github.com/jaegertracing/jaeger/storage/storagemetrics" "github.com/jaegertracing/jaeger/storage_v2/factoryadapter" "github.com/jaegertracing/jaeger/storage_v2/spanstore" ) @@ -150,7 +151,15 @@ func (s *storageExt) Start(_ context.Context, host component.Host) error { if err != nil { return fmt.Errorf("failed to initialize storage '%s': %w", storageName, err) } - s.factories[storageName] = factory + storageMetricsFactory := mf.Namespace( + metrics.NSOptions{ + Name: "storage", + Tags: map[string]string{ + "kind": storageName, + }, + }, + ) + s.factories[storageName] = storagemetrics.NewDecoratorFactory(factory, storageMetricsFactory) } for metricStorageName, cfg := range s.config.MetricBackends {