Fix decode_json_fields processor to always add error key#29107
Fix decode_json_fields processor to always add error key#29107belimawr merged 4 commits intoelastic:masterfrom
decode_json_fields processor to always add error key#29107Conversation
💚 Build Succeeded
Expand to view the summary
Build stats
Test stats 🧪
💚 Flaky test reportTests succeeded. 🤖 GitHub commentsTo re-run your PR in the CI, just comment with:
|
|
This pull request is now in conflicts. Could you fix it? 🙏 |
When the `decode_json_fields` processor encountered an error while decoding the JSON it was not always respecting the `add_error_key` configuration. This commit fixes it.
775fa1b to
c469e56
Compare
|
Pinging @elastic/elastic-agent-data-plane (Team:Elastic-Agent-Data-Plane) |
When the `decode_json_fields` processor encountered an error while decoding the JSON it was not always respecting the `add_error_key` configuration. This commit fixes it. (cherry picked from commit 37c6229)
When the `decode_json_fields` processor encountered an error while decoding the JSON it was not always respecting the `add_error_key` configuration. This commit fixes it. (cherry picked from commit 37c6229)
* upstream/master: (577 commits) Remove Journalbeat (elastic#29131) Add note that there is no warranty or support for generator code (elastic#28797) packetbeat: preparation for npcap addition (elastic#29017) Use the generic helper for opening file to read in filestream (elastic#29180) Workflow for macos (elastic#29174) Fix `decode_json_fields` processor to always add error key (elastic#29107) Workflow for macos (elastic#29156) Fix agent download timeout values in yaml files (elastic#29039) Added workflow file for builds with macos (elastic#29148) CI: enable AWS cloud testing on a PR basis if changes in certain files (elastic#29047) Remove links to Journalbeat (elastic#29134) Fix rds metadata in cloudwatch metricset (elastic#29106) [mergify]: notify conflicts in PRs that are still open (elastic#29122) Use NamedWatcher in Agent's k8s provider (elastic#29095) override host on statsd metricset (elastic#29103) Skip config check in autodiscover for duplicated configurations (elastic#29048) Change "filebeat.config.modules.enabled" to "true" (elastic#28769) Remove deprecated spool queue from Beats (elastic#28869) Add `beat` field back to beat.stats (elastic#29094) Revert "Move labels and annotations under kubernetes.namespace. (elastic#27917)" (elastic#29069) ...
* upstream/master: [libbeat] Fix add_labels flattening of arrays values (elastic#29211) Change elastic-agent pprof default to false (elastic#29155) elastic#28472 fix flaky tests in libbeat fmtstr to use time.UTC instead of time.Local (elastic#28473) Adopt `parsers` in Filebeat's journald input (elastic#29070) [Elastic Agent] Add process error handling guidelines (elastic#29152) winlogbeat/sys/winevent: use reflect IsZero method (elastic#29190) Remove Journalbeat (elastic#29131) Add note that there is no warranty or support for generator code (elastic#28797) packetbeat: preparation for npcap addition (elastic#29017) Use the generic helper for opening file to read in filestream (elastic#29180) Workflow for macos (elastic#29174) Fix `decode_json_fields` processor to always add error key (elastic#29107)
What does this PR do?
When the
decode_json_fieldsprocessor encountered an error whiledecoding the JSON it was not always respecting the
add_error_keyconfiguration.
This commit fixes it.
Why is it important?
Errors from
decode_json_fieldsprocessor are now clearly reportedChecklist
- [ ] I have made corresponding changes to the documentation- [ ] I have made corresponding change to the default configuration filesCHANGELOG.next.asciidocorCHANGELOG-developer.next.asciidoc.Author's Checklist
How to test this PR locally
Add the following to you filebeat configuration:
Make sure the
my_json_keyfield of the event is an invalid JSON.Related issues
Use cases
Screenshots
Logs