Fix Sidekiq reporting to Sentry outside of job contexts
We have a module that processes Sidekiq job data before sending it to Sentry. However, if Sentry is enabled (which means we'll use this class) and Sidekiq encountered an error outside of a job's context, the processor itself could break, which is extra-bad: we won't get anything in Sentry and we actually have two problems. Sidekiq will still log something like this: !!! ERROR HANDLER THREW AN ERROR !!! But we shouldn't permit that to happen. The motivating example for this case was having the Sidekiq metrics server unable to bind to its port because something else was already using this. By default it uses port 8082 so running this script will bind to that port and prevent Sidekiq from using it: #!/usr/bin/env ruby require 'webrick' server = WEBrick::HTTPServer.new(BindAddress: "0.0.0.0", Port: 8082, DocumentRoot: ".") trap("INT") { server.shutdown } server.start Changelog: fixed
Showing
Please register or sign in to comment