Issue Description
It appears that Sentry::Cron::MonitorCheckIns::Patch#perform is not forwarding keyword arguments.
Reproduction Steps
include Sentry::Cron::MonitorCheckIns in an ActiveJob, and attempt to use keyword arguments.
Expected Behavior
Given a job that doesn't include Sentry::Cron::MonitorCheckIns:
class CronJob < ApplicationJob
def work(a, b, c)
puts "a: #{a}, b: #{b}, c: #{c}"
end
def perform(a, b = 42, c: 99)
work(a, b, c)
end
end
it behaves as expected:
3.2.2 :001 > CronJob.perform_now(2, 43)
a: 2, b: 43, c: 99
3.2.2 :002 > CronJob.perform_now(2, 43, c: 100)
a: 2, b: 43, c: 100
Actual Behavior
Given a job that includes Sentry::Cron::MonitorCheckIns:
class CronJob < ApplicationJob
include Sentry::Cron::MonitorCheckIns
sentry_monitor_check_ins
def work(a, b, c)
puts "a: #{a}, b: #{b}, c: #{c}"
end
def perform(a, b = 42, c: 99)
work(a, b, c)
end
end
Passing a keyword argument raises an ArgumentError:
3.2.2 :001 > CronJob.perform_now(2, 43)
a: 2, b: 43, c: 99
3.2.2 :002 > CronJob.perform_now(2, 43, c: 100)
ArgumentError (wrong number of arguments (given 3, expected 1..2))
Ruby Version
3.2.2
SDK Version
5.15.0
Integration and Its Version
Rails 7.1.2, GoodJob 3.21.5
Sentry Config
No response
Issue Description
It appears that
Sentry::Cron::MonitorCheckIns::Patch#performis not forwarding keyword arguments.Reproduction Steps
include
Sentry::Cron::MonitorCheckInsin an ActiveJob, and attempt to use keyword arguments.Expected Behavior
Given a job that doesn't include
Sentry::Cron::MonitorCheckIns:it behaves as expected:
Actual Behavior
Given a job that includes
Sentry::Cron::MonitorCheckIns:Passing a keyword argument raises an
ArgumentError:Ruby Version
3.2.2
SDK Version
5.15.0
Integration and Its Version
Rails 7.1.2, GoodJob 3.21.5
Sentry Config
No response