Similar to the before_notify callback, this adds a before_event callback to allow for intercepting of an event. Within the callback you can inspect or modify the payload, or halt! the event if you do not want it to be sent.
Example:
Honeybadger.configure do |config|
config.before_event do |event|
if event.event_type == "process_action.action_controller" && event[:controller] == "Rails::HealthController"
event.halt!
end
end
end
Event#event_type - Returns the event_type parameter.
Event#ts - Returns the generated timestamp, or the :ts value in the payload if one was present.
Event#[] - Allows you to access the event payload data.
Before submitting a pull request, please make sure the following is done:
If you've fixed a bug or added code that should be tested, add tests!
Similar to the
before_notify
callback, this adds abefore_event
callback to allow for intercepting of an event. Within the callback you can inspect or modify the payload, orhalt!
the event if you do not want it to be sent.Example:
Event#event_type
- Returns theevent_type
parameter.Event#ts
- Returns the generated timestamp, or the:ts
value in the payload if one was present.Event#[]
- Allows you to access the event payload data.Before submitting a pull request, please make sure the following is done:
rake spec
in the repository root.