Class: Lamian::SidekiqRavenMiddleware

Inherits:
Object
  • Object
show all
Defined in:
lib/lamian/sidekiq_raven_middleware.rb

Overview

A sidekiq middleware

Instance Method Summary collapse

Instance Method Details

#callObject

Adds current lamian log to the extra part of raven events generated inside sidekiq jobs



6
7
8
9
10
11
12
13
# File 'lib/lamian/sidekiq_raven_middleware.rb', line 6

def call(*)
  Lamian.run do
    yield
  rescue Exception # rubocop:disable Lint/RescueException
    Raven.extra_context # Just trigger saving of the current log
    raise
  end
end