Skip to content
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
6 changes: 6 additions & 0 deletions examples/monitors-clock-tasks/1/mark_unknown.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"type": "mark_unknown",
"ts": 1714072962,
"monitor_environment_id": 1,
"checkin_id": 1
}
Comment on lines +1 to +6
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought that when we detected an outage, we'd just set a variable somewhere so that when we go to mark a miss, we mark an unknown instead?

Copy link
Member Author

@evanpurkhiser evanpurkhiser Oct 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah we will. This is for marking all in progress as unknown status.

We need to do this when we detect an anomaly during a clock tick since it means there may be OK check-ins that were dropped and we would mark those check-ins as timed out once they reach their timeout_at later (after the volume has returned to normal).

28 changes: 28 additions & 0 deletions schemas/monitors-clock-tasks.v1.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
{
"$ref": "#/definitions/MonitorsMarkTimeout"
},
{
"$ref": "#/definitions/MonitorsMarkUnknown"
},
{
"$ref": "#/definitions/MonitorsMarkMissing"
}
Expand Down Expand Up @@ -35,6 +38,31 @@
},
"required": ["type", "ts", "monitor_environment_id", "checkin_id"]
},
"MonitorsMarkUnknown": {
"type": "object",
"title": "mark_unknown",
"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.",
"additionalProperties": false,
"properties": {
"type": {
"description": "Discriminant marker identifying the task.",
"enum": ["mark_unknown"]
},
"ts": {
"description": "The timestamp the clock ticked at.",
"type": "number"
},
"monitor_environment_id": {
"description": "The monitor environment ID to generate a missed check-in for.",
"type": "number"
},
"checkin_id": {
"description": "The check-in ID to mark as unknown.",
"type": "number"
}
},
"required": ["type", "ts", "monitor_environment_id", "checkin_id"]
},
"MonitorsMarkMissing": {
"type": "object",
"title": "mark_missing",
Expand Down
Loading