{"record":{"id":"ccd792f4d7f5804a","repo":"jaegertracing/jaeger","slug":"cannot-find-extension-s-make-sure-it-s-defined-ccd792","errorCode":null,"errorMessage":"cannot find extension '%s' (make sure it's defined earlier in the config)","messagePattern":"cannot find extension '(.+?)' \\(make sure it's defined earlier in the config\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/jaeger/internal/extension/jaegerstorage/extension.go","lineNumber":112,"sourceCode":"\tpurger, ok := f.(storage.Purger)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"storage '%s' does not support purging\", name)\n\t}\n\n\treturn purger, nil\n}\n\nfunc findExtension(host component.Host) (Extension, error) {\n\tvar id component.ID\n\tvar comp component.Component\n\tfor i, ext := range host.GetExtensions() {\n\t\tif i.Type() == componentType {\n\t\t\tid, comp = i, ext\n\t\t\tbreak\n\t\t}\n\t}\n\tif comp == nil {\n\t\treturn nil, fmt.Errorf(\n\t\t\t\"cannot find extension '%s' (make sure it's defined earlier in the config)\",\n\t\t\tcomponentType,\n\t\t)\n\t}\n\text, ok := comp.(Extension)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"extension '%s' is not of expected type '%s'\", id, componentType)\n\t}\n\treturn ext, nil\n}\n\nfunc newStorageExt(cfg *Config, telset component.TelemetrySettings) *storageExt {\n\t// Initialize telemetry.Settings with host=nil, will be set in Start()\n\ttset := telemetry.Settings{\n\t\tLogger:         telset.Logger,\n\t\tMeterProvider:  telset.MeterProvider,\n\t\tTracerProvider: telset.TracerProvider,\n\t}","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/cmd/jaeger/internal/extension/jaegerstorage/extension.go#L94-L130","documentation":"findExtension scans the OpenTelemetry collector Host's registered extensions for one whose component type equals the jaegerstorage componentType. If none is found (comp stays nil), it returns this error hinting that the extension must be defined earlier in the config — collector components are initialized in config order, and consumers of the storage extension must come after it.","triggerScenarios":"Any storage lookup (getStorageFactory, GetMetricStorageFactory, GetTraceStoreFactory, TestStorageExtensionType) when the jaegerstorage extension is absent from the collector config, or is declared after the component that tries to use it at startup/expand time.","commonSituations":"Forgetting the `extensions: [jaegerstorage]` block entirely, misspelling the extension name, or ordering the query/ingester component before the jaegerstorage extension in the YAML so the host has not registered it yet.","solutions":["Add the jaegerstorage extension under `extensions:` in the otel config with at least one backend declared","Move the jaegerstorage extension definition before any component that consumes storage in the config file","Check for typos in the extension type name and confirm the binary was built with the jaegerstorage extension included"],"exampleFix":"// before\nservice:\n  extensions: []            # jaegerstorage missing/late\n// after\nextensions:\n  jaegerstorage:\n    backends:\n      primary:\n        memory:\nservice:\n  extensions: [jaegerstorage]\n  pipelines:\n    traces:\n      receivers: [otlp]\n      exporters: [jaegerstorage_exporter]","handlingStrategy":"validation","validationCode":"// check the extension is present before storage lookups\nfor id := range host.GetExtensions() {\n    if id.Type() == jaegerstorage.ComponentType {\n        return nil // ok\n    }\n}\nreturn errors.New(\"jaegerstorage extension not registered; add it to extensions: in config\")","typeGuard":null,"tryCatchPattern":"f, err := jaegerstorage.GetTraceStoreFactory(name, host)\nif err != nil {\n    if strings.Contains(err.Error(), \"cannot find extension\") {\n        return fmt.Errorf(\"config problem: jaegerstorage extension must be defined before consumers: %w\", err)\n    }\n    return err\n}","preventionTips":["Always list the jaegerstorage extension under `extensions:` and before consuming components","Include the jaegerstorage extension in the binary build (import its package)","Lint collector configs to assert jaegerstorage presence when storage-backed components are used"],"tags":["go","jaeger","otel-collector","config"],"backgroundTag":"missing-extension-config","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}