Skip to content

Commit

Permalink
feat(crons): Add monitors-incident-occurrences
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
evanpurkhiser committed Nov 11, 2024
1 parent e9ed9a1 commit 0da2421
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
7 changes: 7 additions & 0 deletions examples/monitors-incident-occurrences/1/example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"clock_tick_ts": 1617895645,
"received_ts": 1617895650,
"failed_checkin_id": 123456,
"incident_id": 987654,
"previous_checkin_ids": [111222, 333444, 555666]
}
33 changes: 33 additions & 0 deletions schemas/monitors-incident-occurrences.v1.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "monitors_clock_tasks",
"properties": {
"clock_tick_ts": {
"description": "Timestamp of the clock-tick which triggered this occurrence.",
"type": "number"
},
"received_ts": {
"description": "Timestamp indicating when the offending check-in was recieved.",
"type": "number"
},
"failed_checkin_id": {
"description": "Database id of the offending check-in",
"type": "number"
},
"incident_id": {
"description": "Database id of the incident assoicated to this failure.",
"type": "number"
},
"previous_checkin_ids": {
"description": "Database ids of previously failed check-ins which led to the production of this occurrence.",
"type": "array",
"items": { "type": "number" }
}
},
"required": [
"clock_tick_ts",
"received_ts",
"failed_checkin_id",
"previous_checkin_ids"
]
}
18 changes: 18 additions & 0 deletions topics/monitors-incident-occurrences.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
pipeline: monitors
description: stores data used to create issue occurrences for cron incidents
services:
producers:
- getsentry/sentry
consumers:
- getsentry/sentry
schemas:
- version: 1
compatibility_mode: none
type: json
resource: monitors-issue-occurances.v1.schema.json
examples:
- monitors-issue-occurances/1/
topic_creation_config:
compression.type: lz4
message.timestamp.type: LogAppendTime
retention.ms: "86400000"

0 comments on commit 0da2421

Please sign in to comment.