Skip to content

CompositeSampler configuration #340

@anuraaga

Description

@anuraaga

There are currently Development level specs for a CompositeSampler which composes ComposableSamplers while handling trace state.

https://opentelemetry.io/docs/specs/otel/trace/sdk/#compositesampler

4 of them are the composable version of existing samplers, AlwaysOn, AlwaysOff, Probability, ParentBased. The impression I get, though I could be wrong, is the long term goal is to transparently swap the existing samplers with the composable ones - they behave similarly while additionally sending trace state so are an additive change.

Until then, I propose a global flag on sampler itself, composite: true. If set, the sampler is CompositeSampler and any configuration below uses the composable version rather than the old version.

For composite-only samplers like ComposableRuleBased, probably we could make it an error to define that without defining composite: true, alternatively we could implicitly enable composite if it's present but an error seems clearer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions