-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
out_loki: allow sending unquoted strings
This patch adds a third value to `drop_single_key` - `raw`, which allows sending unquoted strings to Loki when using JSON as the `line_format`. While yes, for the output to be valid JSON, quotes would be expected, Loki does not support reading a plain quoted string with its JSON parser, complaining that it cannot find a `}` character. Instead, you need to use a combination of regexp and line_format expressions to unquote the log before running any other parsers over it. By adding a third value of `raw`, this ensures backwards compatibility for anyone that is already relying on the existing behaviour. Signed-off-by: Andrew Titmuss <[email protected]>
- Loading branch information
Showing
3 changed files
with
242 additions
and
15 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