Skip to content

Commit 0c62605

Browse files
authored
feat: ingest-replay-events schema (#155)
I generated a schema for ingest-replay-events based on data I observed on this topic in prod. Though this looks entirely different from the schema in #143
1 parent 7766238 commit 0c62605

File tree

4 files changed

+91
-0
lines changed

4 files changed

+91
-0
lines changed

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
/topics/snuba-metrics.yaml @getsentry/owners-snuba
1111
/topics/snuba-generic-metrics.yaml @getsentry/owners-snuba
1212
/topics/generic-events.yaml @getsentry/owners-snuba @getsentry/issues
13+
/topics/ingest-replay-events.yaml @getsentry/owners-snuba @getsentry/replay
1314

1415
# Internal Snuba topics
1516
/topics/snuba-queries.yaml @getsentry/owners-snuba
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
{
2+
"type": "replay_event",
3+
"start_time": 1687999999.0,
4+
"replay_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
5+
"project_id": 1,
6+
"retention_days": 90,
7+
"payload": [
8+
0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0,
9+
1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1,
10+
2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2,
11+
3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
12+
4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4,
13+
5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5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 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1,
28+
2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2,
29+
3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3,
30+
4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4,
31+
5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
32+
]
33+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"$schema": "http://json-schema.org/draft-07/schema#",
3+
"$ref": "#/definitions/ReplayEvent",
4+
"title": "replay_event",
5+
"definitions": {
6+
"ReplayEvent": {
7+
"type": "object",
8+
"properties": {
9+
"type": {
10+
"type": "string",
11+
"enum": ["replay_event"]
12+
},
13+
"start_time": {
14+
"type": "number"
15+
},
16+
"replay_id": {
17+
"type": "string"
18+
},
19+
"project_id": {
20+
"type": "integer"
21+
},
22+
"retention_days": {
23+
"type": "integer"
24+
},
25+
"payload": {
26+
"type": "array",
27+
"items": {
28+
"type": "integer"
29+
}
30+
}
31+
},
32+
"required": [
33+
"payload",
34+
"project_id",
35+
"replay_id",
36+
"retention_days",
37+
"start_time",
38+
"type"
39+
]
40+
}
41+
}
42+
}

topics/ingest-replay-events.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
topic: ingest-replay-events
2+
pipeline: replays
3+
description: Replay events data for Snuba
4+
services:
5+
producers:
6+
- getsentry/sentry
7+
consumers:
8+
- getsentry/snuba
9+
schemas:
10+
- version: 1
11+
compatibility_mode: none
12+
type: json
13+
resource: ingest-replay-events.v1.schema.json
14+
examples:
15+
- ingest-replay-events/1/

0 commit comments

Comments
 (0)