Skip to content

feat(config): generic plugin loading for samplers in declarative config #5071

@MikeGoldsmith

Description

@MikeGoldsmith

_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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    configIssues and PRs related to implementing Declarative Config

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions