getsentry / sentry

Developer-first error tracking and performance monitoring
https://sentry.io
Other
39.28k stars 4.21k forks source link

Crons: missed check-in reported, log list show check-in associated with wrong time #80898

Open svenzorgdoc opened 1 week ago

svenzorgdoc commented 1 week ago

Environment

self-hosted (https://develop.sentry.dev/self-hosted/)

Steps to Reproduce

We have a cron job that runs every five minutes and takes about two minutes to run. We use sentry-cli to wrap the script, and it is sentry-cli that reports the start and finish of the job. Most of the time, this works flawlessly. Sometimes, Sentry will report a missed check-in, but that check-in is then show in the log list, but is associated incorrectly with the wrong time (that then has two associated check-ins).

Image

Expected Result

I would expect the check-in to be associated with the correct time, not the "next" cron time. Specifically, I would expect the 00:35:01 check-in to be associated with the 00:35:00 expected time, not with 00:40:00.

Actual Result

Image

Product Area

Crons

Link

No response

DSN

No response

Version

24.8.0

getsantry[bot] commented 1 week ago

Assigning to @getsentry/support for routing ⏲️

getsantry[bot] commented 1 week ago

Routing to @getsentry/product-owners-crons for triage ⏲️

getsantry[bot] commented 1 week ago

Assigning to @getsentry/support for routing ⏲️

evanpurkhiser commented 1 week ago

What's your check-in grace period configured to (under "set margins")?

svenzorgdoc commented 1 week ago

Screenshot of the settings:

Image

I have nothing specifically set, so I'm assuming Sentry is using the default of one minute. Seeing that all jobs are reported as starting one second after the scheduled time, I wouldn't know why this one job is incorrectly associated. There are hundreds of these jobs in the log, every one of them starting one second after their scheduled time, and all associated correctly, except for the one displayed in the bug report.