-
Notifications
You must be signed in to change notification settings - Fork 521
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
Created strongly typed PolicyMatch struct from policy config to match values #3025
Created strongly typed PolicyMatch struct from policy config to match values #3025
Conversation
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.
thx for the improvements!
as far as i can tell there should be no change to a user's config correct? the old config will parse and work just fine?
this seems like it would result in some nice perf improvements. dropping the reflection and only doing the regex once. if you had time for benchmarks that would be cool, but no worries if you're busy.
i have one suggestion regarding the interface. i think it would help me see the structure of code better. do you think it makes sense?
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.
This looks like a nice change to me, good work. Thanks for the PR.
@joe-elliott
|
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.
It's looking good. I think the code in attribute.go/intrinsic.go is much more straightforward with your changes.
Looking for some cleanup in splitpolicy.go. Other than that I think this is good to go. Given how we much we rely on this feature I will run it in some on some of our internal clusters after the next round of changes. If everything is looking good then I think this will be ready.
Yup, this times out |
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.
You've gotten this PR into a really nice spot. Code is clear and I love the benchmarks.
I'm going to approve, but not merge just yet to give some maintainers with more experience in this area a chance to review.
Thanks for the contribution! I think everyone will enjoy the more performant filters. |
What this PR does:
Introduced
AttributePolicyMatch
&IntrinsicPolicyMatch
structures to match span attributes based on strongly typed values & precompiled regex which are used to match span attribute values.Which issue(s) this PR fixes:
Fixes #3015
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]