Report Active Job errors only on discard
Added
-
Add option to
activejob_report_errors
option to only report errors when a job is discard by Active Job. In the example below the job is retried twice. If it fails with an error twice the job is discarded. Ifactivejob_report_errors
is set todiscard
, you will only get an error reported when the job is discarded. This newdiscard
value only works for Active Job 7.1 and newer.Rubyclass ExampleJob < ActiveJob::Base retry_on StandardError, :attempts => 2 # ... end
More information in our Active Job documentation.
-
Track Active Job executions per job. When a job is retried the "executions" metadata for Active Job jobs goes up by one for every retry. We now track this as the
executions
tag on the job sample.
See the Ruby gem 3.7.3 changelog for more information.