Closed GiedriusS closed 2 years ago
Use the new filter API instead of filter_stream. Usage of the filter_stream API disables some optimizations as per the docs and logs:
filter
filter_stream
disable filter chain optimization because [Fluent::Plugin::StringScrubFilter] uses `#filter_stream` method.
Docs: https://docs.fluentd.org/filter#filter-chain-optimization.
This new API has been implemented in ~2017 so I think it's safe to just switch to it.
Tests pass without any change:
Loaded suite /home/giedrius/.rbenv/versions/2.7.2/lib/ruby/gems/2.7.0/gems/rake-13.0.6/lib/rake/rake_test_loader Started ......... Finished in 0.052871143 seconds. ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 9 tests, 40 assertions, 0 failures, 0 errors, 0 pendings, 0 omissions, 0 notifications 100% passed ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- 170.23 tests/s, 756.56 assertions/s
Thanks.
Use the new
filter
API instead offilter_stream
. Usage of thefilter_stream
API disables some optimizations as per the docs and logs:Docs: https://docs.fluentd.org/filter#filter-chain-optimization.
This new API has been implemented in ~2017 so I think it's safe to just switch to it.
Tests pass without any change: