Class: Trifle::Logger::Middleware::Sidekiq
- Inherits:
-
Object
- Object
- Trifle::Logger::Middleware::Sidekiq
- Defined in:
- lib/trifle/logger/middleware/sidekiq.rb
Instance Method Summary collapse
Instance Method Details
#call(_worker, job, _queue) ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/trifle/logger/middleware/sidekiq.rb', line 7 def call(_worker, job, _queue) Trifle::Logger.tracer = tracer_for(job: job) yield rescue => e # rubocop:disable Style/RescueStandardError Trifle::Logger.tracer&.trace("Exception: #{e}", state: :error) Trifle::Logger.tracer&.fail! raise e ensure Trifle::Logger.tracer&.wrapup end |