From c2de915b8d8703875d955da51d8d8035b1190151 Mon Sep 17 00:00:00 2001 From: Michael Hale Date: Thu, 7 Mar 2024 14:13:16 -0500 Subject: [PATCH] add action to context --- lib/honeybadger/plugins/active_job.rb | 3 ++- spec/integration/rails/active_job_adapter_spec.rb | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/honeybadger/plugins/active_job.rb b/lib/honeybadger/plugins/active_job.rb index f936475f..ab766251 100644 --- a/lib/honeybadger/plugins/active_job.rb +++ b/lib/honeybadger/plugins/active_job.rb @@ -14,9 +14,10 @@ def perform_around(job, block) raise e end - def context(job) + def context(job) # rubocop:disable Metrics/MethodLength { component: job.class, + action: 'perform', enqueued_at: job.enqueued_at, executions: job.executions, job_class: job.class, diff --git a/spec/integration/rails/active_job_adapter_spec.rb b/spec/integration/rails/active_job_adapter_spec.rb index 751b9d0d..98159dd2 100644 --- a/spec/integration/rails/active_job_adapter_spec.rb +++ b/spec/integration/rails/active_job_adapter_spec.rb @@ -18,6 +18,7 @@ expect(Honeybadger::Backend::Test.notifications[:notices][0].context).to \ include( component: ErrorJob, + action: 'perform', enqueued_at: anything, executions: 1, job_class: ErrorJob,