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

TraceIdRatioBased : Clarify what "lower sampling rate" means #2674

Open
tigrannajaryan opened this issue Jul 18, 2022 · 1 comment
Open

TraceIdRatioBased : Clarify what "lower sampling rate" means #2674

tigrannajaryan opened this issue Jul 18, 2022 · 1 comment
Assignees
Labels
spec:trace Related to the specification/trace directory triaged-accepted The issue is triaged and accepted by the OTel community, one can proceed with creating a PR proposal

Comments

@tigrannajaryan
Copy link
Member

TraceIdRatioBased spec says:

A TraceIdRatioBased sampler with a given sampling rate MUST also sample all traces that any TraceIdRatioBased sampler with a lower sampling rate would sample.

What does "lower sampling rate" mean? The concept of sampling rate is not defined anywhere. Does sampling rate mean "fraction of spans that are exported"?

I find the following sentence also confusing:

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.

What does this describe? That backend system will drop some additional traces that frontend did not drop? Or the opposite of this, that backend will never drop traces that were not dropped by the frontend? Ideally we will have some pictures to explain.

@tigrannajaryan tigrannajaryan added the spec:trace Related to the specification/trace directory label Jul 18, 2022
@jsuereth
Copy link
Contributor

My own interpretation: Rate = {spans}/{time}.

Higher rate means MORE spans are sampled, which means (for TraceIdRatioBased) that the ratio is a larger number.

For the second sentence:

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.

Would it be better to write this as:

This is important, because we want to make sure that for some traces, we get a sample of spans from all distributed components.  With TraceIdRatioBased, we're guaranteed that there will be overlap as long as every system has non-zero ratio configured.

???

@rbailey7210 rbailey7210 added the triaged-accepted The issue is triaged and accepted by the OTel community, one can proceed with creating a PR proposal label Jul 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
spec:trace Related to the specification/trace directory triaged-accepted The issue is triaged and accepted by the OTel community, one can proceed with creating a PR proposal
Projects
None yet
Development

No branches or pull requests

3 participants