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

Provide probabilistic sampling comparable to what is offered by probabilisticsamplerprocessor #4130

Open
atoulme opened this issue May 24, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@atoulme
Copy link

atoulme commented May 24, 2023

Problem Statement

The collector offers https://github.com/open-telemetry/opentelemetry-collector-contrib/tree/main/processor/probabilisticsamplerprocessor which allows users to sample traces efficiently.
Notably, it allows to choose the source of sampling, by default the trace id, and a hash seed that can be used to uniformly trace across many collectors scaled horizontally.

The samplers offered by the OpenTelemetry Go SDK do not match this functionality. This means that an application cannot sample in the same way ; if an application could sample using the same algorithm using the same hash seed, it would allow application owners to ensure that the traces emitted by the application are not double sampled, therefore reducing the network traffic going to the collector.

Proposed Solution

I think the OpenTelemetry Go SDK could offer a sampler compatible with the collector's probabilistic sampler.

Alternatives

None found.

Prior Art

Current samplers can be reused somewhat to get this done. It might be best to use a separate sampler altogether to avoid breaking existing code.

Additional Context

@atoulme atoulme added the enhancement New feature or request label May 24, 2023
@atoulme
Copy link
Author

atoulme commented May 24, 2023

This was discussed during the collector SIG meeting of 5/24/2023, see notes here: https://docs.google.com/document/d/1r2JC5MB7GupCE7N32EwGEXs9V_YIsPgoFiLP4VWVMkE/edit#

There is ongoing work in sampling SIG to help with this, and @jmacd is presenting on this topic tomorrow in the sampling SIG meeting.

These resources were referenced explicitly as well:
open-telemetry/oteps#226
https://github.com/open-telemetry/opentelemetry-go-contrib/tree/main/samplers/probability/consistent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant