{"record":{"id":"f32666efdd222555","repo":"jaegertracing/jaeger","slug":"cannot-find-factory-for-dependency-storage-s-w","errorCode":null,"errorMessage":"cannot find factory for dependency storage %s: %w","messagePattern":"cannot find factory for dependency storage (.+?): %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/jaeger/internal/extension/jaegerquery/server.go","lineNumber":88,"sourceCode":"\t\tNamespace(metrics.NSOptions{Name: \"jaeger\"}).\n\t\tNamespace(metrics.NSOptions{Name: \"query\"})\n\ttf, err := jaegerstorage.GetTraceStoreFactory(s.config.Storage.TracesPrimary, host)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"cannot find factory for trace storage %s: %w\", s.config.Storage.TracesPrimary, err)\n\t}\n\ttraceReader, err := tf.CreateTraceReader()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"cannot create trace reader: %w\", err)\n\t}\n\n\tinterceptors, err := queryinterceptor.Resolve(host, s.config.QueryInterceptors)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"cannot resolve query interceptors: %w\", err)\n\t}\n\n\tdf, ok := tf.(depstore.Factory)\n\tif !ok {\n\t\treturn fmt.Errorf(\"cannot find factory for dependency storage %s: %w\", s.config.Storage.TracesPrimary, err)\n\t}\n\tdepReader, err := df.CreateDependencyReader()\n\tif err != nil {\n\t\treturn fmt.Errorf(\"cannot create dependencies reader: %w\", err)\n\t}\n\n\topts := querysvc.QueryServiceOptions{\n\t\tMaxClockSkewAdjust: s.config.MaxClockSkewAdjust,\n\t\tMaxTraceSize:       s.config.MaxTraceSize,\n\t\tInterceptors:       interceptors,\n\t}\n\tif err := s.addArchiveStorage(&opts, host); err != nil {\n\t\treturn err\n\t}\n\tqs := querysvc.NewQueryService(traceReader, depReader, opts)\n\ts.qs = qs\n\n\tmqs, err := s.createMetricReader(host)","sourceCodeStart":70,"sourceCodeEnd":106,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/cmd/jaeger/internal/extension/jaegerquery/server.go#L70-L106","documentation":"jaeger-query requires the primary trace storage factory to also implement depstore.Factory so it can read service dependencies. If the type assertion tf.(depstore.Factory) fails, Start returns 'cannot find factory for dependency storage'. Note the wrapped err is nil here because the message reflects a missing capability, not an underlying error.","triggerScenarios":"Storage.TracesPrimary points to a backend whose TraceStoreFactory does not implement CreateDependencyReader — e.g. certain remote-storage/metric-only backends that support traces but not dependency links.","commonSituations":"Using a storage backend that lacks dependency support (e.g. some OTLP-native or experimental backends) as traces_primary; switching backends without checking depstore support; expecting dependency links from a backend that never computes them.","solutions":["Choose a traces_primary backend that implements depstore.Factory (Cassandra, Elasticsearch, etc.)","If dependencies are not needed, confirm the deployment tolerates the query extension requiring dep support, or use a supported backend","Check the backend's documentation for dependency-reader support before switching","If the backend should support deps, verify you are on a jaeger version where that backend implements depstore.Factory"],"exampleFix":"// before\nstorage:\n  traces_primary: memory-only-no-deps  # lacks depstore.Factory\n// after\nstorage:\n  traces_primary: cassandra-main  # implements depstore.Factory","handlingStrategy":"type-guard","validationCode":"// Before relying on dependencies, confirm the factory supports them\nimport \"github.com/jaegertracing/jaeger/plugin/storage/dependencystore\"\n\nfunc supportsDeps(tf interface{}) bool {\n\t_, ok := tf.(depstore.Factory)\n\treturn ok\n}","typeGuard":"func asDepstoreFactory(tf any) (depstore.Factory, bool) {\n\tdf, ok := tf.(depstore.Factory)\n\treturn df, ok\n}\nif _, ok := asDepstoreFactory(tf); !ok {\n\t// choose a backend that supports dependencies\n}","tryCatchPattern":"if err := ext.Start(ctx, host); err != nil {\n\tif strings.Contains(err.Error(), \"cannot find factory for dependency storage\") {\n\t\tlog.Fatalf(\"backend %q does not implement depstore.Factory — pick a supported backend\", primaryName)\n\t}\n\treturn err\n}","preventionTips":["Confirm depstore.Factory support before choosing a traces_primary backend","Use Cassandra/Elasticsearch/metadata-aware backends when dependency links are required","Document backend capability matrix for your deployment","Test dependency links after any backend migration"],"tags":["go","storage","dependencies","type-assertion"],"backgroundTag":"storage-factory-not-found","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}