Sampler.shouldSample can get a parent SpanContext of null #1487
Labels
priority:p2
Medium priority issues and bugs.
release:required-for-ga
Required for 1.0 GA release
SDK
Samplers get
null
for their parentSpanContext
inshouldSample
if the parent is "invalid". This seems to be the only place in the whole SDK+API where a SpanContext can be null. Everywhere else we pass an invalid/empty context in such a case. I think the sampling API should behave the same way.null
assigned here if the parent is invalid:opentelemetry-java/sdk/src/main/java/io/opentelemetry/sdk/trace/SpanBuilderSdk.java
Line 214 in 78ed649
then passed to
shouldSample
here:opentelemetry-java/sdk/src/main/java/io/opentelemetry/sdk/trace/SpanBuilderSdk.java
Lines 231 to 232 in 78ed649
The text was updated successfully, but these errors were encountered: