Open duj4 opened 3 months ago
Same issue had been opened in https://github.com/fluent/fluent-bit/issues/4227 but without any further update.
Thanks @patrick-stephens 's suggestion, Lua can remove the last "\n" but it will twist the record order:
Any further suggestion would be appreciated.
Another workaround is add a "\n" to the end of parser to match the newly added newline, so the new parser will be:
However, it would be better to fix the "adding newline" issue natively. @lecaros
hi there. What's the impact of this issue other than the visualization in stdout?
hi @lecaros , thanks for the reply.
The impact I could see for now is the visualization in either output or Grafana, but that's not a big deal, you may close this one for now.
Bug Report
Describe the bug “\n” will be added when using multiline.parser.
To Reproduce The simplest one is the official one: before:
after:
Expected behavior Both single line and multi-line logs should be as still, no "\n" is added:
Screenshots Another example in my own case:
multiline-parser:![image](https://github.com/fluent/fluent-bit/assets/19278537/5e41630f-b9bd-4a85-a224-4dc53acfab3c)
parser:![image](https://github.com/fluent/fluent-bit/assets/19278537/d00c1070-831f-4bab-8ba5-435b154cfe5e)
before:![image](https://github.com/fluent/fluent-bit/assets/19278537/c512a094-7320-4068-b8fe-598b9284721c)
after:![image](https://github.com/fluent/fluent-bit/assets/19278537/b5cfe1eb-557a-404c-a832-83c14d15cabb)
Your Environment