-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…30092) We have a couple of special cases when we set fields on the event based on target field keys: 1. `@timestamp` must be set directly to the `Timestamp` property of the event 2. `@metadata.*` must be put in the `Meta` map instead of `Fields` 3. The rest is put in `Fields` Currently the `Event` struct has the `PutValue` function to account for these special cases, however, some of the processors use `event.Fields.DeepUpdate` which would not handle the special cases. To make it easier to migrate those processors, the new function `event.DeepUpdate` (that can be safely used with the special cases) is introduced. As an example, the `add_fields` processor is migrated to using this new function and its tests have been updated to assert the correct behaviour.
- Loading branch information
Showing
8 changed files
with
344 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.