Skip to content

Instantly share code, notes, and snippets.

@kmayer
Created September 8, 2013 17:41
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kmayer/6486818 to your computer and use it in GitHub Desktop.
Save kmayer/6486818 to your computer and use it in GitHub Desktop.
Sidekiq Exception tracer for NewRelic Add this to your sidekiq initializer
module NewRelic
class SidekiqException
def call(worker, msg, queue)
begin
yield
rescue => exception
NewRelic::Agent.notice_error(exception, :custom_params => msg)
raise exception
end
end
end
end
::Sidekiq.configure_server do |config|
config.server_middleware do |chain|
chain.add ::NewRelic::SidekiqException
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment