lib/raven/sidekiq.rb in sentry-raven-0.8.0 vs lib/raven/sidekiq.rb in sentry-raven-0.9.0

- old
+ new

@@ -1,10 +1,14 @@ +require 'time' + module Raven class Sidekiq def call(worker, msg, queue) + started_at = Time.now yield rescue => ex - Raven.capture_exception(ex, :extra => { :sidekiq => msg }) + Raven.capture_exception(ex, :extra => { :sidekiq => msg }, + :time_spent => Time.now-started_at) raise end end end