File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
sentry-ruby/lib/sentry/cron Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 1616- Add support for string errors in error reporter ([ #2464 ] ( https://github.com/getsentry/sentry-ruby/pull/2464 ) )
1717- Reset ` trace_id ` and add root transaction for sidekiq-cron [ #2446 ] ( https://github.com/getsentry/sentry-ruby/pull/2446 )
1818- Add support for Excon HTTP client instrumentation ([ #2383 ] ( https://github.com/getsentry/sentry-ruby/pull/2383 ) )
19+ - Improve the accuracy of duration calculations in cron jobs monitoring ([ #2471 ] ( https://github.com/getsentry/sentry-ruby/pull/2471 ) )
1920
2021 Note: MemoryStore and FileStore require Rails 8.0+
2122
Original file line number Diff line number Diff line change @@ -14,12 +14,12 @@ def perform(*args, **opts)
1414 :in_progress ,
1515 monitor_config : monitor_config )
1616
17- start = Sentry . utc_now . to_i
17+ start = Process . clock_gettime ( Process :: CLOCK_MONOTONIC )
1818
1919 begin
2020 # need to do this on ruby <= 2.6 sadly
2121 ret = method ( :perform ) . super_method . arity == 0 ? super ( ) : super
22- duration = Sentry . utc_now . to_i - start
22+ duration = Process . clock_gettime ( Process :: CLOCK_MONOTONIC ) - start
2323
2424 Sentry . capture_check_in ( slug ,
2525 :ok ,
@@ -29,7 +29,7 @@ def perform(*args, **opts)
2929
3030 ret
3131 rescue Exception
32- duration = Sentry . utc_now . to_i - start
32+ duration = Process . clock_gettime ( Process :: CLOCK_MONOTONIC ) - start
3333
3434 Sentry . capture_check_in ( slug ,
3535 :error ,
You can’t perform that action at this time.
0 commit comments