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

[Tracing Framework] Head Based Sampling Support #9621

Open
devagarwal1803 opened this issue Aug 29, 2023 · 0 comments
Open

[Tracing Framework] Head Based Sampling Support #9621

devagarwal1803 opened this issue Aug 29, 2023 · 0 comments
Labels
enhancement Enhancement or improvement to existing feature or request Plugins

Comments

@devagarwal1803
Copy link
Contributor

OpenSearch sampling strategy

As we consider the instrumentation of generic constructs such as rest controllers, transport actions, and task managers, a notable issue arises. Our system encompasses more than 200+ transport actions and a variety of rest actions, leading to the potential generation of numerous spans. However, each span incurs a non-negligible cost. Hence, it is crucial to develop a Sampling strategy that enables us to select a subset of spans from the total pool, effectively representing the entire population or system.

Head Based OpenSearch sampling

We should cover the following scenarios in head based sampling.

  1. Blanket Probabilistic Sampling rate - We can use the OTel probabilistic sampler. Rate should be configurable through telemetry settings.
  2. Override for on demand - We will override the blanket probabilistic sampler for the requests where header has "trace=true" attribute set.
  3. Override for action/operation through settings - We can provide one more option for users to override the blanket probabilistic sampling for certain actions. They should be able to configure the action and sampling rate through logger like affix setting e.g. "trace.action-name=0.2". This will be needed for some internal actions, like background jobs, health checks, etc.
  4. Custom processor - We would also require a custom processor which should be able to discard the parent spans in case the current span is not sampled. This is a bit tricky and requires a lot of assumptions and scenarios to be considered. I will post more on this separately.

More details on Sampling and other possible approaches of sampling are described in #8918

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

No branches or pull requests

3 participants