ruby-on-railsresquebugsnag

How to configure Bugsnag with Resque::Failure?


I want to use Bugsnag to report failed Resque jobs. How do I configure it? The documentation specifically mentions integrations with Resque, but offers no guidance as to how.

Do I have to write a Resque::Failure::Bugsnag class? Did someone else already write it so I don't have to?


Solution

  • The Bugsnag ruby gem is set up to automatically integrate with things like Resque. In theory all you need to do is add bugsnag and resque to your Gemfile:

    gem "resque"
    gem "bugsnag"
    

    and https://github.com/bugsnag/bugsnag-ruby/blob/master/lib/bugsnag/resque.rb will do the integration work for you.

    disclaimer: I work for Bugsnag, and commit to the bugsnag rubygem.