jaegertracing/jaeger · error

cannot load adaptive sampling components from `%s` extension

Error message

cannot load adaptive sampling components from `%s` extension: %w

What it means

The adaptive sampling processor's start() looks up the remote sampling extension via remotesampling.GetAdaptiveSamplingComponents(host), which requires a jaeger_remote_sampling extension configured in adaptive mode. If the extension is missing or misconfigured, the error is wrapped as 'cannot load adaptive sampling components from `<jaeger_remote_sampling>` extension' and processor startup fails.

Source

Thrown at cmd/jaeger/internal/processors/adaptivesampling/processor.go:36

)

type traceProcessor struct {
	config     *Config
	aggregator samplingstrategy.Aggregator
	telset     component.TelemetrySettings
}

func newTraceProcessor(cfg Config, telset component.TelemetrySettings) *traceProcessor {
	return &traceProcessor{
		config: &cfg,
		telset: telset,
	}
}

func (tp *traceProcessor) start(_ context.Context, host component.Host) error {
	parts, err := remotesampling.GetAdaptiveSamplingComponents(host)
	if err != nil {
		return fmt.Errorf(
			"cannot load adaptive sampling components from `%s` extension: %w",
			remotesampling.ComponentType, err,
		)
	}

	agg, err := adaptive.NewAggregator(
		*parts.Options,
		tp.telset.Logger,
		otelmetrics.NewFactory(tp.telset.MeterProvider),
		parts.DistLock,
		parts.SamplingStore,
	)
	if err != nil {
		return fmt.Errorf("failed to create the adaptive sampling aggregator: %w", err)
	}

	agg.Start()
	tp.aggregator = agg

View on GitHub (pinned to 806f444784)

Solutions

  1. Add or fix a jaeger_remote_sampling extension in your OTel config and reference it so the processor can discover it
  2. Ensure the extension is configured in adaptive mode (its AdaptiveConfig) since the processor depends on its sampling components
  3. Check the wrapped error for the specific cause (extension not found vs bad extension config) and correct the pipeline config order/names accordingly

Example fix

// before
processors:
  adaptive_sampling: {}
// after
extensions:
  jaeger_remote_sampling/adaptive:
    adaptive:
      sampling_store:
        backend: memory
processors:
  adaptive_sampling: {}
Defensive patterns

Strategy: validation

Validate before calling

// ensure the config declares the extension the processor needs:
// cfg.Extensions contains jaeger_remote_sampling with adaptive settings
// otherwise fail fast at config-load time:
if _, ok := cfg.Extensions["jaeger_remote_sampling"]; !ok {
    return errors.New("adaptive_sampling processor requires a jaeger_remote_sampling extension")
}

Try / catch

if err := proc.Start(ctx, host); err != nil {
    if strings.Contains(err.Error(), "cannot load adaptive sampling components") {
        return fmt.Errorf("config error: missing/misconfigured jaeger_remote_sampling extension: %w", err)
    }
    return err
}

Prevention

When it happens

Trigger: start() runs and GetAdaptiveSamplingComponents returns an error: no remotesampling extension is present in the pipeline's host, the extension is configured without adaptive sampling options, or its own startup has not provided the required components.

Common situations: OTel config with the adaptive sampling processor but no jaeger_remote_sampling extension declared; extension present but not in adaptive mode (missing strategy-file/adaptive settings wiring); extension listed after the processor in a way that leaves the host without it at processor start.

Related errors


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