{"record":{"id":"7bf39189e8d0b89b","repo":"jaegertracing/jaeger","slug":"cannot-find-factory-for-trace-storage-s-w","errorCode":null,"errorMessage":"cannot find factory for trace storage %s: %w","messagePattern":"cannot find factory for trace storage (.+?): %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/jaeger/internal/extension/jaegerquery/server.go","lineNumber":74,"sourceCode":"// begins serving queries, so it is ready when OnQuery/OnResult are invoked.\nfunc (s *server) Dependencies() []component.ID {\n\tdeps := make([]component.ID, 0, 1+len(s.config.QueryInterceptors))\n\tdeps = append(deps, jaegerstorage.ID)\n\tdeps = append(deps, s.config.QueryInterceptors...)\n\treturn deps\n}\n\nfunc (s *server) Start(ctx context.Context, host component.Host) error {\n\ttelset := telemetry.FromOtelComponent(s.telset, host)\n\tif !s.config.EnableTracing {\n\t\ttelset.TracerProvider = nooptrace.NewTracerProvider()\n\t}\n\ttelset.Metrics = telset.Metrics.\n\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)","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/cmd/jaeger/internal/extension/jaegerquery/server.go#L56-L92","documentation":"jaeger-query's Start looks up the trace storage factory named in Storage.TracesPrimary via jaegerstorage.GetTraceStoreFactory. If no storage extension with that name is registered in the OTel collector host, the lookup fails and the error is wrapped as 'cannot find factory for trace storage %s'.","triggerScenarios":"Starting the jaeger-query extension while config.Storage.TracesPrimary names a storage that is absent: no jaeger_storage extension defined, the extension failed to start, or the name is misspelled.","commonSituations":"Typos in the traces_primary storage name in the query extension config; forgetting to add a jaeger_storage extension to the collector config; running jaeger-query in a separate process without the storage extension deployed; extension startup ordering failure.","solutions":["Add/join the jaeger_storage extension whose name matches Storage.TracesPrimary in the same collector config","Check the extension's own startup logs — if it failed to start it will not be registered","Fix the spelling/case of the storage name under storage.traces_primary","Verify the jaeger_storage extension is listed and healthy in the effective config"],"exampleFix":"// before\nextensions:\n  jaeger_query:\n    storage:\n      traces_primary: prodCass\ndependencies:\n  extensions: [jaeger_storage]\n// after\nextensions:\n  jaeger_storage:\n    backends:\n      prod cassandra:\n        cassandra: {}\n  jaeger_query:\n    storage:\n      traces_primary: prod cassandra","handlingStrategy":"validation","validationCode":"// Before deploy: verify the named backend exists in the jaeger_storage extension\nimport \"github.com/jaegertracing/jaeger/cmd/jaeger/internal/extension/jaegerstorage\"\n\nfunc checkPrimary(name string, host component.Host) error {\n\t_, err := jaegerstorage.GetTraceStoreFactory(name, host)\n\treturn err\n}","typeGuard":null,"tryCatchPattern":"if err := ext.Start(ctx, host); err != nil {\n\tif strings.Contains(err.Error(), \"cannot find factory for trace storage\") {\n\t\tlog.Fatalf(\"storage %q missing: define it under extensions.jaeger_storage.backends\", cfgName)\n\t}\n\treturn err\n}","preventionTips":["Keep traces_primary name identical to the jaeger_storage backends key (copy-paste, don't retype)","Run config validation/ dry-run before deploying","Deploy query and storage extensions in the same collector config","Monitor the storage extension's own startup health"],"tags":["go","config","storage","otel-collector"],"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"}