You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Maxi G Levaggi edited this page Oct 27, 2017
·
7 revisions
Shoryuken middleware to capture worker errors and send them on to Sentry.io
module Shoryuken
module Middleware
module Server
class RavenReporter
def call(worker_instance, queue, sqs_msg, body)
tags = { job: body['job_class'], queue: queue }
context = { message: body}
Raven.capture(tags: tags, extra: context) do
yield
end
end
end
end
end
end
Shoryuken.configure_server do |config|
config.server_middleware do |chain|
chain.add Shoryuken::Middleware::Server::RavenReporter
end
end