Skip to content

Commit

Permalink
add action to context
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehale committed Mar 7, 2024
1 parent 1703e81 commit c2de915
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/honeybadger/plugins/active_job.rb
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions spec/integration/rails/active_job_adapter_spec.rb
Expand Up @@ -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,
Expand Down

0 comments on commit c2de915

Please sign in to comment.