Skip to content

Commit

Permalink
Merge pull request #2261 from fukayatsu/fix-sidekiq-deprecation-warning
Browse files Browse the repository at this point in the history
Fix deprecation warning from sidekiq error handler
  • Loading branch information
kaylareopelle authored Oct 17, 2023
2 parents 67565e8 + b2e1325 commit 0f6cb1a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/new_relic/agent/instrumentation/sidekiq.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@
end

if config.respond_to?(:error_handlers)
config.error_handlers << proc do |error, *_|
# Sidekiq 3.0.0 - 7.1.4 expect error_handlers to have 2 arguments
# Sidekiq 7.1.5+ expect error_handlers to have 3 arguments
config.error_handlers << proc do |error, _ctx, *_|
NewRelic::Agent.notice_error(error)
end
end
Expand Down

0 comments on commit 0f6cb1a

Please sign in to comment.