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

filter_parser: Add emit_invalid_record_to_error parameter #1494

Merged
merged 2 commits into from
Mar 15, 2017

Conversation

repeatedly
Copy link
Member

@repeatedly repeatedly commented Mar 8, 2017

Related to #1480
This is acceptable for me because configuration becomes error prone without this parameter for ignoring unneeded log lines case.

<label @ERROR>
  <match {tag1,tag2,...}>
    @type null
  </match>
</label>

@ERROR label is for capturing unexpected error event so blackhoke usecase is misuse.

Parameter name comes from v0.12's filter_parser.

@repeatedly repeatedly added enhancement Feature request or improve operations v0.14 labels Mar 8, 2017
@repeatedly
Copy link
Member Author

@tagomoris Could you check this?

@repeatedly repeatedly force-pushed the add-suppress-parse-error branch from 9725709 to 0790ae6 Compare March 8, 2017 21:51
@repeatedly repeatedly changed the title filter_parser: Add suppress_parse_error parameter filter_parser: Add emit_invalid_record_to_error parameter Mar 8, 2017
@repeatedly repeatedly requested a review from tagomoris March 9, 2017 08:21
@repeatedly
Copy link
Member Author

@tagomoris ping?

Copy link
Member

@tagomoris tagomoris left a comment

Choose a reason for hiding this comment

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

No need to call router.emit_error_event by itself.
Filter#filter_stream emits events with errors in default.
So this code should only raise errors:
https://github.com/fluent/fluentd/blob/master/lib/fluent/plugin/filter.rb#L55

@repeatedly
Copy link
Member Author

Use raise when no emit case.
With reserve_data true, filter_parser passes incoming data to next filter so can't use raise.

@tagomoris
Copy link
Member

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature request or improve operations v0.14
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants