Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sampler.shouldSample can get a parent SpanContext of null #1487

Closed
Oberon00 opened this issue Jul 30, 2020 · 1 comment · Fixed by #1563
Closed

Sampler.shouldSample can get a parent SpanContext of null #1487

Oberon00 opened this issue Jul 30, 2020 · 1 comment · Fixed by #1563
Assignees
Labels
priority:p2 Medium priority issues and bugs. release:required-for-ga Required for 1.0 GA release SDK

Comments

@Oberon00
Copy link
Member

Oberon00 commented Jul 30, 2020

Samplers get null for their parent SpanContext in shouldSample 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:

then passed to shouldSample here:

.shouldSample(
parentContext, traceId, spanName, spanKind, immutableAttributes, immutableLinks);

@jkwatson jkwatson added SDK priority:p2 Medium priority issues and bugs. labels Jul 30, 2020
@jkwatson jkwatson added the release:required-for-ga Required for 1.0 GA release label Aug 12, 2020
@jarebudev
Copy link
Contributor

i can pick this one up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority:p2 Medium priority issues and bugs. release:required-for-ga Required for 1.0 GA release SDK
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants