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

Plugin helper tag time hostname #1063

Merged
merged 21 commits into from
Jun 29, 2016
Merged

Conversation

tagomoris
Copy link
Member

This plugin helper is to inject tag, time and hostname into records.
This plugin helper will replace SetTagKeyMixin/SetTimeKeyMixin, by explicit method calls instead of overridden filter_record.

hostname_key is also added to solve feature requests to inject it into a field.

@tagomoris tagomoris force-pushed the plugin-helper-tag-time-hostname branch from f0cd866 to 944cfe6 Compare June 22, 2016 07:58
@tagomoris
Copy link
Member Author

tagomoris commented Jun 22, 2016

This change is based on #1062.
I edited commit history not to depend on #1062.

@tagomoris tagomoris force-pushed the plugin-helper-tag-time-hostname branch from 944cfe6 to 46ebbd3 Compare June 27, 2016 08:13
@tagomoris
Copy link
Member Author

@repeatedly This change is required for v0.14.1 because this change introduces a plugin helper instead of deprecated SetTimeKeyMixin/SetTagKeyMixin, and changes how to write plugins.

@repeatedly
Copy link
Member

Okay, let me check. Please wait.

module Fluent
module PluginHelper
module Inject
def inject_record(tag, time, record)
Copy link
Member

@repeatedly repeatedly Jun 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inject_record is misleading name.
inject is used like inject xxx into yyy so this name seems to mean inject record into yyy.
So we should use other name, inject_value_to_record, mutate_record or something.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plugin Helper methods should be named as ${helper_name}_anything.
So I'll change these names as inject_values_to_record and inject_values_to_event_stream.

@tagomoris
Copy link
Member Author

I pushed some commits to fix (mainly) tests.

…to x86/amd64 floating points.

Using fixed value (calculated in amd64 environment) is unsafe, because some x86 environment (like Windows 32bit)
uses different way to calculate floating point values.
It may cause to make tests to fail.
@tagomoris
Copy link
Member Author

Now CI is green, finally.

@tagomoris tagomoris merged commit 3d285b8 into master Jun 29, 2016
@tagomoris tagomoris deleted the plugin-helper-tag-time-hostname branch June 29, 2016 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants