jaegertracing/jaeger · error

cannot find extension '%s' (make sure it's defined earlier i

Error message

cannot find extension '%s' (make sure it's defined earlier in the config)

What it means

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.

Source

Thrown at cmd/jaeger/internal/extension/jaegerstorage/extension.go:112

	purger, ok := f.(storage.Purger)
	if !ok {
		return nil, fmt.Errorf("storage '%s' does not support purging", name)
	}

	return purger, nil
}

func findExtension(host component.Host) (Extension, error) {
	var id component.ID
	var comp component.Component
	for i, ext := range host.GetExtensions() {
		if i.Type() == componentType {
			id, comp = i, ext
			break
		}
	}
	if comp == nil {
		return nil, fmt.Errorf(
			"cannot find extension '%s' (make sure it's defined earlier in the config)",
			componentType,
		)
	}
	ext, ok := comp.(Extension)
	if !ok {
		return nil, fmt.Errorf("extension '%s' is not of expected type '%s'", id, componentType)
	}
	return ext, nil
}

func newStorageExt(cfg *Config, telset component.TelemetrySettings) *storageExt {
	// Initialize telemetry.Settings with host=nil, will be set in Start()
	tset := telemetry.Settings{
		Logger:         telset.Logger,
		MeterProvider:  telset.MeterProvider,
		TracerProvider: telset.TracerProvider,
	}

View on GitHub (pinned to 806f444784)

Solutions

  1. Add the jaegerstorage extension under `extensions:` in the otel config with at least one backend declared
  2. Move the jaegerstorage extension definition before any component that consumes storage in the config file
  3. Check for typos in the extension type name and confirm the binary was built with the jaegerstorage extension included

Example fix

// before
service:
  extensions: []            # jaegerstorage missing/late
// after
extensions:
  jaegerstorage:
    backends:
      primary:
        memory:
service:
  extensions: [jaegerstorage]
  pipelines:
    traces:
      receivers: [otlp]
      exporters: [jaegerstorage_exporter]
Defensive patterns

Strategy: validation

Validate before calling

// check the extension is present before storage lookups
for id := range host.GetExtensions() {
    if id.Type() == jaegerstorage.ComponentType {
        return nil // ok
    }
}
return errors.New("jaegerstorage extension not registered; add it to extensions: in config")

Try / catch

f, err := jaegerstorage.GetTraceStoreFactory(name, host)
if err != nil {
    if strings.Contains(err.Error(), "cannot find extension") {
        return fmt.Errorf("config problem: jaegerstorage extension must be defined before consumers: %w", err)
    }
    return err
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of jaegertracing/jaeger@806f444784 (2026-09-01). Data as JSON: /api/errors/ccd792f4d7f5804a. Report an issue: GitHub.