getsentry / getsentry/sentry

Allow checkins to be "early" by a margin

Open
#44,390 6 comments 6 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
44.8k
Forks
4.9k
Avg merge
1d 5h
Merged PRs (30d)
624

Description

Currently there exists a scenario where due to clock drift, a checkin may be marked as missed because it occurs slightly before when sentry expects it to have occurred.

Imagine a crontab monitor configured as `0 * * * *`. This cron monitor should run on the hour every hour. You have also configured a **5 minute checkin margin**.

In this scenario a checkin has happened one minute before `01:00` (at `12:59`), then at `01:05` the expected checkin at `01:00` is marked as missed since no checkin happened within the 5 minute checkin margin starting at `01:00`.

As you can see the checkin that happened at `12:59` **did not count as the checkin expect at `01:00`**!

### Existing world

The monitor is just marked as being missed, even though a checkin was very close to the checkin time.

### Proposed world

We should update the "Check-in Margin" configuration to **add margin to both sides of the checkin time**.

![sentry sentry io_crons_create_ (1)](https://user-images.githubusercontent.com/1421724/217956529-16f4c475-5506-45d7-9271-c7d18c48bf49.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.