-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Tail Sampling Processor: Combine Probabilitstic Policy with Other Policy Types #24606
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
Comments
Pinging code owners:
See Adding Labels via Comments if you do not have permissions to add labels yourself. |
Have you tried the composite policy? From the docs:
You can also try the "and" policy:
You can then have a string attribute policy and a probabilistic policy as part of the same "and" policy. |
Thanks for replying. Maybe I misunderstood something in the However, using If I define: I'm gonna try this early next week and share the results here. Thank you! |
Hello, this works perfectly! Here is an example, in case anyone finds it useful:
|
Add documentation to clarify how the tail sampling processor can be used in a complex case, by combining multiple policies. Linked to #25190 Linked to #24606 --------- Co-authored-by: Alex Boten <[email protected]>
Component(s)
processor/tailsampling
Is your feature request related to a problem? Please describe.
I want to apply different sampling percentages (sample rate) based on various conditions. However, there doesn't seem to be a way to do apply probabilistic sampling policy based on some condition.
It would be quite helpful, if we could combine probabilistic policy with other types. For eg:
combining
string_attribute
policy, we can construct logic such asif http.route matches 'foo' (string_attribute policy)
then apply sampling_percentage of 0.1
or similarly, if
attribute.foo matches bar
then apply sampling_percentage of 50
and so on.
Describe the solution you'd like
It would be quite helpful, if we could combine probabilistic policy with other types. For eg:
combining
string_attribute
policy, we can construct logic such asif http.route matches 'foo' (string_attribute policy)
then apply sampling_percentage of 0.1
or similarly, if
attribute.foo matches bar
then apply sampling_percentage of 50
and so on.
Describe alternatives you've considered
Other option seems to be to use composite policy, though that doesnt allow probabilistic sampling (based on percent of events), and rather only has the option of defining spans/second.
Additional context
No response
The text was updated successfully, but these errors were encountered: