-
Notifications
You must be signed in to change notification settings - Fork 17
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
Added encoding and from_encoding parameters #17
Added encoding and from_encoding parameters #17
Conversation
c274950
to
4c1bcec
Compare
There is no point to think about, is it caused by the correction contents here? https://travis-ci.org/kenjiskywalker/fluent-plugin-rds-slowlog/jobs/233084029 -- failed |
This PR seems to be useful. @kenjiskywalker How do you think about this PR? |
@cosmo0920 @yoheimuta |
Thanks! I'll rebase. |
lib/fluent/plugin/in_rds_slowlog.rb
Outdated
@@ -13,9 +13,34 @@ class Fluent::Plugin::Rds_SlowlogInput < Fluent::Plugin::Input | |||
config_param :password, :string, :default => nil, :secret => true | |||
config_param :interval, :integer, :default => 10 | |||
config_param :backup_table, :string, :default => nil | |||
# The encoding after conversion of the input. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just a my thought. Feel free to ignore it.
We can describe parameters how to work with desc
method which can display usage with fluent-plugin-config-format
.
So, we might have to add parameter descriptions with desc
method.
But this is not issue, just a suggestion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks !
It is desirable to add the desc method, so I added a fdf2ad4.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very Good. Thank you!
@kenjiskywalker @cosmo0920 I rebased, so please confirm. |
Thank you 🙏 |
Thanks! |
In our production environment, to_json errors have occurred after updating td-agent v2.3.5.
This error is when fluent-plugin-slack to_json the output of fluent-plugin-rds-slowlog.
Specifically, in-rds-slowlog outputs ASCII-8BIT encoded character string, but out_slack's to_json expects UTF-8 encoded character string, so it is an error.
fluent-plugin-rds-slowlog/lib/fluent/plugin/in_rds_slowlog.rb
Line 71 in d2f1d6c
The direct cause is that the emitted ASCII-8BIT string is not implicitly converted to UTF-8 by current msgpack-ruby, since msgpack-ruby v0.6.0~ is now internally used by updating td-agent (fluentd)
Since we confirmed that this problem will be solved by passing UTF-8 to encoding parameter, we made PR.