-
Notifications
You must be signed in to change notification settings - Fork 145
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
PUB-218 enhanced preprocessor rules. #509
Conversation
5375123
to
2575e14
Compare
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.
general feedback:
proxy/src/main/java/com/wavefront/agent/preprocessor/PreprocessorUtil.java
Outdated
Show resolved
Hide resolved
proxy/src/main/java/com/wavefront/agent/preprocessor/PreprocessorUtil.java
Outdated
Show resolved
Hide resolved
proxy/src/main/java/com/wavefront/agent/preprocessor/PreprocessorUtil.java
Outdated
Show resolved
Hide resolved
proxy/src/main/java/com/wavefront/agent/preprocessor/PreprocessorUtil.java
Outdated
Show resolved
Hide resolved
proxy/src/main/java/com/wavefront/agent/preprocessor/PreprocessorUtil.java
Outdated
Show resolved
Hide resolved
proxy/src/main/java/com/wavefront/agent/preprocessor/PreprocessorUtil.java
Outdated
Show resolved
Hide resolved
proxy/src/main/java/com/wavefront/agent/preprocessor/PreprocessorConfigManager.java
Outdated
Show resolved
Hide resolved
.../src/main/java/com/wavefront/agent/preprocessor/ReportPointAddTagIfNotExistsTransformer.java
Outdated
Show resolved
Hide resolved
Gist: We introduced a new argument denoted in yaml with the key "if", whose value denotes a predicate function. The preprocessor rule will apply to a given entity if this predicate function evaluates to true. We will be calling this as the "v2PredicateKey" and its corresponding predicate function as "v2Predicate". Semantics and behavior changes: 1. v2Predicate applies to all scopes except for "pointline" 2. For "Filtering" preprocessor rules, Previously v1Predicates(i.e. [match], [scope] arguments) were considered mandatory. With this change, v1Predicates are considered optional, if v2Predicate present. However, note that v1Predicates cannot be specified and left blank(this is still considered invalid). If both v1Predicates and v2Predicate is specified, then both need to be satisfied to apply the rule.
59899f2
to
7ef0d4b
Compare
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 think we are almost there! I made a few comments/suggestions, PTAL.
And, of course, MOAR UNIT TESTS :)
proxy/src/main/java/com/wavefront/agent/preprocessor/PreprocessorConfigManager.java
Outdated
Show resolved
Hide resolved
proxy/src/main/java/com/wavefront/agent/preprocessor/ReportPointAddTagTransformer.java
Outdated
Show resolved
Hide resolved
proxy/src/main/java/com/wavefront/agent/preprocessor/ReportPointAddTagTransformer.java
Outdated
Show resolved
Hide resolved
proxy/src/main/java/com/wavefront/agent/preprocessor/ReportPointWhitelistRegexFilter.java
Outdated
Show resolved
Hide resolved
proxy/src/main/java/com/wavefront/agent/preprocessor/predicate/ContainsPredicate.java
Outdated
Show resolved
Hide resolved
proxy/src/main/java/com/wavefront/agent/preprocessor/PreprocessorUtil.java
Outdated
Show resolved
Hide resolved
…fore passing them on to a rule, add unit tests.
TFTR, didn't add unit tests previously to avoid having to rework on them if anything needed change based on your review comments. Added them now. |
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!
Gist:
We introduced a new argument denoted in yaml with the key "if", whose value denotes a predicate function. The preprocessor rule will apply to a given entity if this predicate function evaluates to true. We will be calling this as the "v2PredicateKey" and its corresponding predicate function as "v2Predicate".
Semantics and behavior changes: