_tracer_provider.py currently has a hardcoded list of supported samplers (always_on, always_off, trace_id_ratio_based, parent_based). Custom or contrib samplers cannot be referenced via declarative config.
The OTel declarative config spec defines a PluginComponentProvider mechanism for plugin components, including samplers. Unknown sampler names should be resolved dynamically via a registered provider — for Python, entry points are the idiomatic mechanism.
Related: #5053 (generic resource detector loading)
_tracer_provider.pycurrently has a hardcoded list of supported samplers (always_on,always_off,trace_id_ratio_based,parent_based). Custom or contrib samplers cannot be referenced via declarative config.The OTel declarative config spec defines a
PluginComponentProvidermechanism for plugin components, including samplers. Unknown sampler names should be resolved dynamically via a registered provider — for Python, entry points are the idiomatic mechanism.Related: #5053 (generic resource detector loading)