Class: Lamian::SidekiqSentryMiddleware
- Inherits:
-
Object
- Object
- Lamian::SidekiqSentryMiddleware
- Defined in:
- lib/lamian/sidekiq_sentry_middleware.rb
Overview
A sidekiq middleware
Instance Method Summary collapse
-
#call ⇒ Object
Adds current lamian log to the extra part of raven events generated inside sidekiq jobs.
Instance Method Details
#call ⇒ Object
Adds current lamian log to the extra part of raven events generated inside sidekiq jobs
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/lamian/sidekiq_sentry_middleware.rb', line 6 def call(*) Lamian.run do yield rescue Exception # rubocop:disable Lint/RescueException # Save current log log = Lamian.dump_limited Sentry.set_extras(Lamian::SENTRY_EXTRA_KEY => log) if log raise end end |