-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[processor/tailsampling] Drop policy type #39668
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
Merged
Merged
Conversation
This file contains hidden or 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]>
You are codeowner of this component. |
atoulme
approved these changes
Apr 29, 2025
jmacd
reviewed
Apr 29, 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.
LGTM
atoulme
pushed a commit
that referenced
this pull request
May 2, 2025
Documentation for the recently added [drop policy type](#39668). The examples replace the use of invert_match. I attempted to make as few changes as necessary at this time. I intended to add further documentation while deprecating the top-level invert_match logic/decisions in a separate pull-request. Signed-off-by: Sean Porter <[email protected]>
vincentfree
pushed a commit
to ing-bank/opentelemetry-collector-contrib
that referenced
this pull request
May 6, 2025
#### Description This pull-request introduces a new policy type to explicitly drop traces regardless of other policy decisions. The new `drop` policy type behaves much like an `and`, however, it returns a `Dropped` decision when all of its policies return `Sampled`. A `Dropped` decision takes precedence over all others. The `Dropped` decision is not new, however, it was unused and therefor safe to use for this purpose. This new policy type is very **approachable** and capable. This new policy type can be used to replace the top-level (not within an `and` policy) use of `invert_match` to control the final sampling decision. We could deprecate the current `invert_match` top-level decision logic. The string, numeric, and boolean filter policies still support `invert_match`, which continues to flip the decision for the individual policy. Let `invert_match` be simple. Example: ``` { name: drop-it-like-its-hot, type: drop, drop: { drop_sub_policy: [ { name: do-not-sample, type: boolean_attribute, boolean_attribute: { key: app.do_not_sample, value: true }, } ] } } ``` This is a reduced version of a previous PR open-telemetry#37760 #### Related Issues - open-telemetry#36673 - open-telemetry#33656 - open-telemetry#36795 - open-telemetry#34296 - open-telemetry#34085 - open-telemetry#29637 - open-telemetry#27049 - Probably more 😅 --------- Signed-off-by: Sean Porter <[email protected]>
vincentfree
pushed a commit
to ing-bank/opentelemetry-collector-contrib
that referenced
this pull request
May 6, 2025
Documentation for the recently added [drop policy type](open-telemetry#39668). The examples replace the use of invert_match. I attempted to make as few changes as necessary at this time. I intended to add further documentation while deprecating the top-level invert_match logic/decisions in a separate pull-request. Signed-off-by: Sean Porter <[email protected]> # Conflicts: # processor/tailsamplingprocessor/README.md
atoulme
pushed a commit
that referenced
this pull request
May 9, 2025
#### Description Users can now use the newly added [Drop policy type](#39668) to explicitly drop (not sample) specific traces regardless of other policy decisions. This pull-request deprecates the invert sample decisions. This pull-request introduces a feature gate/flag, `processor.tailsamplingprocessor.disableinvertdecisions`, to disable the invert sampling decisions. The gate/flag influences the underlying policy evaluation for simplicity. With the gate/flag enabled, the string, numeric, and boolean filter policies still support `invert_match`, which continues to flip the decision for the individual policy (only `Sampled` and `NotSampled`). Letting `invert_match` be simple. #### Related Issues - #36673 - #33656 - #36795 - #34296 - #34085 - #29637 - #27049 - Probably more 😅 --------- Signed-off-by: Sean Porter <[email protected]>
vincentfree
pushed a commit
to ing-bank/opentelemetry-collector-contrib
that referenced
this pull request
May 20, 2025
#### Description This pull-request introduces a new policy type to explicitly drop traces regardless of other policy decisions. The new `drop` policy type behaves much like an `and`, however, it returns a `Dropped` decision when all of its policies return `Sampled`. A `Dropped` decision takes precedence over all others. The `Dropped` decision is not new, however, it was unused and therefor safe to use for this purpose. This new policy type is very **approachable** and capable. This new policy type can be used to replace the top-level (not within an `and` policy) use of `invert_match` to control the final sampling decision. We could deprecate the current `invert_match` top-level decision logic. The string, numeric, and boolean filter policies still support `invert_match`, which continues to flip the decision for the individual policy. Let `invert_match` be simple. Example: ``` { name: drop-it-like-its-hot, type: drop, drop: { drop_sub_policy: [ { name: do-not-sample, type: boolean_attribute, boolean_attribute: { key: app.do_not_sample, value: true }, } ] } } ``` This is a reduced version of a previous PR open-telemetry#37760 #### Related Issues - open-telemetry#36673 - open-telemetry#33656 - open-telemetry#36795 - open-telemetry#34296 - open-telemetry#34085 - open-telemetry#29637 - open-telemetry#27049 - Probably more 😅 --------- Signed-off-by: Sean Porter <[email protected]>
dragonlord93
pushed a commit
to dragonlord93/opentelemetry-collector-contrib
that referenced
this pull request
May 23, 2025
Documentation for the recently added [drop policy type](open-telemetry#39668). The examples replace the use of invert_match. I attempted to make as few changes as necessary at this time. I intended to add further documentation while deprecating the top-level invert_match logic/decisions in a separate pull-request. Signed-off-by: Sean Porter <[email protected]>
dragonlord93
pushed a commit
to dragonlord93/opentelemetry-collector-contrib
that referenced
this pull request
May 23, 2025
…metry#39833) #### Description Users can now use the newly added [Drop policy type](open-telemetry#39668) to explicitly drop (not sample) specific traces regardless of other policy decisions. This pull-request deprecates the invert sample decisions. This pull-request introduces a feature gate/flag, `processor.tailsamplingprocessor.disableinvertdecisions`, to disable the invert sampling decisions. The gate/flag influences the underlying policy evaluation for simplicity. With the gate/flag enabled, the string, numeric, and boolean filter policies still support `invert_match`, which continues to flip the decision for the individual policy (only `Sampled` and `NotSampled`). Letting `invert_match` be simple. #### Related Issues - open-telemetry#36673 - open-telemetry#33656 - open-telemetry#36795 - open-telemetry#34296 - open-telemetry#34085 - open-telemetry#29637 - open-telemetry#27049 - Probably more 😅 --------- Signed-off-by: Sean Porter <[email protected]>
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 introduces a new policy type to explicitly drop traces regardless of other policy decisions. The new
drop
policy type behaves much like anand
, however, it returns aDropped
decision when all of its policies returnSampled
. ADropped
decision takes precedence over all others. TheDropped
decision is not new, however, it was unused and therefor safe to use for this purpose. This new policy type is very approachable and capable.This new policy type can be used to replace the top-level (not within an
and
policy) use ofinvert_match
to control the final sampling decision. We could deprecate the currentinvert_match
top-level decision logic. The string, numeric, and boolean filter policies still supportinvert_match
, which continues to flip the decision for the individual policy. Letinvert_match
be simple.Example:
This is a reduced version of a previous PR #37760
Related Issues