Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(crons): Add monitors-incident-occurrences #348

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
# Topics related to cron monitor tasks
/topics/monitors-clock-tick.yaml @getsentry/crons
/topics/monitors-clock-tasks.yaml @getsentry/crons
/topics/monitors-incident-occurrences.yaml @getsentry/crons

# Topics related to uptime
/topics/uptime-results.yaml @getsentry/crons
Expand Down
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]
}
42 changes: 42 additions & 0 deletions schemas/monitors-incident-occurrences.v1.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "monitors_incident_occurrence",
"$ref": "#/definitions/MonitorsIncidentOccurrence",
"definitions": {
"MonitorsIncidentOccurrence": {
"type": "object",
"title": "incident_occurrence",
"description": "A message containing the intent to create an issue occurrence for a monitor incident.",
"additionalProperties": false,
"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-incident-occurrences.v1.schema.json
examples:
- monitors-incident-occurrences/1/
topic_creation_config:
compression.type: lz4
message.timestamp.type: LogAppendTime
retention.ms: "86400000"
Loading