-
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_monitor_agent: get_monitor_info: fix NoMethodError #1365
Conversation
Code looks good to me. |
Good catch :) |
@tagomoris san Adding So, may I leave my fix as is? |
@shuji-koike it makes sense. But it's worth to provide information to make it easy to debug such problems. # initialize @first_warn = false # in #initialize
rescue => e
log.error # brabrabra
if !@first_warn
@first_warn = true
log.error_stacktrace
end |
@tagomoris san I've updated my fix -> b38a791 I didn't notice there was a similar issue -> #1335, sorry! |
Hmm, This fix still have some problems:
We should show |
@shuji-koike ping? |
@tagomoris san |
I would have to say that I am not really convinced with this fix. I understand that logging is important. I think the real problem is... In
In Therefore, checking I removed the |
"suppress repeated stacktrace" option will suppress the stacktraces which is just equal to the previous one. If any error occurs in other place of code, the same stacktrace will be shown in log. |
Basically, checking This pull-request is to show where the NoMethodError occurs and where the bug hits. This requires stacktrace for further investigation, so we need to handle NoMethodError in special way. |
@tagomoris san Thanks for your advice 😸 |
LGTM |
@shuji-koike Merged. Thank you for contribution! |
This is my fix for #1364.
I thought it may be better to add a
resuce e: NoMethodError
around here -> https://github.com/shuji-koike/fluentd/blob/be7ffb2/lib/fluent/plugin/in_monitor_agent.rb#L344-L346If so, I will fix my commit.