Skip to content

Composable sampler naming conventions #4640

@jmacd

Description

@jmacd

What are you trying to achieve?

The prototype for Java consistent probability sampling package,
https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/consistent-sampling,
has names that conflict with the new specification.

Discussed in Slack, written by @trentm

New implementations of the composite samplers should bias to the class/interface naming in the spec (ComposableAlwaysOn, ComposableTraceIDRatioBased, et al) over the naming in the OTEP and Java impl (ConsistentAlwaysOn, ConsistentFixedThreshold), right?

Hi. I'm reviewing a PR to add support for (a subset) of the sampling support documented at https://opentelemetry.io/docs/specs/otel/trace/tracestate-probability-sampling/ (i.e. OTEP 250) for OTel JS: open-telemetry/opentelemetry-js#5839
and I have some general questions on the spec/OTEPs and guidance for implementations.
(This PR for OTel JS is related to a similar one adding support to OTel Python: open-telemetry/opentelemetry-python#4714)
Currently these implementations were based on the Java implementation at https://github.com/open-telemetry/opentelemetry-java-contrib/tree/main/consistent-sampling/src/main/java/io/opentelemetry/contrib/sampler/consistent56
From reading the OTEPs and the spec text, I notice that there are differences in the naming used for classes:
OTEP 250 and the Java impl: ConsistentAlwaysOff, ConsistentRuleBased, ConsistentParentBased, etc.
The spec: ComposableAlwaysOn, ComposableTraceIDRatioBased, ComposableParentThreshold, etc.
I didn't see anywhere in the spec PR where the name differences were discussed.
I gather that new implementations should prefer the naming in the spec, right?
Looking at the jmacd's Go and Rust implementations, I see that they tend towards the spec naming.

What did you expect to see?

I @jmacd do not strongly believe that all SDKs need the same exact names. "Composable" and "Consistent" are both acceptable, IMO.

cc/ @trentm

Metadata

Metadata

Assignees

Labels

sig-issueA specific SIG should look into this before discussing at the specspec:traceRelated to the specification/trace directory

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions