-
Notifications
You must be signed in to change notification settings - Fork 795
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
feat: spec compliant sampling result support #1058
feat: spec compliant sampling result support #1058
Conversation
5ff9a45
to
3c338a8
Compare
3c338a8
to
164c2b9
Compare
packages/opentelemetry-core/src/trace/sampler/ProbabilitySampler.ts
Outdated
Show resolved
Hide resolved
packages/opentelemetry-core/src/trace/sampler/ProbabilitySampler.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall LGTM, please address open comments.
Codecov Report
@@ Coverage Diff @@
## master #1058 +/- ##
==========================================
- Coverage 92.32% 92.28% -0.05%
==========================================
Files 115 116 +1
Lines 3389 3396 +7
Branches 683 686 +3
==========================================
+ Hits 3129 3134 +5
- Misses 260 262 +2
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good so I'm going to approve it, but it should be noted that the parent handling in this will be replaced with the ParentOrElse
sampler in #1075 and this will become a "dumb" probability sampler.
Right. I can work on it in a follow-up PR. |
shouldSample( | ||
parentContext: SpanContext | undefined, | ||
traceId: string, | ||
spanId: string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just so you know, spanId
is going to be removed from the input to the sampler.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have any spec PR link to this? Do we expecting remove spanId
in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have any spec PR link to this? Do we expecting remove
spanId
in this PR?
open-telemetry/opentelemetry-specification#621 just merged :)
The PR is named "spec compliant" so I would assume so ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
shouldSample( | ||
parentContext: SpanContext | undefined, | ||
traceId: string, | ||
spanId: string, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have any spec PR link to this? Do we expecting remove
spanId
in this PR?
open-telemetry/opentelemetry-specification#621 just merged :)
The PR is named "spec compliant" so I would assume so ;)
@obecny I think all the comments has been addressed by the author. Could you please take a look again? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, thx for changes
Which problem is this PR solving?
Short description of the changes
api.SamplingResult
.api.Sampler.shouldSample
additional parameters.