Skip to content

Commit 1dde463

Browse files
committed
feat(crons): Add mark_unknown clock task
This task will be triggered when we detect an anomaly in check-in volume during a clock tick. When this happens we are unable to know that all check-ins before that tick have been received and will need to mark all in-progress monitors as resulting in a 'unknown' state. Part of getsentry/sentry#79328
1 parent 8b3f584 commit 1dde463

File tree

2 files changed

+31
-0
lines changed

2 files changed

+31
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"type": "mark_unknown",
3+
"ts": 1714072962,
4+
"monitor_environment_id": 1,
5+
"checkin_id": 1
6+
}

schemas/monitors-clock-tasks.v1.schema.json

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,31 @@
3535
},
3636
"required": ["type", "ts", "monitor_environment_id", "checkin_id"]
3737
},
38+
"MonitorsMarkUnknown": {
39+
"type": "object",
40+
"title": "mark_unknown",
41+
"description": "Indicates this monitor was in-progress when an anomolys click-tick was processed, meaning we are unable to know if a check-in may have been lost for this monitor.",
42+
"additionalProperties": false,
43+
"properties": {
44+
"type": {
45+
"description": "Discriminant marker identifying the task.",
46+
"const": "mark_missing"
47+
},
48+
"ts": {
49+
"description": "The timestamp the clock ticked at.",
50+
"type": "number"
51+
},
52+
"monitor_environment_id": {
53+
"description": "The monitor environment ID to generate a missed check-in for.",
54+
"type": "number"
55+
},
56+
"checkin_id": {
57+
"description": "The check-in ID to mark as unknown.",
58+
"type": "number"
59+
}
60+
},
61+
"required": ["type", "ts", "monitor_environment_id"]
62+
},
3863
"MonitorsMarkMissing": {
3964
"type": "object",
4065
"title": "mark_missing",

0 commit comments

Comments
 (0)