Less Annoying Sidekiq Bugsnag Errors

Curated ago by @pelargir

Description

This middleware makes Bugsnag ignore network connection errors raised from Sidekiq jobs. Instead of reporting errors to Bugsnag every time the job retries, we only report these errors if/when the job finally dies. The goal is to eliminate extra noise caused by transient network errors.

1
2
3
Bugsnag.configure do |config|
    config.middleware.use BugsnagSidekiqMiddleware
end

This configures Bugsnag with the middleware to ignore network exceptions.