diff --git a/cmd/jaeger/internal/extension/jaegerquery/server.go b/cmd/jaeger/internal/extension/jaegerquery/server.go index 8ece67c8f01a..b92416d9a42c 100644 --- a/cmd/jaeger/internal/extension/jaegerquery/server.go +++ b/cmd/jaeger/internal/extension/jaegerquery/server.go @@ -57,12 +57,17 @@ func (s *server) Start(ctx context.Context, host component.Host) error { baseFactory := mf.Namespace(metrics.NSOptions{Name: "jaeger"}) queryMetricsFactory := baseFactory.Namespace(metrics.NSOptions{Name: "query"}) - f, err := jaegerstorage.GetStorageFactoryV2(s.config.Storage.TracesPrimary, host) + v1Factory, err := jaegerstorage.GetStorageFactory(s.config.Storage.TracesPrimary, host) if err != nil { - return fmt.Errorf("cannot find primary storage %s: %w", s.config.Storage.TracesPrimary, err) + return fmt.Errorf("cannot find primary storage for v1 factory %s: %w", s.config.Storage.TracesPrimary, err) } - traceReader, err := f.CreateTraceReader() + v2Factory, err := jaegerstorage.GetStorageFactoryV2(s.config.Storage.TracesPrimary, host) + if err != nil { + return fmt.Errorf("cannot find primary storage for v2 factory %s: %w", s.config.Storage.TracesPrimary, err) + } + + traceReader, err := v2Factory.CreateTraceReader() if err != nil { return fmt.Errorf("cannot create trace reader: %w", err) } @@ -74,7 +79,7 @@ func (s *server) Start(ctx context.Context, host component.Host) error { spanReader = storageMetrics.NewReadMetricsDecorator(spanReader, queryMetricsFactory) - depReader, err := f.CreateDependencyReader() + depReader, err := v1Factory.CreateDependencyReader() if err != nil { return fmt.Errorf("cannot create dependencies reader: %w", err) } diff --git a/cmd/jaeger/internal/extension/jaegerstorage/factoryadapter/factory.go b/cmd/jaeger/internal/extension/jaegerstorage/factoryadapter/factory.go index ef4753882ac4..7a03114e9e57 100644 --- a/cmd/jaeger/internal/extension/jaegerstorage/factoryadapter/factory.go +++ b/cmd/jaeger/internal/extension/jaegerstorage/factoryadapter/factory.go @@ -8,7 +8,6 @@ import ( "io" storage_v1 "github.com/jaegertracing/jaeger/storage" - "github.com/jaegertracing/jaeger/storage/dependencystore" "github.com/jaegertracing/jaeger/storage_v2/spanstore" ) @@ -52,8 +51,3 @@ func (f *Factory) CreateTraceWriter() (spanstore.Writer, error) { } return NewTraceWriter(spanWriter), nil } - -// CreateDependencyReader creates a dependencystore.Reader. -func (f *Factory) CreateDependencyReader() (dependencystore.Reader, error) { - return f.ss.CreateDependencyReader() -} diff --git a/storage_v2/spanstore/factory.go b/storage_v2/spanstore/factory.go index aa62c5341e6d..3701a97ccdaf 100644 --- a/storage_v2/spanstore/factory.go +++ b/storage_v2/spanstore/factory.go @@ -4,7 +4,6 @@ package spanstore import ( - "github.com/jaegertracing/jaeger/storage/dependencystore" "github.com/jaegertracing/jaeger/storage_v2" ) @@ -18,7 +17,4 @@ type Factory interface { // CreateTraceWriter creates a spanstore.Writer. CreateTraceWriter() (Writer, error) - - // CreateDependencyReader creates a dependencystore.Reader. - CreateDependencyReader() (dependencystore.Reader, error) }