Skip to content

Conversation

adamenger
Copy link

@adamenger adamenger commented Nov 14, 2018

Hi,

According to the docs, we should be emitting routing errors via emit_error_event. I've noticed that once FluentD hits an error, it doesn't ship it to the output, and it fails to recover.

However when I modify the plugin to contain this line, it emits the error properly and continues past the error.

Could you please let me know if this is a good or bad idea?

Thank you,

rescue => e
log.error "unexpected error", :error => e.to_s
log.error_backtrace
router.emit_error_event(tag, time, record, e)
Copy link
Owner

Choose a reason for hiding this comment

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

record may be nil when user doesn't specify parser. Need to check record / map value.
In addition, need option to emit error event because emit event in this point is sometimes not useful, e.g. hard to recover broken value.

Copy link
Author

Choose a reason for hiding this comment

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

What would we be checking or comparing the record/map value to? Could you give me a quick example of how we could check this accurately?

You make a good point about the config option and not always emitting errors. I'll see if I can add that code for the config quickly.

Thanks for your feedback!

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