-
Notifications
You must be signed in to change notification settings - Fork 137
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
Allows to pass all message properties to error handlers. #238
Allows to pass all message properties to error handlers. #238
Conversation
@@ -6,7 +6,8 @@ module ErrorHandlers | |||
class Airbrake | |||
include Logging | |||
|
|||
def handle(message_id, payload, consumer, ex) | |||
def handle(properties:, payload:, consumer:, ex:) |
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'm not familiar with this syntax.
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.
OK, so these are required keyword arguments that are available in Ruby 2.0.
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.
correct, I looked at your travis definition and seems we only care about ruby >= 2.0
- "2.3.0"
- "2.2"
- "2.1"
- "2.0"
- "jruby-9.0.0.0"
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.
Bunny only supports 2.0+ in recent versions, so that's fine.
The spec fails because of latest activesupport release:
A choice needs to be made here, whether we want to support older ruby versions or use latest activesupport. |
@gottfrois let's pin to a |
@gottfrois perhaps we want to depend on |
My bad, ruby 2.0 doesn't support |
Message properties can include valuable message informations such as correlation id, message type, app specific headers and many more. When handling consumer process errors, we should be able to make decisions based on any message properties.
activesupport 5 requires Ruby version >= 2.2.2.
203e003
to
7c62d22
Compare
OK, even though this is a breaking change in the error handler API, it makes sense. I'll update change log to highlight this. |
Message properties can include valuable message informations such as
correlation id, message type, app specific headers and many more.
When handling consumer process errors, we should be able to make decisions
based on any message properties.
Note: This is a breaking change in case people created their own error handlers.