Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Sidekiq report errors to Rollbar automatically?

I see Mike recommends using an error service to report errors that happen during sidekiq jobs over here: https://www.mikeperham.com/2013/08/25/please-use-an-error-service

There's also this gem, which looks like it adds a middleware to do exactly that: https://github.com/allenwei/sidekiq-rollbar

But there's an issue reported for that gem which indicates that Sidekiq already does this.

Does anyone know what the answer is? Will Sidekiq report errors that happen during jobs via Rollbar automatically, if Rollbar is configured to handle exceptions in a Rails project? Or do I have to write something, or use the gem to do that?

I know Rollbar can use Sidekiq to provide a queue - that just confuses the issue when I try to google for answers.

like image 903
Leslie Viljoen Avatar asked Apr 26 '16 23:04

Leslie Viljoen


1 Answers

Yes, the rollbar gem will add a global exception handler if it detects Sidekiq: https://github.com/rollbar/rollbar-gem/blob/master/lib/rollbar/plugins/sidekiq.rb#L14

like image 132
Mike Perham Avatar answered Oct 05 '22 21:10

Mike Perham