Reputation: 6135
What is the best way to send errors from clockwork to Airbrake?
Upvotes: 0
Views: 243
Reputation: 107142
Just add the following to your clockwork definition:
module Clockwork
error_handler do |error|
Airbrake.notify_or_ignore(error)
end
# existing configuration
end
See: Clockwork Docs about error_handler
Upvotes: 1
Reputation: 19839
The airbrake library has an API to notify their service directly without raising an exception. Their GitHub has a ton of documentation on this.
You can do something like this:
Airbrake.notify("Opps!")
Upvotes: 2