Skip to content

Commit 4ea0bf5

Browse files
feat(crons): Add monitors-incident-occurrences (#348)
Part of getsentry/sentry#79328 This creates the new topic necessary for delaying issue occurrences so that we can delay creation of notifications in the case where we detect an anomalous system incident.
1 parent e9ed9a1 commit 4ea0bf5

File tree

4 files changed

+68
-0
lines changed

4 files changed

+68
-0
lines changed

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
# Topics related to cron monitor tasks
7070
/topics/monitors-clock-tick.yaml @getsentry/crons
7171
/topics/monitors-clock-tasks.yaml @getsentry/crons
72+
/topics/monitors-incident-occurrences.yaml @getsentry/crons
7273

7374
# Topics related to uptime
7475
/topics/uptime-results.yaml @getsentry/crons
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"clock_tick_ts": 1617895645,
3+
"received_ts": 1617895650,
4+
"failed_checkin_id": 123456,
5+
"incident_id": 987654,
6+
"previous_checkin_ids": [111222, 333444, 555666]
7+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"title": "monitors_incident_occurrence",
4+
"$ref": "#/definitions/MonitorsIncidentOccurrence",
5+
"definitions": {
6+
"MonitorsIncidentOccurrence": {
7+
"type": "object",
8+
"title": "incident_occurrence",
9+
"description": "A message containing the intent to create an issue occurrence for a monitor incident.",
10+
"additionalProperties": false,
11+
"properties": {
12+
"clock_tick_ts": {
13+
"description": "Timestamp of the clock-tick which triggered this occurrence.",
14+
"type": "number"
15+
},
16+
"received_ts": {
17+
"description": "Timestamp indicating when the offending check-in was recieved.",
18+
"type": "number"
19+
},
20+
"failed_checkin_id": {
21+
"description": "Database id of the offending check-in",
22+
"type": "number"
23+
},
24+
"incident_id": {
25+
"description": "Database id of the incident assoicated to this failure.",
26+
"type": "number"
27+
},
28+
"previous_checkin_ids": {
29+
"description": "Database ids of previously failed check-ins which led to the production of this occurrence.",
30+
"type": "array",
31+
"items": { "type": "number" }
32+
}
33+
},
34+
"required": [
35+
"clock_tick_ts",
36+
"received_ts",
37+
"failed_checkin_id",
38+
"previous_checkin_ids"
39+
]
40+
}
41+
}
42+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
pipeline: monitors
2+
description: stores data used to create issue occurrences for cron incidents
3+
services:
4+
producers:
5+
- getsentry/sentry
6+
consumers:
7+
- getsentry/sentry
8+
schemas:
9+
- version: 1
10+
compatibility_mode: none
11+
type: json
12+
resource: monitors-incident-occurrences.v1.schema.json
13+
examples:
14+
- monitors-incident-occurrences/1/
15+
topic_creation_config:
16+
compression.type: lz4
17+
message.timestamp.type: LogAppendTime
18+
retention.ms: "86400000"

0 commit comments

Comments
 (0)