{"record":{"id":"07952b7085ce840d","repo":"jaegertracing/jaeger","slug":"storage-s-does-not-support-sampling-store","errorCode":null,"errorMessage":"storage '%s' does not support sampling store","messagePattern":"storage '(.+?)' does not support sampling store","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/jaeger/internal/extension/jaegerstorage/extension.go","lineNumber":82,"sourceCode":"\nfunc GetTraceStoreFactory(name string, host component.Host) (tracestore.Factory, error) {\n\tf, err := getStorageFactory(name, host)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\treturn f, nil\n}\n\nfunc GetSamplingStoreFactory(name string, host component.Host) (storage.SamplingStoreFactory, error) {\n\tf, err := getStorageFactory(name, host)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tssf, ok := f.(storage.SamplingStoreFactory)\n\tif !ok {\n\t\treturn nil, fmt.Errorf(\"storage '%s' does not support sampling store\", name)\n\t}\n\n\treturn ssf, nil\n}\n\nfunc GetPurger(name string, host component.Host) (storage.Purger, error) {\n\tf, err := getStorageFactory(name, host)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\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}","sourceCodeStart":64,"sourceCodeEnd":100,"githubUrl":"https://github.com/jaegertracing/jaeger/blob/806f4447841ecdb60519f408b004a599d515f437/cmd/jaeger/internal/extension/jaegerstorage/extension.go#L64-L100","documentation":"GetSamplingStoreFactory retrieves the named trace storage factory and asserts it also implements storage.SamplingStoreFactory, which is required for adaptive sampling. Only some backends implement that interface; when the retrieved factory does not, this error is thrown because the Go type assertion f.(storage.SamplingStoreFactory) fails.","triggerScenarios":"startAdaptiveStrategyProvider (or another caller) calls jaegerstorage.GetSamplingStoreFactory(name, host) for a storage backend whose factory does not implement storage.SamplingStoreFactory — e.g. a backend that supports trace storage but not remote sampling storage.","commonSituations":"Enabling adaptive sampling (sampling strategies served from storage) while pointing at a storage type that has no sampling-store implementation, or switching backends (e.g. to a memory/test or newer backend) without re-checking sampling support.","solutions":["Choose a storage backend whose factory implements storage.SamplingStoreFactory (e.g. Cassandra, Elasticsearch) for the entry referenced by sampling configuration","Disable adaptive sampling / remote sampling storage if the chosen backend does not support it","Add the sampling-store capability to a custom factory by implementing storage.SamplingStoreFactory"],"exampleFix":"// before (otelelasticsearch-only backend with adaptive sampling enabled)\n// after: point sampling at a supported backend or disable it\nsampling:\n  adaptive_sampling:\n    sampling_store: cassandra-primary   # backend that implements SamplingStoreFactory","handlingStrategy":"type-guard","validationCode":"f, err := jaegerstorage.GetTraceStoreFactory(name, host)\nif err == nil {\n    if _, ok := f.(storage.SamplingStoreFactory); !ok {\n        // backend cannot serve adaptive sampling\n    }\n}","typeGuard":"func supportsSampling(f tracestore.Factory) bool {\n    _, ok := f.(storage.SamplingStoreFactory)\n    return ok\n}","tryCatchPattern":"ssf, err := jaegerstorage.GetSamplingStoreFactory(name, host)\nif err != nil {\n    if strings.Contains(err.Error(), \"does not support sampling store\") {\n        // fall back to default static sampling strategy\n        return defaultStrategyProvider, nil\n    }\n    return nil, err\n}","preventionTips":["Only enable adaptive sampling for backends known to implement SamplingStoreFactory","Feature-check the factory before configuring sampling storage","Keep backend capability docs next to the storage config"],"tags":["go","jaeger","type-assertion","sampling"],"backgroundTag":"capability-not-supported","analyzedSha":"806f4447841ecdb60519f408b004a599d515f437","analyzedAt":"2026-09-01T02:39:22.140Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T05:18:18.240Z"}