{"record":{"id":"063602a5fd3e8d81","repo":"jaegertracing/jaeger","slug":"cannot-load-adaptive-sampling-components-from-s","errorCode":null,"errorMessage":"cannot load adaptive sampling components from `%s` extension: %w","messagePattern":"cannot load adaptive sampling components from `(.+?)` extension: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/jaeger/internal/processors/adaptivesampling/processor.go","lineNumber":36,"sourceCode":")\n\ntype traceProcessor struct {\n\tconfig     *Config\n\taggregator samplingstrategy.Aggregator\n\ttelset     component.TelemetrySettings\n}\n\nfunc newTraceProcessor(cfg Config, telset component.TelemetrySettings) *traceProcessor {\n\treturn &traceProcessor{\n\t\tconfig: &cfg,\n\t\ttelset: telset,\n\t}\n}\n\nfunc (tp *traceProcessor) start(_ context.Context, host component.Host) error {\n\tparts, err := remotesampling.GetAdaptiveSamplingComponents(host)\n\tif err != nil {\n\t\treturn fmt.Errorf(\n\t\t\t\"cannot load adaptive sampling components from `%s` extension: %w\",\n\t\t\tremotesampling.ComponentType, err,\n\t\t)\n\t}\n\n\tagg, err := adaptive.NewAggregator(\n\t\t*parts.Options,\n\t\ttp.telset.Logger,\n\t\totelmetrics.NewFactory(tp.telset.MeterProvider),\n\t\tparts.DistLock,\n\t\tparts.SamplingStore,\n\t)\n\tif err != nil {\n\t\treturn fmt.Errorf(\"failed to create the adaptive sampling aggregator: %w\", err)\n\t}\n\n\tagg.Start()\n\ttp.aggregator = agg","sourceCodeStart":18,"sourceCodeEnd":54,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/cmd/jaeger/internal/processors/adaptivesampling/processor.go#L18-L54","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Add or fix a jaeger_remote_sampling extension in your OTel config and reference it so the processor can discover it","Ensure the extension is configured in adaptive mode (its AdaptiveConfig) since the processor depends on its sampling components","Check the wrapped error for the specific cause (extension not found vs bad extension config) and correct the pipeline config order/names accordingly"],"exampleFix":"// before\nprocessors:\n  adaptive_sampling: {}\n// after\nextensions:\n  jaeger_remote_sampling/adaptive:\n    adaptive:\n      sampling_store:\n        backend: memory\nprocessors:\n  adaptive_sampling: {}","handlingStrategy":"validation","validationCode":"// ensure the config declares the extension the processor needs:\n// cfg.Extensions contains jaeger_remote_sampling with adaptive settings\n// otherwise fail fast at config-load time:\nif _, ok := cfg.Extensions[\"jaeger_remote_sampling\"]; !ok {\n    return errors.New(\"adaptive_sampling processor requires a jaeger_remote_sampling extension\")\n}","typeGuard":null,"tryCatchPattern":"if err := proc.Start(ctx, host); err != nil {\n    if strings.Contains(err.Error(), \"cannot load adaptive sampling components\") {\n        return fmt.Errorf(\"config error: missing/misconfigured jaeger_remote_sampling extension: %w\", err)\n    }\n    return err\n}","preventionTips":["Always pair the adaptive sampling processor with a jaeger_remote_sampling extension configured in adaptive mode","Validate the full OTel config (extension + processor wiring) in CI before deploy","Read the wrapped error to distinguish 'extension not found' from 'extension misconfigured'"],"tags":["adaptive-sampling","configuration","otel-extension"],"backgroundTag":"missing-required-extension","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}