Sampler.ShouldSample has wrong parameter descriptions. #883
Labels
area:sampling
Related to trace sampling
area:sdk
Related to the SDK
bug
Something isn't working
priority:p3
Lowest priority level
release:required-for-ga
Must be resolved before GA release, or nice to have before GA
spec:trace
Related to the specification/trace directory
Late follow-up from #634.
In https://github.com/open-telemetry/opentelemetry-specification/blob/14b5b6a/specification/trace/sdk.md#shouldsample, the spec has some confusing or even wrong wording when it describes the parameters, namely:
This is not true, since samplers are called for all child spans, not only for (local) root spans. A parent is often a locally created Span.
Normally we use an empty/invalid SpanContext everywhere instead of null. This was actually changed in Java in Sampler.shouldSample can get a parent SpanContext of null opentelemetry-java#1487
I don't think this can be different. If there is any valid parent trace ID, then it must match the newly created Span. If the Span where to start a new Trace, the parent context would be empty (or null with the current wording).
Marking this as P3 since I think the text in question is not really normative. But it's still wrong, so I think it would be desirable to fix this before GA.
CC @alolita
The text was updated successfully, but these errors were encountered: