-
Notifications
You must be signed in to change notification settings - Fork 889
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
Rename ProbabilitySampler to TraceIdRatioBasedSampler and add requirements #611
Rename ProbabilitySampler to TraceIdRatioBasedSampler and add requirements #611
Conversation
d77b56e
to
a712040
Compare
Do we want to mention security consideration (e.g what's the trust boundary)? E.g. a malicious guy could generate trace ids that always result in the trace being sampled even at extremely low rate. This might be solved by starting a new trace across trust boundary, there are many other solutions, too. |
@reyang that is a good point, but I don't think it is in scope of this sampler. I think that is a more general problem and not only for having things sampled (because another way to do that is to always set the traceflag option to 1). There is a special section in w3c about security concerns. |
This PR was marked stale due to lack of activity. It will be closed in 7 days. |
will work on this soon, commenting to not close it |
Thanks Bogdan & Yuri! |
a712040
to
c5a42fc
Compare
@yurishkuro @lizthegrey PR updated. |
ce78520
to
1c12035
Compare
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
cccb3c3
to
c819f17
Compare
* A `TraceIdRatioBased` sampler with a given sampling rate MUST also sample all | ||
traces that any `TraceIdRatioBased` sampler with a lower sampling rate would | ||
sample. This is important when a backend system may want to run with a higher | ||
sampling rate than the frontend system, this way all frontend traces will | ||
still be sampled and extra traces will be sampled on the backend only. |
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 is only relevant for requests that cross trust boundaries because otherwise the sampled
flag in the incoming TraceState is honored by the parent-based sampler, right? This could mentioned to avoid confusion.
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.
Not really, we decided that the samplers like this will not honor any flag or TraceState, is the user responsibility to configure the ParentBased:
The
TraceIdRatioBased
MUST ignore the parentSampledFlag
. To respect the parentSampledFlag
, theTraceIdRatioBased
should be used as a delegate of theParentBased
sampler specified below.
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.
Re-read, yes in general if parent-based is set it is not very important, but even if parent-based is not set this should be the same case.
Signed-off-by: Bogdan Drutu <bogdandrutu@gmail.com>
In #331 there were questions about why different requirements are important when deciding on the probability sampling algorithm.