-
-
Notifications
You must be signed in to change notification settings - Fork 1
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(uptime): new snuba-uptime-results topic #359
Changes from all commits
c6c57cd
810c0df
ec1a68f
071a4bf
723c4c2
6702856
a675091
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"guid": "54afc7ed9c53491481919c931f75bae1", | ||
"subscription_id": "5421b5df80744113a6b57014f01a3a42", | ||
"status": "failure", | ||
"status_reason": { | ||
"type": "dns_error", | ||
"description": "Unable to resolve hostname example.xyz" | ||
}, | ||
"trace_id": "947efba02dac463b9c1d886a44bafc94", | ||
"span_id": "58e84098e63f42e1", | ||
"scheduled_check_time_ms": 1717614062978, | ||
"actual_check_time_ms": 1717614068008, | ||
"duration_ms": 100, | ||
"request_info": { | ||
"request_type": "HEAD", | ||
"http_status_code": 500 | ||
}, | ||
"organization_id": 123, | ||
"project_id": 456, | ||
"retention_days": 90, | ||
"region_slug": "us-east-1" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"guid": "54afc7ed9c53491481919c931f75bae1", | ||
"subscription_id": "5421b5df80744113a6b57014f01a3a42", | ||
"status": "success", | ||
"status_reason": null, | ||
"trace_id": "947efba02dac463b9c1d886a44bafc94", | ||
"span_id": "58e84098e63f42e1", | ||
"scheduled_check_time_ms": 1717614062978, | ||
"actual_check_time_ms": 1717614068008, | ||
"duration_ms": 50, | ||
"request_info": { | ||
"request_type": "HEAD", | ||
"http_status_code": 200 | ||
}, | ||
"organization_id": 123, | ||
"project_id": 456, | ||
"retention_days": 90, | ||
"region_slug": "us-east-1" | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"guid": "54afc7ed9c53491481919c931f75bae1", | ||
"subscription_id": "5421b5df80744113a6b57014f01a3a42", | ||
"status": "failure", | ||
"status_reason": { | ||
"type": "timeout", | ||
"description": "Check timed out" | ||
}, | ||
"trace_id": "947efba02dac463b9c1d886a44bafc94", | ||
"span_id": "58e84098e63f42e1", | ||
"scheduled_check_time_ms": 1717614062978, | ||
"actual_check_time_ms": 1717614068008, | ||
"duration_ms": 100, | ||
"request_info": { | ||
"request_type": "HEAD", | ||
"http_status_code": null | ||
}, | ||
"organization_id": 123, | ||
"project_id": 456, | ||
"retention_days": 90, | ||
"region_slug": "us-east-1" | ||
} |
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
@@ -0,0 +1,145 @@ | ||||
{ | ||||
"$schema": "http://json-schema.org/draft-07/schema#", | ||||
"title": "snuba_uptime_result", | ||||
"definitions": { | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these are copied from
i tried to link directly to them with a "$ref", but it doesn't seem like our framework supports that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lynnagara do you know if it's possible to cross reference schemas somehow in this repo? Would be nice to not need to duplicate these There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh cool, I totally missed it. Thanks! |
||||
"CheckStatus": { | ||||
"title": "check_status", | ||||
"description": "The status of the check", | ||||
"type": "string", | ||||
"enum": ["success", "failure", "missed_window"] | ||||
}, | ||||
"CheckStatusReasonType": { | ||||
"title": "check_status_reason_type", | ||||
"description": "The type of the status reason", | ||||
"type": "string", | ||||
"enum": ["timeout", "dns_error", "failure"] | ||||
}, | ||||
"RequestType": { | ||||
"title": "request_type", | ||||
"description": "The type of HTTP method used for the check", | ||||
"type": "string", | ||||
"enum": ["GET", "POST", "HEAD", "PUT", "DELETE", "PATCH", "OPTIONS"] | ||||
}, | ||||
"CheckStatusReason": { | ||||
"title": "check_status_reason", | ||||
"description": "Reason for the status, primairly used for failure", | ||||
"type": "object", | ||||
"properties": { | ||||
"type": { | ||||
"$ref": "#/definitions/CheckStatusReasonType" | ||||
}, | ||||
"description": { | ||||
"description": "A human readable description of the status reason", | ||||
"type": "string" | ||||
} | ||||
}, | ||||
"required": ["type", "description"] | ||||
}, | ||||
"RequestInfo": { | ||||
"title": "request_info", | ||||
"description": "Additional information about the request made", | ||||
"type": "object", | ||||
"properties": { | ||||
"request_type": { | ||||
"$ref": "#/definitions/RequestType" | ||||
}, | ||||
"http_status_code": { | ||||
"description": "Status code of the successful check-in", | ||||
"type": ["number", "null"] | ||||
} | ||||
}, | ||||
"required": ["request_type", "http_status_code"] | ||||
}, | ||||
"CheckResult": { | ||||
"title": "check_result", | ||||
"description": "A message containing the result of the uptime check.", | ||||
"type": "object", | ||||
"additionalProperties": true, | ||||
"properties": { | ||||
"guid": { | ||||
"description": "Unique identifier of the uptime check", | ||||
"type": "string" | ||||
}, | ||||
"subscription_id": { | ||||
"description": "Identifier of the subscription that this check was run for", | ||||
"type": "string" | ||||
}, | ||||
"status": { | ||||
"$ref": "#/definitions/CheckStatus" | ||||
}, | ||||
"status_reason": { | ||||
"oneOf": [ | ||||
{ | ||||
"$ref": "#/definitions/CheckStatusReason" | ||||
}, | ||||
{ | ||||
"type": "null" | ||||
} | ||||
] | ||||
}, | ||||
"trace_id": { | ||||
"description": "Trace ID associated with the check-in made", | ||||
"type": "string" | ||||
}, | ||||
"span_id": { | ||||
"description": "Span ID associated with the check-in made. This is a phantom span generated by the uptime-checker, no real span is ingested.", | ||||
"type": "string" | ||||
}, | ||||
"scheduled_check_time_ms": { | ||||
"description": "Timestamp in milliseconds of when the check was schedule to run", | ||||
"type": "number" | ||||
}, | ||||
"actual_check_time_ms": { | ||||
"description": "Timestamp in milliseconds of when the check was actually ran", | ||||
"type": "number" | ||||
}, | ||||
"duration_ms": { | ||||
"description": "Duration of the check in ms. Will be null when the status is missed_window", | ||||
"type": ["number", "null"] | ||||
}, | ||||
"request_info": { | ||||
"oneOf": [ | ||||
{ | ||||
"$ref": "#/definitions/RequestInfo" | ||||
}, | ||||
{ | ||||
"type": "null" | ||||
} | ||||
] | ||||
} | ||||
} | ||||
} | ||||
}, | ||||
"allOf": [ | ||||
{ | ||||
"$ref": "#/definitions/CheckResult" | ||||
}, | ||||
{ | ||||
"type": "object", | ||||
"properties": { | ||||
"organization_id": { | ||||
"type": "integer", | ||||
"description": "The organization ID associated with this check", | ||||
"minimum": 0 | ||||
}, | ||||
"project_id": { | ||||
"type": "integer", | ||||
"description": "The project ID associated with this check", | ||||
"minimum": 0 | ||||
}, | ||||
"retention_days": { | ||||
"type": "integer", | ||||
"description": "Number of days to retain this data", | ||||
"minimum": 0, | ||||
"maximum": 65535 | ||||
}, | ||||
"region_slug": { | ||||
"type": ["string", "null"], | ||||
"description": "The region identifier where this check was performed" | ||||
} | ||||
}, | ||||
"required": ["organization_id", "project_id", "retention_days"] | ||||
} | ||||
], | ||||
"description": "A message containing the result of the uptime check for Snuba ingestion." | ||||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
pipeline: uptime | ||
description: uptime check results for snuba | ||
services: | ||
producers: | ||
- getsentry/sentry | ||
consumers: | ||
- getsentry/snuba | ||
schemas: | ||
- version: 1 | ||
compatibility_mode: backward | ||
type: json | ||
resource: snuba-uptime-results.v1.schema.json | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the schemas are identical, so can we just point to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. they aren't identical, as the new schema contains organization_id, project_id, retention_days, and region_slug which the old one does not contain. we could alternatively update the old schema to contain these values i suppose. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👎 to having the other schema include these values. They won't be used since the uptime checker isn't aware of org / project_id (and can't be since the requests are de-duplicated right now) |
||
examples: | ||
- snuba-uptime-results/1/ | ||
topic_creation_config: | ||
compression.type: lz4 | ||
message.timestamp.type: LogAppendTime | ||
retention.ms: "86400000" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicate?