-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Draft
portertech
wants to merge
5
commits into
open-telemetry:main
Choose a base branch
from
portertech:tsp/drop
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Sean Porter <[email protected]>
Signed-off-by: Sean Porter <[email protected]>
Signed-off-by: Sean Porter <[email protected]>
@rjtferreira I am curious to know what you think of this. |
@jpkrohling @evan-bradley I would love your input on this 🙏 |
jpkrohling
reviewed
Feb 8, 2025
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 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