getsentry / sentry

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

Crons: Automatic Schedule Inference #45351

Open evanpurkhiser opened 1 year ago

evanpurkhiser commented 1 year ago

It would be really cool with upsert (https://github.com/getsentry/sentry/issues/42881), as Cramer mentions in his ticket, if we could send a checkin, and it would automatically create a monitor that would attempt to infer the schedule, without needing to explicitly pass it.

Monitors could exist in a new status called INFERRING_SCHEDULE where we wait for maybe 4 or 5 checkins, and then try and compute what the schedule is based on those. Generally this should be good enough to infer a schedule that is simple (eg, hourly, daily, etc). But it would probably fail on more complicated schedules.

After it’s inferred we move the monitor into it’s regular active state.

We could probably trigger some type of notification (email?) once the schedule has been inferred and it would let people see what we think it is and they can fix it.

We could also trigger a notification if we failed to infer the schedule, either because the checkins were too sporadic (or failed?) and we can mark the monitor as FAILED_TO_INFERR_SCHEDULE or something like that

getsantry[bot] commented 1 year ago

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