You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(feedback): document new feedback envelope format and rename old format (#12188)
* feat(feedback): document new feedback envelope format and rename old format
* Attachments note
* Doc max message length
* Review comments - rewording and rm max screenshots
Copy file name to clipboardExpand all lines: develop-docs/application-architecture/feedback-architecture.mdx
+8-10Lines changed: 8 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -11,17 +11,17 @@ It will:
11
11
12
12
## Creation sources
13
13
14
-
When broken down, there are **5** ways to create feedback in our system 😵💫.
15
-
(But 4 of them, related to user reports, are quite similar!) A good reference is the
14
+
When broken down, there are **4** ways to create feedback in our system, with
15
+
3 sharing the same data model. A good reference is the
16
16
`FeedbackCreationSource(Enum)` in [create_feedback.py](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/feedback/usecases/create_feedback.py#L33-L33).
17
17
The 4 ways _clients_ can create feedback are:
18
18
19
-
`NEW_FEEDBACK_ENVELOPE`: [The new format](https://develop.sentry.dev/sdk/data-model/envelopes/#full-examples) created by the Replay team when adding
19
+
`NEW_FEEDBACK_ENVELOPE`: [The new format](/sdk/data-model/envelope-items/#user-feedback) created by the Replay team when adding
20
20
the [User Feedback Widget](https://docs.sentry.io/product/user-feedback/#user-feedback-widget)
21
21
to the JavaScript SDK. It allows adding more information, for example tags,
22
22
release, url, etc.
23
23
24
-
`USER_REPORT_ENVELOPE`: [The older format](https://develop.sentry.dev/sdk/data-model/envelope-items/#user-feedback) with name/email/comments, that requires
24
+
`USER_REPORT_ENVELOPE`: [The older format](/sdk/data-model/envelope-items/#user-report) with name/email/comments, that requires
25
25
`event_id` to link a Sentry error event.
26
26
27
27
`USER_REPORT_DJANGO_ENDPOINT`: [The deprecated Web API](https://docs.sentry.io/api/projects/submit-user-feedback/)
@@ -31,7 +31,7 @@ release, url, etc.
31
31
## How feedback is stored
32
32
33
33
On the backend, each feedback submission in Sentry's UI is **an un-grouped issue occurrence**,
34
-
saved via the [issues platform](https://develop.sentry.dev/issue-platform/).
34
+
saved via the [issues platform](/issue-platform/).
35
35
The entrypoint is [**`create_feedback_issue()`**](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/feedback/usecases/create_feedback.py#L184-L184),
36
36
which
37
37
@@ -42,7 +42,7 @@ which
42
42
43
43
## Feedback events
44
44
45
-
The new and preferred way to send feedback from the SDK is in an [event envelope](https://develop.sentry.dev/sdk/data-model/envelopes/#full-examples).
45
+
The preferred way of sending feedback from the SDK is in [feedback envelope](/sdk/data-model/envelope-items/#user-feedback).
46
46
The format is the same as error events, except the `type` header = `"feedback"`. While
47
47
user reports have an associated event, **new feedback _is_ an event**. This
48
48
offers 2 improvements:
@@ -94,7 +94,7 @@ In Relay v24.5.1, we migrated feedback to its own kafka topic + consumer,
94
94
### Attachments
95
95
96
96
We only use attachments for the widget’s screenshot feature, which allows users
97
-
to submit **at most 1 screenshot per feedback**. Attachments are another [item type](https://develop.sentry.dev/sdk/data-model/envelopes/#attachment)
97
+
to submit **at most 1 screenshot per feedback**. Attachments are another [item type](/sdk/data-model/envelopes/#attachment)
98
98
in an envelope.
99
99
100
100
- SDK v8.0.0+, Relay v24.5.1+: Sends the feedback and attachment items in the same envelope.
@@ -186,9 +186,7 @@ graph TD
186
186
187
187
### Envelopes
188
188
189
-
User reports are also sent to Relay in [envelope format](https://develop.sentry.dev/sdk/data-model/envelope-items/#user-feedback).
190
-
**This item type is misleadingly called “user feedback” in some of our docs, but the
191
-
item header will read `"user_report"`.**
189
+
User reports are also sent to Relay in envelope format, item type [user_report](/sdk/data-model/envelope-items/#user-report).
192
190
193
191
The SDK function that sends these is `captureUserFeedback`.
Copy file name to clipboardExpand all lines: develop-docs/sdk/data-model/envelope-items.mdx
+99-10Lines changed: 99 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,7 @@ The headers described in this section are **in addition to the common headers**.
16
16
17
17
### Event
18
18
19
-
Item type `"event"`. This Item contains an error or default event payload
19
+
Item type `"event"`. This Item contains an error or default [event payload](/sdk/data-model/event-payloads/)
20
20
encoded in JSON.
21
21
22
22
**Constraints:**
@@ -181,18 +181,101 @@ details.
181
181
182
182
### User Feedback
183
183
184
-
User Feedback was called User Report in the beginning. Therefore the envelope item type is `"user_report"`.
185
-
The item contains a user feedback / user report JSON payload:
184
+
Item type `"feedback"`. This Item contains an [event payload](/sdk/data-model/event-payloads/) encoded in JSON, with an additional `feedback` context object.
Copy file name to clipboardExpand all lines: develop-docs/sdk/expected-features/index.mdx
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -147,7 +147,7 @@ Ability to get the ID of the last event sent. Event IDs are useful for correlati
147
147
148
148
## User Feedback
149
149
150
-
For all SDKs, it is strongly recommended to send the `User Feedback` as an [envelope item](/sdk/data-model/envelope-items/#user-feedback). Alternatively, the SDKs can
150
+
For all SDKs, it is strongly recommended to send the `User Feedback` as an [envelope item](/sdk/data-model/envelope-items/#user-report). Alternatively, the SDKs can
151
151
use the [User Feedback endpoint](https://docs.sentry.io/api/projects/submit-user-feedback/), which is not recommended.
0 commit comments