-
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.
x-pack/filebeat/input/http_endpoint: fix handling of deeply nested nu…
…meric values (#40115) In order to avoid precision loss during processing of numeric values that cannot be exactly represented in a double-precision floating point value, the json.Number unmarshaller is used. This has the effect that conversion to native types on exit from the CEL program fails since protobuf does not handle json.Number. For non-nested values that are referenced by the CEL runtime, this does not caues an issue since the native-to-value conversion will attempt to convert the string representation of the numeric value. This conversion is not recursively applied. Recursively apply the type conversion to all child values on referencing a value; converting numeric values to the most exact type and falling back to a string representation if no native numeric represetation is possible. Also add an undocumented debug function equivalent to the debug that is available in the CEL input and improve error logging.
- Loading branch information
Showing
5 changed files
with
74 additions
and
14 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
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