-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add basic schema and examples for ingest-events [INC-660] (#230)
Adding the schema for ingest-events so we can perform more validations against clients (producers + consumers) on this topic. Specifically, the are 4 known immediate use cases for this: - Exceptions raised in the ingest consumer can be checked against this schema and DLQed if they do not conform - Relay CI can check that messages produced on this topic conform to this schema - Sentry devserver will validate all incoming messages against this schema - Sentry CI can launch all consumers and pass these messages in and assert that they do not crash This is based on https://github.com/getsentry/relay/blob/19230c0deabd41096830e46fbec821999dd51ee3/relay-server/src/services/store.rs#L1246-L1261
- Loading branch information
Showing
4 changed files
with
34 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
��type�event�payload��{"event_id":"2107c4e968514c8690d3a3a24570c40d","level":"info","version":"7","type":"default","transaction_info":{},"logentry":{"formatted":"Something went wrong"},"logger":"","modules":{"certifi":"2024.2.2","pip":"23.3.1","pywatchman":"1.4.1","sentry-sdk":"1.40.6","setuptools":"68.2.2","urllib3":"2.2.1","wheel":"0.41.3"},"platform":"python","timestamp":1709691573.27258,"received":1709691573.415304,"environment":"production","contexts":{"runtime":{"name":"CPython","version":"3.11.6","build":"3.11.6 (main, Nov 2 2023, 04:39:43) [Clang 14.0.3 (clang-1403.0.22.14.1)]","type":"runtime"},"trace":{"trace_id":"97791ab406224f03be50f19307648648","span_id":"864321f6ade8a8d9","status":"unknown","type":"trace"}},"tags":[["server_name","CH26FF6WL3"]],"extra":{"sys.argv":["send_event.py"]},"sdk":{"name":"sentry.python","version":"1.40.6","integrations":["argv","atexit","dedupe","excepthook","logging","modules","stdlib","threading"],"packages":[{"name":"pypi:sentry-sdk","version":"1.40.6"}]},"key_id":"3","project":3,"grouping_config":{"enhancements":"KLUv_SAYwQAAkwKRs25ld3N0eWxlOjIwMjMtMDEtMTGQ","id":"newstyle:2023-01-11"},"_metrics":{"bytes.ingested.event":906}}�start_time�e�ҵ�event_id� 2107c4e968514c8690d3a3a24570c40d�project_id�remote_addr�172.18.0.1�attachments� |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
"description": "Error message from Relay", | ||
"type": "object", | ||
"properties": { | ||
"type": { "type": "string" }, | ||
"payload": { | ||
"description": "bytes" | ||
}, | ||
"event_id": { "type": "string" }, | ||
"project_id": { "type": "integer" }, | ||
"start_time": { "type": "integer" } | ||
}, | ||
"required": ["type", "event_id", "project_id", "payload", "start_time"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
topic: ingest-events | ||
pipeline: errors | ||
description: Errors data from Relay | ||
services: | ||
producers: | ||
- getsentry/relay | ||
consumers: | ||
- getsentry/sentry | ||
schemas: | ||
- version: 1 | ||
compatibility_mode: none | ||
type: msgpack | ||
resource: ingest-events.v1.schema.json | ||
examples: | ||
- ingest-events/1/ | ||
topic_creation_config: | ||
max.message.bytes: "10000000" |