-
Notifications
You must be signed in to change notification settings - Fork 188
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
Add support to tag events when parse_json fails to parse #2745
Conversation
Signed-off-by: Krishna Kondaka <krishkdk@amazon.com>
Signed-off-by: Krishna Kondaka <krishkdk@amazon.com>
Codecov Report
@@ Coverage Diff @@
## main #2745 +/- ##
============================================
+ Coverage 93.72% 93.90% +0.17%
- Complexity 2280 2286 +6
============================================
Files 264 264
Lines 6389 6394 +5
Branches 528 528
============================================
+ Hits 5988 6004 +16
+ Misses 265 254 -11
Partials 136 136
|
@@ -287,6 +288,24 @@ void test_when_condition_skips_processing_when_evaluates_to_false() { | |||
|
|||
} | |||
|
|||
@Test | |||
void test_tags_when_json_parse_fails() { |
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.
What happens if tags don't exist? Can we add a check to ensure we aren't building tag set will null values?
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.
@cmanning09 you mean, I should check to make sure tags are null when no failures? Something like assertThat(parsedEvent.getMetadata().getTags(), equalTo(Set.of()));
to be added in all other tests?
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.
Yes that works. Feel free to add this in a follow up PR.
Description
Add support to tag events when parse_json fails to parse.
Resolves #2744
Adds
tags_on_failure
new option to parse_json processor. An example, parse_json processor config would beIssues Resolved
Resolves #2744
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.