SIGN IN SIGN UP

fix: use System.nanoTime() for cron check-in duration measurement (#5611)

* fix: use System.nanoTime() for cron check-in duration measurement

System.currentTimeMillis() is a wall-clock value and is subject to
NTP adjustments and DST transitions. For long-running cron jobs this
can produce incorrect or even negative durations in the check-in payload.

Switch the start/end capture in CheckInUtils.withCheckIn() and the three
SentryCheckInAdvice implementations (sentry-spring, sentry-spring-jakarta,
sentry-spring-7) to System.nanoTime(), which is guaranteed monotonic.
Use DateUtils.nanosToSeconds() (already present) to convert the delta.

Fixes #5579

* changelog

---------

Co-authored-by: Roman Zavarnitsyn <rom4ek93@gmail.com>
T
tsushanth committed
693fc159de6b16dff56436c11b55543111b4d207
Parent: 477b848
Committed by GitHub <noreply@github.com> on 6/24/2026, 3:01:18 PM