-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
[processor/tailsampling] Replace invert sampled with drop policy #37760
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Sean Porter <portertech@gmail.com>
Signed-off-by: Sean Porter <portertech@gmail.com>
Signed-off-by: Sean Porter <portertech@gmail.com>
@rjtferreira I am curious to know what you think of this. |
@jpkrohling @evan-bradley I would love your input on this 🙏 |
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.
I'm the first to say that the invert logic is messed up, but unfortunately, it's used in a lot of places. There are a couple of things I'd like to have:
- either as part of this PR or coming before this PR: a set of examples with their expected outcomes. We have some already, but I feel like we need a real database of examples for people to understand the scenarios. Bonus points if we can make them runnable/tested as part of the CI. Having real use-cases and examples for the policies and the implications when applied together will make it easier for people to use and report bugs.
- this PR definitely needs a feature flag, to enable the new behavior without affecting current users. Take a look at our deprecation policy, but in short: current behavior is the default behavior for two more versions, we warn users about the upcoming behavior change on the next version already, we change the default behavior after N+2, and we remove the feature flag and the old behavior in a few month's time.
This PR was marked stale due to lack of activity. It will be closed in 14 days. |
Description
This pull-request replaces the use of
InvertSampled
andInvertNotSampled
decisions with a new policy type to explicitly drop traces regardless of other policy decisions. The newdrop
policy type behaves much like anand
, however, it returns aDropped
decision when all of its policies returnSampled
. ADropped
decision takes precedence over all others. Other policy types will either returnSampled
orNotSampled
. The string, numeric, and boolean filter policies still supportinvert_match
, which continues to flip the decision for the individual policy. Letinvert_match
be simple.This is a breaking change, as existing top-level (not within an
and
orcomposite
) string, numeric, and boolean filter policies usinginvert_match
will no longer have the same impact on the final decision. These policies will need to be replaced with adrop
, effectively wrapping the existing policy.Using an example
invert_match
policy from the readme:This pull-request also optimizes decision policy evaluation. It will make an earlier decision when drop policy is not in use, making a decision on the first
Sampled
. This reduces tick/decision latency, leading to improved stability and performance.Related Issues