[processor/tailsampling] Replace invert sampled with drop policy #37760
+343
−135
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 what it should be.This is a breaking change, as existing top-level (not within an
and
orcomposite
) string, numeric, and boolean filter policies used to impact the final decision with itsinvert_match
. They will need to be replaced with adrop
, effectively wrapping them.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 used, making a decision on the first
Sampled
. This reduces tick/decision latency, leading to improved stability and performance.Related Issues