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

change filter_stream to filter #263

Closed
grosser opened this issue Sep 27, 2020 · 3 comments · Fixed by #276
Closed

change filter_stream to filter #263

grosser opened this issue Sep 27, 2020 · 3 comments · Fixed by #276

Comments

@grosser
Copy link
Contributor

grosser commented Sep 27, 2020

I wrote some other plugins and alway used filter, so wanted to check which is best and https://docs.fluentd.org/filter#filter-chain-optimization says to not use filter_stream ... is there any reason to keep it or can it be changed as long as the tests pass ?

@jcantrill
Copy link
Contributor

I wrote some other plugins and alway used filter, so wanted to check which is best and https://docs.fluentd.org/filter#filter-chain-optimization says to not use filter_stream ... is there any reason to keep it or can it be changed as long as the tests pass ?

I defer to you here. I know of no reason it needs to be implemented as-is. Refactoring is acceptible IMO:

  • if it makes the code more readable
  • tests continue to pass
  • It meets recommended plugin guidelines

@cosmo0920
Copy link

cosmo0920 commented Dec 1, 2020

From this PR's benchmarks, using filter chain optimization makes around 10 ~ 20% faster than using #filter_stream.

But I have no idea that using #filter method whether improves code readability and continue to pass unit tests or not.

@grosser
Copy link
Contributor Author

grosser commented Dec 1, 2020

I started using https://github.com/grosser/fluent-plugin-kubelet_metadata (which also uses filter)so no longer working on this, can close if nobody else wants it.

jcantrill added a commit to jcantrill/fluent-plugin-kubernetes_metadata_filter that referenced this issue Jan 23, 2021
jcantrill added a commit to jcantrill/fluent-plugin-kubernetes_metadata_filter that referenced this issue Jan 23, 2021
jcantrill added a commit to jcantrill/fluent-plugin-kubernetes_metadata_filter that referenced this issue Jan 25, 2021
jcantrill added a commit to jcantrill/fluent-plugin-kubernetes_metadata_filter that referenced this issue Jan 25, 2021
jcantrill added a commit to jcantrill/fluent-plugin-kubernetes_metadata_filter that referenced this issue Jun 24, 2022
jcantrill added a commit to jcantrill/fluent-plugin-kubernetes_metadata_filter that referenced this issue Jun 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants