-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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] fix InvertNotSampled
decision precedence when inside and sub policy
#33671
[processor/tailsampling] fix InvertNotSampled
decision precedence when inside and sub policy
#33671
Conversation
This fixes the handling of AND policies that contain a sub-policy with invert_match=true. Previously if the decision from a policy evaluation was NotSampled or InvertNotSampled it would return a NotSampled decision regardless, effectively downgrading the result. This was breaking the documented behaviour that inverted decisions should take precedence over all others. This is related to the changes made in open-telemetry#9768 that introduced support for using invert_match within and sub policies.
InvertNotSampled
decision precedence when inside and sub policy
Thank you for the PR! This might need a changelog entry: |
@jpkrohling I've added a changelog entry but I wasn't sure whether to classify this as a breaking change or not? The behaviour now matches the documentation with this change but it could be a breaking change for people if they were relying on the old behaviour. |
I believe this is a bug fix. |
…edence when inside and sub policy (open-telemetry#33671)" This reverts commit e2fda02.
Description:
This fixes the handling of AND policies that contain a sub-policy with invert_match=true. Previously if the decision from a policy evaluation was
NotSampled
orInvertNotSampled
it would return aNotSampled
decision regardless, effectively downgrading the result.This was breaking the documented behaviour that inverted decisions should take precedence over all others.
This is related to the changes made in #9768 that introduced support for using invert_match within and sub policies.
Link to tracking Issue: #33656
Testing:
I tested manually that this fixes the issue described in #33656 and also updated the tests. If you have any suggestions for more tests we could add let me know.
Documentation: