-
Notifications
You must be signed in to change notification settings - Fork 130
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
Links based sampler #813
Links based sampler #813
Conversation
samplers/src/main/java/io/opentelemetry/contrib/sampler/LinksBasedSampler.java
Outdated
Show resolved
Hide resolved
samplers/src/main/java/io/opentelemetry/contrib/sampler/LinksBasedSampler.java
Outdated
Show resolved
Hide resolved
samplers/src/main/java/io/opentelemetry/contrib/sampler/LinksBasedSampler.java
Outdated
Show resolved
Hide resolved
samplers/src/main/java/io/opentelemetry/contrib/sampler/LinksBasedSampler.java
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.
Sorry for the delay. Couple minor comments but looks good.
private static final SamplingResult POSITIVE_SAMPLING_RESULT = SamplingResult.recordAndSample(); | ||
private static final SamplingResult NEGATIVE_SAMPLING_RESULT = SamplingResult.drop(); |
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.
I don't think these constants help improve readability or performance here, so I'd suggest inlining
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.
@atshaw43 just checking in to make sure you saw this comment, thx
Description:
Feature addition
Problem
What if we only want to sample if and only if one of the span links is sampled.
Solution
Add a LinksBasedSampler sampler that samples if and only if a span link is sampled.
Testing:
Unit Tests