Skip to content

Commit 755e416

Browse files
committed
feat(crons): Add topic to support monitor clock tasks
1 parent 5503137 commit 755e416

File tree

4 files changed

+90
-0
lines changed

4 files changed

+90
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"type": "mark_missing",
3+
"ts": 1714072962,
4+
"checkin_id": 1
5+
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"type": "mark_missing",
3+
"ts": 1714072962,
4+
"monitor_environment_id": 1
5+
}
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "monitors_clock_tasks",
4+
"oneOf": [
5+
{
6+
"$ref": "#/definitions/MonitorsMarkTimeout"
7+
}
8+
{
9+
"$ref": "#/definitions/MonitorsMarkMissing"
10+
},
11+
],
12+
"definitions": {
13+
"MonitorsMarkTimeout": {
14+
"type": "object",
15+
"title": "mark_timeout",
16+
"description": "Indicates a check-in should be marked as having timed out.",
17+
"additionalProperties": false,
18+
"properties": {
19+
"type": {
20+
"description": "Discriminant marker identifying the task.",
21+
"const": "mark_timeout"
22+
},
23+
"ts": {
24+
"description": "The timestamp the clock ticked at.",
25+
"type": "number"
26+
},
27+
"checkin_id": {
28+
"description": "The check-in ID to mark as timedout.",
29+
"type": "number"
30+
}
31+
},
32+
"required": [
33+
"ts",
34+
"checkin_id"
35+
]
36+
},
37+
"MonitorsMarkMissing": {
38+
"type": "object",
39+
"title": "mark_missing",
40+
"description": "Indicates a monitor ID that should be jk",
41+
"additionalProperties": false,
42+
"properties": {
43+
"type": {
44+
"description": "Discriminant marker identifying the task.",
45+
"const": "mark_missing"
46+
},
47+
"ts": {
48+
"description": "The timestamp the clock ticked at.",
49+
"type": "number"
50+
},
51+
"monitor_environment_id": {
52+
"description": "The monitor environment ID to generate a missed check-in for.",
53+
"type": "number"
54+
}
55+
},
56+
"required": [
57+
"ts",
58+
"monitor_environment_id"
59+
]
60+
}
61+
}
62+
}

topics/monitors-clock-tasks.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
topic: monitors-clock-tasks
2+
pipeline: monitors
3+
description: cron monitor clock based tasks
4+
services:
5+
producers:
6+
- getsentry/sentry
7+
consumers:
8+
- getsentry/sentry
9+
schemas:
10+
- version: 1
11+
compatibility_mode: none
12+
type: json
13+
resource: monitors-clock-tasks.v1.schema.json
14+
examples:
15+
- monitors-clock-tasks/1/
16+
topic_creation_config:
17+
compression.type: lz4
18+
message.timestamp.type: LogAppendTime

0 commit comments

Comments
 (0)