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
Add conn shutdown error log. Improve other error log messages #33
Conversation
end | ||
connection.on_blocked do | ||
@logger.warn("RabbitMQ connection blocked! Check your RabbitMQ instance!", | ||
:url => connection_url(connection)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we sure this (connection
) does not log any auth information?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see masking is done below
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I never print the password.
def connection_url(connection) | ||
user_pass = connection.user ? "#{connection.user}:XXXXXX@" : "" | ||
protocol = params["ssl"] ? "amqps" : "amqp" | ||
"#{protocol}://#{user_pass}#{connection.host}:#{connection.port}#{connection.vhost}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah I see this here. Ignore my comment above
:url => connection_url(connection)) | ||
end | ||
connection.on_unblocked do | ||
@logger.warn("RabbitMQ connection unblocked!", :url => connection_url(connection)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we make this info
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This has been warn for a long time. I think it is something that is warning level, normally queues should not be blocked unless there's a problem.
LGTM |
b8323e3
to
1b90559
Compare
Andrew Cholakian merged this into the following branches!
|
Previously, if a connection died it would recover, but there would be no indication of an error. This was a problem in logstash-plugins/logstash-input-rabbitmq#76
Including the URL will help users debug things.