-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Introducing rewrite_tag breaks multiline in 1.8.9 #4325
Comments
Could you share output of out_stdout plugin ? (ok case and broken case) We discuss re-design for multiline filter #4309 |
Thanks for the information!
Stdout for ok case: https://github.com/fluent/fluent-bit/files/7574459/norewrite.txt
Stdout for broken case: https://github.com/fluent/fluent-bit/files/7574460/rewrite.txt
Although using multiline before rewrite_tag does work in this case, it is useless for my whole use-case. I use rewrite_tag to split logs coming from different logging systems in order to have only .NET logs pass through multiline filter, not HAProxy logs, for example.
… 20 нояб. 2021 г., в 03:00, Takahiro Yamashita ***@***.***> написал(а):
Could you share output of out_stdout plugin ? (ok case and broken case)
Could you try using multiline filter before rewrite_tag filter if you can ?
tail -> kubernetes -> multiline -> rewrite_tag -> ...
We discuss re-design for multiline filter #4309 <#4309>
Since current multiline filter doesn't work and that issue is depended on input plugin. #4173 <#4173>
rewrite_tag emits record using in_emitter plugin and I think in_emitter also cause the issue.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub <#4325 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AAW6EINDWOABIM2QMFNHY2TUM3QIDANCNFSM5IB5HHXA>.
Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
Thank you. I tested below config to simplify the issue.
|
in_emitter writes records to msgpack buffer directly from v1.8.9. It is to avoid exausting memory on high load. However it causes an issue when using mutiline parser. fluent#4325 This patch is to be selectable sync/async mode. in_emitter supports 'async_emit' property to select it. Default is 'false'. If it is 'true', in_emitter tries to buffer records like v1.8.8. Signed-off-by: Takahiro Yamashita <[email protected]>
I'm not sure how the above PR is supposed to fix this, could you elaborate, please? As it seems to me, there is new flag |
Hmm.
|
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 |
The same issue on 1.8.10 |
@starteleport Thank you for comment. Hmm the below config is working correctly using #4357. |
@starteleport Thank you. @ozzy-ext Does it work correctly on v1.8.8 ? |
Yes, it does! But v1.8.9 has issue. It suits me! Good! |
We are also using the multiline parser in combination with rewrite_tag. ( The following list shows what changes are necessary in the different versions to get back to a working state: 1.8.9, 1.8.10: 1.8.11: 1.8.12: @nokute78 @edsiper @PettitWesley Will this be fixed in the near future or will this plugin combination stay in this broken state? Thank you! |
@nokute78 @edsiper @PettitWesley Still not working in v1.9.1 |
@drbugfinder-work @ozzy-ext I think part of whats going on here is that you discovered that the multiline filter didn't/doesn't work... I fixed this when I added the new buffer mode (defaults to true) which was released in 1.8.12. That's the first version where the multiline filter works as you expect. However, then we made a mistake in the 1.9 release... we accidentally forgot to merge the buffer mode commits into it, and so 1.9.0 and 1.9.1 were actually released without the feature. We apologize for this and it will be fixed for 1.9.2 |
@PettitWesley @ozzy-ext @nokute78 Since the above reverts are related to |
@drbugfinder-work I sent a patch #4357 (has not been merged yet) I have no good ideas to date to answer below review comment .... |
@nokute78 |
@nokute78 Unfortunately functionality is broken again in v1.9.3 (with your patch applied). Must be related to the changes: 57ecb32 |
I noted current status #4357 (comment) .
bug2.conf:
|
@nokute78 @PettitWesley A configuration that we use is like:
We found out, that if multiple streams are getting matched by this ONE multiline filter, only the first processed stream is handled correctly. All subsequent streams will not getting converted into multiline. If we split the multiline into multiple filters where only one stream will be the source for the multiline processing, then everything works fine again:
This behaviour occurred with v1.9.3, as I wrote in #4325 (comment). Before that change a wildcard could be used to process records from multiple sources and all our tests were fine. This new behaviour is definitely a regression, as you no longer can handle multiple tag streams with the same multiline filter. (You can however use the wildcard in the match pattern, as long as only one stream matches it) |
Please also see: #5524 (comment) |
@drbugfinder-work Thank you for reporting. |
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 5 days. Maintainers can add the |
This issue was closed because it has been stalled for 5 days with no activity. |
Bug Report
Describe the bug
I have a pipeline:
tail -> kubernetes -> multiline -> (omitted for brevity) -> es
. I want to introducerewrite_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 tostart_state
.To Reproduce
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
Additional context
This works on 1.8.6.
The text was updated successfully, but these errors were encountered: