fluent-bit: Introducing rewrite_tag breaks multiline in 1.8.9
Bug Report
Describe the bug
I have a pipeline: tail -> kubernetes -> multiline -> (omitted for brevity) -> es
. I want to introduce rewrite_tag
so that I have: tail -> kubernetes -> rewrite_tag -> multiline -> (omitted for brevity) -> es
. However, this change breaks multiline parsing. The records are not concatenated AND Kubernetes tags are only left on lines that correspond to start_state
.
To Reproduce
- Download and extract gist: https://gist.github.com/starteleport/ed66f30b7161f185658e711a7a95a2a2
- Compare outputs of
fluent-bit -c fluent-bit-repro-norewrite.conf
andfluent-bit -c fluent-bit-repro-rewrite.conf
.
Expected behavior Both configs produce the same set of multiline records with Kubernetes tags being correctly set.
Screenshots Not applicable
Your Environment
- Version used: reproduced on 1.8.9
- Configuration: please see gist above
- Environment name and version (e.g. Kubernetes? What version?): local
- Server type and version:
- Operating System and version: macOS Monterey
- Filters and plugins: rewrite_tag, multiline, multiline_parser
Additional context This works on 1.8.6.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Reactions: 1
- Comments: 25 (10 by maintainers)
@starteleport Thank you. v1.8.8 buffers records at
in_emitter
and v1.8.9 doesn’t. It changes a number of records which are receivedfilter_multiline
at one time. I think it is root cause.@ozzy-ext Does it work correctly on v1.8.8 ?
Yes, it does! But v1.8.9 has issue. It suits me! Good!
Yes, you are right, it’s only 1.8.9. I’ve tried many times with different versions and got it mixed up. It’s not even working with
rewrite_tag
on 1.8.7 and 1.8.8: I’ve got no records output in caserewrite_tag
is present.Thank you.
I tested below config to simplify the issue. I think https://github.com/fluent/fluent-bit/pull/4128 causes this issue and it is merged from v1.8.9.