Class: ErrorRadar::CaptureJob
- Inherits:
-
ActiveJob::Base
- Object
- ActiveJob::Base
- ErrorRadar::CaptureJob
- Defined in:
- lib/error_radar/capture_job.rb
Overview
Background job for async exception capture. Used when config.async_capture is true. Failures are logged to Rails.logger and swallowed — a broken capture job must not cause retry storms or affect the application.
Instance Method Summary collapse
Instance Method Details
#perform(attrs_json) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/error_radar/capture_job.rb', line 10 def perform(attrs_json) attrs = JSON.parse(attrs_json, symbolize_names: true) log = ErrorLog.record(**attrs) Notifier.dispatch(log) if log rescue StandardError => e ErrorRadar::Tracking.warn_internal("CaptureJob failed: #{e.class}: #{e.}") end |