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

adding error router to rescue in event processing #16

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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,

@@ -126,6 +126,7 @@ def run
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