Skip to content
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

out_loki: allow sending unquoted strings #8814

Merged
merged 1 commit into from
Jun 24, 2024

Commits on May 10, 2024

  1. 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 <iandrewt@icloud.com>
    iandrewt committed May 10, 2024
    Configuration menu
    Copy the full SHA
    f06060e View commit details
    Browse the repository at this point in the history