Skip to content

Commit

Permalink
add new schema and pipeline + rename
Browse files Browse the repository at this point in the history
- move to new 'user-feedback' pipeline
- add an initial schema generated from a widget feedback (captured by chrome dev tools) and https://github.com/glideapps/quicktype
- rename to 'ingest-feedback-events' since 'FeedbackEvent' seems to be the corresponding type in Django + SDK/typescript
  • Loading branch information
aliu3ntry committed Mar 5, 2024
1 parent a520ffd commit 317c598
Show file tree
Hide file tree
Showing 4 changed files with 361 additions and 17 deletions.
67 changes: 67 additions & 0 deletions examples/feedback-events/1/widget.json
@@ -0,0 +1,67 @@
{
"contexts": {
"trace": {
"data": {
"sentry.source": "url",
"sentry.origin": "manual",
"sentry.op": "ui.action.click",
"sentry.sample_rate": 1
},
"op": "ui.action.click",
"span_id": "af56b414007cdf14",
"trace_id": "9ae5b04b26f3481cab6c326aaa9bca9f",
"origin": "manual"
},
"angular": {
"version": 17
},
"feedback": {
"contact_email": "john.doe@gmail.com",
"name": "John Doe",
"message": "Test feedback submission\nHello world! Nice widget",
"url": "https://nugettrends.com/",
"source": "widget",
"replay_id": "a60c73d398334770a050eaee2a9bfd93"
}
},
"type": "feedback",
"request": {
"url": "https://nugettrends.com/",
"headers": {
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
}
},
"event_id": "5c941f7c8d3c4a56b05119c4b612991d",
"timestamp": 1709675365.66,
"environment": "production",
"release": "27e7677",
"sdk": {
"integrations": [
"InboundFilters",
"FunctionToString",
"Breadcrumbs",
"GlobalHandlers",
"LinkedErrors",
"Dedupe",
"HttpContext",
"Replay",
"ReplayCanvas",
"Feedback",
"BrowserTracing",
"BrowserProfiling"
],
"name": "sentry.javascript.angular-ivy",
"version": "7.100.1",
"packages": [
{
"name": "npm:@sentry/angular-ivy",
"version": "7.100.1"
}
]
},
"level": "info",
"tags": {
"transaction": "/"
},
"platform": "javascript"
}
279 changes: 279 additions & 0 deletions schemas/ingest-feedback-events.v1.schema.json
@@ -0,0 +1,279 @@
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$ref": "#/definitions/FeedbackEvent",
"definitions": {
"FeedbackEvent": {
"type": "object",
"additionalProperties": false,
"properties": {
"contexts": {
"$ref": "#/definitions/Contexts"
},
"type": {
"type": "string"
},
"request": {
"$ref": "#/definitions/Request"
},
"event_id": {
"type": "string"
},
"timestamp": {
"type": "number"
},
"environment": {
"type": "string"
},
"release": {
"type": "string"
},
"sdk": {
"$ref": "#/definitions/SDK"
},
"level": {
"type": "string"
},
"tags": {
"$ref": "#/definitions/Tags"
},
"platform": {
"type": "string"
}
},
"required": [
"contexts",
"environment",
"event_id",
"level",
"platform",
"release",
"request",
"sdk",
"tags",
"timestamp",
"type"
],
"title": "FeedbackEvent"
},
"Contexts": {
"type": "object",
"additionalProperties": false,
"properties": {
"trace": {
"$ref": "#/definitions/Trace"
},
"angular": {
"$ref": "#/definitions/Angular"
},
"feedback": {
"$ref": "#/definitions/Feedback"
}
},
"required": [
"angular",
"feedback",
"trace"
],
"title": "Contexts"
},
"Angular": {
"type": "object",
"additionalProperties": false,
"properties": {
"version": {
"type": "integer"
}
},
"required": [
"version"
],
"title": "Angular"
},
"Feedback": {
"type": "object",
"additionalProperties": false,
"properties": {
"contact_email": {
"type": "string"
},
"name": {
"type": "string"
},
"message": {
"type": "string"
},
"url": {
"type": "string",
"format": "uri",
"qt-uri-protocols": [
"https"
]
},
"source": {
"type": "string"
},
"replay_id": {
"type": "string"
}
},
"required": [
"contact_email",
"message",
"name",
"replay_id",
"source",
"url"
],
"title": "Feedback"
},
"Trace": {
"type": "object",
"additionalProperties": false,
"properties": {
"data": {
"$ref": "#/definitions/Data"
},
"op": {
"type": "string"
},
"span_id": {
"type": "string"
},
"trace_id": {
"type": "string"
},
"origin": {
"type": "string"
}
},
"required": [
"data",
"op",
"origin",
"span_id",
"trace_id"
],
"title": "Trace"
},
"Data": {
"type": "object",
"additionalProperties": false,
"properties": {
"sentry.source": {
"type": "string"
},
"sentry.origin": {
"type": "string"
},
"sentry.op": {
"type": "string"
},
"sentry.sample_rate": {
"type": "integer"
}
},
"required": [
"sentry.op",
"sentry.origin",
"sentry.sample_rate",
"sentry.source"
],
"title": "Data"
},
"Request": {
"type": "object",
"additionalProperties": false,
"properties": {
"url": {
"type": "string",
"format": "uri",
"qt-uri-protocols": [
"https"
]
},
"headers": {
"$ref": "#/definitions/Headers"
}
},
"required": [
"headers",
"url"
],
"title": "Request"
},
"Headers": {
"type": "object",
"additionalProperties": false,
"properties": {
"User-Agent": {
"type": "string"
}
},
"required": [
"User-Agent"
],
"title": "Headers"
},
"SDK": {
"type": "object",
"additionalProperties": false,
"properties": {
"integrations": {
"type": "array",
"items": {
"type": "string"
}
},
"name": {
"type": "string"
},
"version": {
"type": "string"
},
"packages": {
"type": "array",
"items": {
"$ref": "#/definitions/Package"
}
}
},
"required": [
"integrations",
"name",
"packages",
"version"
],
"title": "SDK"
},
"Package": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"version": {
"type": "string"
}
},
"required": [
"name",
"version"
],
"title": "Package"
},
"Tags": {
"type": "object",
"additionalProperties": false,
"properties": {
"transaction": {
"type": "string"
}
},
"required": [
"transaction"
],
"title": "Tags"
}
}
}
15 changes: 15 additions & 0 deletions topics/ingest-feedback-events.yaml
@@ -0,0 +1,15 @@
topic: ingest-feedback-events
pipeline: user-feedback
description: User feedback events from SDK
services:
producers:
- getsentry/relay
consumers:
- getsentry/sentry
schemas:
- version: 1
compatibility_mode: none
type: json
resource: ingest-feedback-events.v1.schema.json
examples:
- feedback-events/1/
17 changes: 0 additions & 17 deletions topics/ingest-feedbacks.yaml

This file was deleted.

0 comments on commit 317c598

Please sign in to comment.