-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
in_forward: Add source_hostname_key parameter. fix #804 #807
Conversation
@@ -47,6 +47,8 @@ def initialize | |||
config_param :chunk_size_limit, :size, default: nil | |||
desc 'Skip an event if incoming event is invalid.' | |||
config_param :skip_invalid_event, :bool, default: false | |||
desc "The field name of the client's hostname." |
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.
IMO it's better to have a note for performance degradation.
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.
It seems document issue like this: https://github.com/fluent/fluentd-docs/pull/215/files
This feature will be supported by porting into v0.14 API and using |
@tagomoris How to insert client's hostname by inject plugin helper? |
295731c
to
91af142
Compare
Rebased. |
91af142
to
98ca682
Compare
Oh, I misunderstood the problem. |
IMO, parameter name should be |
It is derived from |
Adding newer name to |
Renamed. |
events.each {|tag,time,record| | ||
entries << [time, record] | ||
} | ||
send_data ['tag1', entries].to_msgpack |
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.
I cannot understand why this code works well... time
should be an ext typed value, but there are no info about it.
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.
Correct way to do it is using Fluent::MessagePackFactory
.
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.
EventTime is serialized to int via to_msgpack
and this is why this test works.
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.
Yeah, using Fluent::MessagePackFactory is better. "packed forward protocol with source_hostname_key" case does it.
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.
It looks incorrect behavior to simulate out_forward
... but not so serious for this test.
LGTM. |
Okay. After test passed, I will merge this patch. |
No description provided.