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: ingest-replay-events schema #155

Merged
merged 3 commits into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 @@ -9,6 +9,7 @@
/topics/outcomes.yaml @getsentry/owners-snuba
/topics/snuba-metrics.yaml @getsentry/owners-snuba
/topics/snuba-generic-metrics.yaml @getsentry/owners-snuba
/topics/ingest-replay-events.yaml @getsentry/owners-snuba @getsentry/replay

# Internal Snuba topics
/topics/snuba-queries.yaml @getsentry/owners-snuba
Expand Down
33 changes: 33 additions & 0 deletions examples/ingest-replay-events/1/replayevent.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"type": "replay_event",
"start_time": 1687999999.0,
"replay_id": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"project_id": 1,
"retention_days": 90,
"payload": [
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,
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,
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,
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,
4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5, 0, 1, 2,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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, 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, 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, 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, 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, 1, 2, 3, 4, 5, 0, 1, 2, 3, 4, 5
]
}
42 changes: 42 additions & 0 deletions schemas/ingest-replay-events.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#",
"$ref": "#/definitions/ReplayEvent",
"title": "replay_event",
"definitions": {
"ReplayEvent": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["something", "replay_event"]
Copy link
Member

Choose a reason for hiding this comment

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

This looks kinda wrong. are we really sending type=something in prod?

Copy link
Member Author

Choose a reason for hiding this comment

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

oh shit, oops

Copy link
Member Author

Choose a reason for hiding this comment

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

i hand wrote that

Copy link
Member Author

Choose a reason for hiding this comment

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

Updated. I only actually saw replay_event in prod

},
"start_time": {
"type": "number"
},
"replay_id": {
"type": "string"
},
"project_id": {
"type": "integer"
},
"retention_days": {
"type": "integer"
},
"payload": {
"type": "array",
"items": {
"type": "integer"
}
}
},
"required": [
"payload",
"project_id",
"replay_id",
"retention_days",
"start_time",
"type"
]
}
}
}
15 changes: 15 additions & 0 deletions topics/ingest-replay-events.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
topic: ingest-replay-events
pipeline: replays
description: Replay events data for Snuba
services:
producers:
- getsentry/sentry
consumers:
- getsentry/snuba
schemas:
- version: 1
compatibility_mode: none
type: json
resource: ingest-replay-events.v1.schema.json
examples:
- ingest-replay-events/1/