Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lib/raven/integrations/delayed_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ class Raven < ::Delayed::Plugin

# Make sure we propagate the failure!
raise exception
ensure
Context.clear!
BreadcrumbBuffer.clear!
end
end
end
Expand Down
7 changes: 3 additions & 4 deletions lib/raven/integrations/rack.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ def initialize(app)
end

def call(env)
# clear context at the beginning of the request to ensure a clean slate
Context.clear!
BreadcrumbBuffer.clear!

# store the current environment in our local context for arbitrary
# callers
env['raven.requested_at'] = Time.now
Expand All @@ -64,6 +60,9 @@ def call(env)
Raven::Rack.capture_exception(error, env) if error

response
ensure
Context.clear!
BreadcrumbBuffer.clear!
end
end

Expand Down
3 changes: 3 additions & 0 deletions lib/raven/integrations/sidekiq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ def call(_worker, msg, _queue)
Raven.capture_exception(ex, :extra => { :sidekiq => msg },
:time_spent => Time.now-started_at)
raise
ensure
Context.clear!
BreadcrumbBuffer.clear!
end
end
end
Expand Down