From 4c81d4c20d16d0f9c97c04df9446eb66d86c19ad Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:15:33 -0700 Subject: [PATCH 01/29] feat(feedback): add a page for feedback architecture --- src/docs/feedback-architecture.mdx | 219 +++++++++++++++++++++++++++++ 1 file changed, 219 insertions(+) create mode 100644 src/docs/feedback-architecture.mdx diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx new file mode 100644 index 0000000000..e47caadc73 --- /dev/null +++ b/src/docs/feedback-architecture.mdx @@ -0,0 +1,219 @@ +--- +title: User Feedback - Backend Architecture +--- + +**The goal of this doc is to give engineers an in-depth, systems-level understanding of User Feedback.** +It will +1. describe the relevant ingestion pipelines, data models, and functions. +2. explain the difference between “feedback”, “user reports”, and “crash reports”, and why we built and need to support each. + +## Creation sources +When broken down, there are **5** ways to create feedback 😵‍💫 in our system. +(But if it helps, 4 are very similar!) A good reference is the +`FeedbackCreationSource(Enum)` in [create_feedback.py](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/feedback/usecases/create_feedback.py#L33-L33). +The 4 ways _clients_ can create feedback are: + +`NEW_FEEDBACK_ENVELOPE`: The new format created by the Replay team when adding +the [User Feedback Widget](https://docs.sentry.io/product/user-feedback/#user-feedback-widget) +to the JavaScript SDK. It allows adding more information, for example tags, +release, url, etc. + +`USER_REPORT_ENVELOPE`: The older format with name/email/comments, that requires +`event_id` to link a Sentry error event. + +`USER_REPORT_DJANGO_ENDPOINT`: [The Web API](https://docs.sentry.io/api/projects/submit-user-feedback/) + +`CRASH_REPORT_EMBED_FORM`: The [crash report modal](https://docs.sentry.io/product/user-feedback/#crash-report-modal) + +## How it's stored +On the backend, each feedback submission in Sentry's UI is **an un-grouped issue occurrence**, +saved via the [issues platform](https://develop.sentry.dev/issue-platform/). +The entrypoint is [**`create_feedback_issue()`**](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/feedback/usecases/create_feedback.py#L184-L184), +which +1. filters feedback with empty or spam messages. Note **anonymous feedbacks are not filtered** (missing name and/or email). +2. sends to issues pipeline in a standardized format. To make sure it is never grouped, we use a random UUID for the fingerprint. + +--- + +## Feedback events + +The new and preferred way to send feedback from the SDK is as an [event item](https://develop.sentry.dev/sdk/envelopes/#full-examples), +in a MessagePack'ed envelope. The item type is the same as errors, but event +type = `"feedback"`. While user reports have an associated event, +**new feedback _is_ an event**. This offers 2 improvements: + +1. Users can submit generic feedback without an error occurring. The point of this feature is to catch things Sentry can’t! +2. Rather than waiting for the associated error to be ingested asynchronously, we immediately get access to context like the environment, platform, replay, user, tags... + +The user's submission is wrapped in a context object: + +```Python/Javascript +event[”contexts”][”feedback”] = { + "name": , + "contact_email": , + "message": , + "url": , + "source": +} + +// all fields are technically optional, but recommended +// the widget can be configured to require a non-empty email and/or name +``` + +- This doc refers to the payload format (`event` in the pseudo-code above) as a “**feedback event”**. +- The feedback [widget](https://docs.sentry.io/platforms/javascript/user-feedback/#user-feedback-widget), which is installed by default, sends these envelopes. +- API: for SDK v8.0.0+, we use the `sendFeedback` function. + +### Architecture diagram + +```mermaid +graph TD + subgraph Sentry + issues_endpoint["/issues"] + issues_endpoint <--> |"requests"| ui["Feedback UI"] + end + + subgraph app[Your Application] + widget + API + end + + app --> |"envelopes"| Relay + Relay --> f_consumer([ingest-feedback-events]) + f_consumer --> |"queues as celery task"| create_feedback_issue + create_feedback_issue --> o_consumer(["ingest-occurrences"]) + o_consumer --> nodestore[(Nodestore)] + o_consumer --> |"EventStream"| snuba[("Snuba/Clickhouse")] + issues_endpoint <--> |"queries"| snuba + + +``` + +In Relay v24.5.1, we migrated feedback to its own kafka topic + consumer, +`ingest-feedback-events`. This decouples risk and ownership from errors +(`ingest-events`). + +### Attachments + +We only use attachments for the widget’s screenshot feature, which allows users +to submit **at most 1 screenshot per feedback**. Attachments are another [item type](https://develop.sentry.dev/sdk/envelopes/#attachment) +in an envelope. +- SDK v8.0.0+, Relay v24.5.1+: Sends the feedback and attachment items in the same envelope. +- SDK < v8, all Relay versions: Send a separate envelope for each item. + +**The feedback pipeline does not process attachments**. Relay routes them to +a separate topic and storage, and the UI makes a separate request for them. + +--- + +## User Reports + +The deprecated way of sending feedback is as a **user report**. This is a simple typed dict: + +```Python/Javascript +user_report = { + "event_id": , + "email": , + "name": , + "comments": , +} +``` + +### Architecture diagram + +```mermaid +graph TD + subgraph Sentry + issues_endpoint["/issues"] + issues_endpoint <--> |"GET"| ui["Feedback UI"] + report_endpoint["/user-feedback"] + crash_report_modal["Crash Report Modal"] + end + + subgraph functions[Functions - run in referrer] + save_userreport + shim_to_feedback + create_feedback_issue + save_userreport --> |"IF event processed"| shim_to_feedback + shim_to_feedback --> create_feedback_issue + end + + %% envelope pipeline + app[Your Application] --> |"envelopes"| Relay + Relay --> a_topic([ingest-attachments]) + a_topic --> save_userreport + + %% endpoint and crash reports + app --> |"POST"| report_endpoint --> save_userreport + app --> |"POST"| crash_report_modal --> save_userreport + + %% issues platform + create_feedback_issue --> o_consumer(["ingest-occurrences"]) + o_consumer --> nodestore[(Nodestore)] + o_consumer --> |"EventStream"| snuba[(Snuba/Clickhouse)] + snuba <--> |"queries"| issues_endpoint + + %% user report saves/updates + save_userreport --> postgres[(Postgres)] + snuba <--> |"queries eventstore"| save_userreport + pp_job["errors post process task"] <--> |"queries/updates"| postgres + pp_job --> shim_to_feedback + snuba <--> |"queries eventstore"| pp_job +``` + +### [`save_userreport()`](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/ingest/userreport.py#L28-L28) + +Before it was extended to generic feedback, the [`user_report` model](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/models/userreport.py#L9-L9) +was first used for crash reports. Therefore an associated event id is required, and +we use it to set environment and group before saving the model to **Postgres**. +Then we shim the report to a **feedback event** and pass it to `create_feedback_issue()`. + +If the event hasn’t reached eventstore (Snuba) by the time of ingest, we still +save the report, but leave the environment + group empty and skip feedback creation. + +To ensure the skipped reports eventually get fixed and shimmed to feedback, we +added a post process job to the errors pipeline: [`link_event_to_user_report()`](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/tasks/post_process.py#L1387-L1387). +This is the 5th, automated way of creating feedback. + +### Envelopes + +User reports are also sent to Relay in [envelopes](https://develop.sentry.dev/sdk/envelopes/#user-feedback). +This item type is mistakenly called “user feedback” in some of our docs, but the +item header will read "user_report". + +The SDK function that sends these is `captureUserFeedback`. + +### Django endpoint + +Before our envelope ingest service existed, older SDKs directly POST the report +to Sentry, with +`/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/user-feedback/` + +See [https://docs.sentry.io/api/projects/submit-user-feedback/](https://docs.sentry.io/api/projects/submit-user-feedback/) + +### Crash reports + +The crash report modal is a Django view -- an HTML form your app can render when +a page crashes. This was the earliest way of collecting feedback, and is for +error-specific feedback. You can install it as an [SDK integration](https://docs.sentry.io/platforms/javascript/user-feedback/#crash-report-modal). + +URL: `/api/embed/error-page/` + +Python Class: `error_page_embed.ErrorPageEmbedView` + +Crash reports are also shimmed to feedback. The pipeline is very similar to the +user report endpoint. + +--- + +## Email Alerts + +Email alerts are triggered in feedback issue’s post process pipeline. (Unrelated +to the task in the user report diagram.) It’s the same alerts as generic, +non-error issues, but we apply some feedback-specific filters. **We skip emails if:** + +1. The feedback is [marked as spam](https://docs.sentry.io/product/user-feedback/#spam-detection-for-user-feedback) AND the `organizations.user-feedback-spam-filter-actions` feature flag is enabled. +2. The source is NOT a new feedback envelope / the widget, AND the “Crash Report Notifications” setting is disabled. + - in UI: Settings > Projects > (project slug) > User Feedback > “Enable Crash Report Notifications” + - project option in code: `sentry:feedback_user_report_notifications` + - default = true/enabled From c3855f4fe5f7b0b8e7e87fd77829f75b0ee1af60 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:22:06 -0700 Subject: [PATCH 02/29] Camelcase for model name --- src/docs/feedback-architecture.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index e47caadc73..ad3391b5d2 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -163,7 +163,7 @@ graph TD ### [`save_userreport()`](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/ingest/userreport.py#L28-L28) -Before it was extended to generic feedback, the [`user_report` model](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/models/userreport.py#L9-L9) +Before it was extended to generic feedback, the [`UserReport` model](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/models/userreport.py#L9-L9) was first used for crash reports. Therefore an associated event id is required, and we use it to set environment and group before saving the model to **Postgres**. Then we shim the report to a **feedback event** and pass it to `create_feedback_issue()`. From ae5ad5a3cb40aeeb953a93c466e501be73775c2e Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:36:35 -0700 Subject: [PATCH 03/29] Add diagrams --- src/docs/feedback-architecture.mdx | 65 ++---------------------------- 1 file changed, 4 insertions(+), 61 deletions(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index ad3391b5d2..b444ad84f4 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -66,28 +66,8 @@ event[”contexts”][”feedback”] = { ### Architecture diagram -```mermaid -graph TD - subgraph Sentry - issues_endpoint["/issues"] - issues_endpoint <--> |"requests"| ui["Feedback UI"] - end - - subgraph app[Your Application] - widget - API - end - - app --> |"envelopes"| Relay - Relay --> f_consumer([ingest-feedback-events]) - f_consumer --> |"queues as celery task"| create_feedback_issue - create_feedback_issue --> o_consumer(["ingest-occurrences"]) - o_consumer --> nodestore[(Nodestore)] - o_consumer --> |"EventStream"| snuba[("Snuba/Clickhouse")] - issues_endpoint <--> |"queries"| snuba - - -``` +![](https://mermaid.ink/svg/pako:eNp1Uk1vwjAM_StRTiBRca-mSWiwicOmaWWHqUFVSA1EtEmWDyYE_Pc5adFAYqe6zvPze7aPVOgaaE43lpstWUyZYt6FVfdbgPL2EFPMS-cCuApUbbRUvmR03KUYXd5FkIcseyQnRl9mC0ZPJEiseQaoV1zsyOe8r0M4fq67cmPKLx0smRjTSMG91Kpv8SPrDfgunrzPb-qxjPQdQe2h0SZqO5EPaHjykIIEWVdCKxdasINSqg04n617YRns0bRbDmPFH-7C_B0APRLuiIAG7IF47naxi7DAPVQXmioNI3LcfUh0-koFo70OLUSwFpRIg00q9K0KhQtzXlsoB2-XcLi8A0S5s2im8CihjSKdCiteDhgtYjB-wunutjo4YLRj-G-FaNvKbpyJg44odmm5rPF0jkwRwqjfQotEOYY1tzgUps6I48Hr4qAEzb0NMKLB1DiPqeS47Jbma944zEIt0cdrd4vpJM-_bUbyRw) +[diagram source](https://mermaid.live/edit#pako:eNp1Uk1vwjAM_StRTiBRca-mSWiwicOmaWWHqUFVSA1EtEmWDyYE_Pc5adFAYqe6zvPze7aPVOgaaE43lpstWUyZYt6FVfdbgPL2EFPMS-cCuApUbbRUvmR03KUYXd5FkIcseyQnRl9mC0ZPJEiseQaoV1zsyOe8r0M4fq67cmPKLx0smRjTSMG91Kpv8SPrDfgunrzPb-qxjPQdQe2h0SZqO5EPaHjykIIEWVdCKxdasINSqg04n617YRns0bRbDmPFH-7C_B0APRLuiIAG7IF47naxi7DAPVQXmioNI3LcfUh0-koFo70OLUSwFpRIg00q9K0KhQtzXlsoB2-XcLi8A0S5s2im8CihjSKdCiteDhgtYjB-wunutjo4YLRj-G-FaNvKbpyJg44odmm5rPF0jkwRwqjfQotEOYY1tzgUps6I48Hr4qAEzb0NMKLB1DiPqeS47Jbma944zEIt0cdrd4vpJM-_bUbyRw) In Relay v24.5.1, we migrated feedback to its own kafka topic + consumer, `ingest-feedback-events`. This decouples risk and ownership from errors @@ -121,45 +101,8 @@ user_report = { ### Architecture diagram -```mermaid -graph TD - subgraph Sentry - issues_endpoint["/issues"] - issues_endpoint <--> |"GET"| ui["Feedback UI"] - report_endpoint["/user-feedback"] - crash_report_modal["Crash Report Modal"] - end - - subgraph functions[Functions - run in referrer] - save_userreport - shim_to_feedback - create_feedback_issue - save_userreport --> |"IF event processed"| shim_to_feedback - shim_to_feedback --> create_feedback_issue - end - - %% envelope pipeline - app[Your Application] --> |"envelopes"| Relay - Relay --> a_topic([ingest-attachments]) - a_topic --> save_userreport - - %% endpoint and crash reports - app --> |"POST"| report_endpoint --> save_userreport - app --> |"POST"| crash_report_modal --> save_userreport - - %% issues platform - create_feedback_issue --> o_consumer(["ingest-occurrences"]) - o_consumer --> nodestore[(Nodestore)] - o_consumer --> |"EventStream"| snuba[(Snuba/Clickhouse)] - snuba <--> |"queries"| issues_endpoint - - %% user report saves/updates - save_userreport --> postgres[(Postgres)] - snuba <--> |"queries eventstore"| save_userreport - pp_job["errors post process task"] <--> |"queries/updates"| postgres - pp_job --> shim_to_feedback - snuba <--> |"queries eventstore"| pp_job -``` +![](https://mermaid.ink/svg/pako:eNqNVO9r2zAQ_VcOQSGFhnwPYzDaZvRDt9J0H4YdjCJfYq22pOlHoLT933eSbHdL3LJPVi7vnt69u9MzE7pGtmR7y00DD1elKr0L2_xzjcrbpxgqvXQuoKtQ1UZL5YuSLXKoZJtJBHyazz_DS8m-Xj-U7AWCpJwVYr3l4hF-3Ix5Fo22_h_m4NDOdz12BArLXVP18E7XvCXsZQzCfQrCbQz2eOKjz9_l7IISXmrlitVwgjnYoEAqsLhDa9H2dzl-wCrKyNfFIIBrZFd5XY3KelnIPY7BKvkwyQK9IzcrwAN5C8Zqgc5hHQ2aZj-OJo53rxyLPjsDVAdstUEw0mArVQJwY4qfOlj4YkwrBY8ubAZd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sA_guYtrf8w6SiTKQc4bV-7txBL9j8JMwS4Y-d9xWdOT-FwqgJL5BjuCLOlYc0uySvVKOB68Xj8pwZbeBrxgWdqV5PTWdGy5462jKNaSbrjNb2x6al__AGUzAsk) ### [`save_userreport()`](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/ingest/userreport.py#L28-L28) From 30a4abeab1c94a9a30b2f07e17dbaa1408c2c157 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:40:22 -0700 Subject: [PATCH 04/29] Add some whitespace --- src/docs/feedback-architecture.mdx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index b444ad84f4..c6c7707493 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -63,6 +63,7 @@ event[”contexts”][”feedback”] = { - This doc refers to the payload format (`event` in the pseudo-code above) as a “**feedback event”**. - The feedback [widget](https://docs.sentry.io/platforms/javascript/user-feedback/#user-feedback-widget), which is installed by default, sends these envelopes. - API: for SDK v8.0.0+, we use the `sendFeedback` function. +

### Architecture diagram @@ -72,6 +73,7 @@ event[”contexts”][”feedback”] = { In Relay v24.5.1, we migrated feedback to its own kafka topic + consumer, `ingest-feedback-events`. This decouples risk and ownership from errors (`ingest-events`). +
### Attachments @@ -98,6 +100,7 @@ user_report = { "comments": , } ``` +
### Architecture diagram @@ -117,6 +120,7 @@ save the report, but leave the environment + group empty and skip feedback creat To ensure the skipped reports eventually get fixed and shimmed to feedback, we added a post process job to the errors pipeline: [`link_event_to_user_report()`](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/tasks/post_process.py#L1387-L1387). This is the 5th, automated way of creating feedback. +
### Envelopes @@ -125,6 +129,7 @@ This item type is mistakenly called “user feedback” in some of our docs, but item header will read "user_report". The SDK function that sends these is `captureUserFeedback`. +
### Django endpoint @@ -133,6 +138,7 @@ to Sentry, with `/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/user-feedback/` See [https://docs.sentry.io/api/projects/submit-user-feedback/](https://docs.sentry.io/api/projects/submit-user-feedback/) +
### Crash reports From ed571d7c23f91228ed336a4039b24faaa677f99f Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Tue, 18 Jun 2024 16:41:30 -0700 Subject: [PATCH 05/29] Header capitalizion --- src/docs/feedback-architecture.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index c6c7707493..0b05968330 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -88,7 +88,7 @@ a separate topic and storage, and the UI makes a separate request for them. --- -## User Reports +## User reports The deprecated way of sending feedback is as a **user report**. This is a simple typed dict: @@ -155,7 +155,7 @@ user report endpoint. --- -## Email Alerts +## Email alerts Email alerts are triggered in feedback issue’s post process pipeline. (Unrelated to the task in the user report diagram.) It’s the same alerts as generic, From 079d727f5505e169f1e87a2a669c93f3309f2a08 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 09:37:22 -0700 Subject: [PATCH 06/29] Update src/docs/feedback-architecture.mdx Co-authored-by: Catherine Lee <55311782+c298lee@users.noreply.github.com> --- src/docs/feedback-architecture.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index 0b05968330..ef932ef2d3 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -3,7 +3,7 @@ title: User Feedback - Backend Architecture --- **The goal of this doc is to give engineers an in-depth, systems-level understanding of User Feedback.** -It will +It will: 1. describe the relevant ingestion pipelines, data models, and functions. 2. explain the difference between “feedback”, “user reports”, and “crash reports”, and why we built and need to support each. From 9b86a46765e0a7377304bc132e8e319c659a00e6 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 09:37:40 -0700 Subject: [PATCH 07/29] Update src/docs/feedback-architecture.mdx Co-authored-by: Michelle Zhang <56095982+michellewzhang@users.noreply.github.com> --- src/docs/feedback-architecture.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index ef932ef2d3..618ee5d408 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -144,7 +144,7 @@ See [https://docs.sentry.io/api/projects/submit-user-feedback/](https://docs.sen The crash report modal is a Django view -- an HTML form your app can render when a page crashes. This was the earliest way of collecting feedback, and is for -error-specific feedback. You can install it as an [SDK integration](https://docs.sentry.io/platforms/javascript/user-feedback/#crash-report-modal). +submitting feedback when Sentry detects an error. You can install it as an [SDK integration](https://docs.sentry.io/platforms/javascript/user-feedback/#crash-report-modal). URL: `/api/embed/error-page/` From 4b3e78b0ed50383cec07356d1700a7a10bb39c7f Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 09:37:48 -0700 Subject: [PATCH 08/29] Update src/docs/feedback-architecture.mdx Co-authored-by: Michelle Zhang <56095982+michellewzhang@users.noreply.github.com> --- src/docs/feedback-architecture.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index 618ee5d408..b13c8fe7ae 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -135,9 +135,9 @@ The SDK function that sends these is `captureUserFeedback`. Before our envelope ingest service existed, older SDKs directly POST the report to Sentry, with -`/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/user-feedback/` +`/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/user-feedback/`. -See [https://docs.sentry.io/api/projects/submit-user-feedback/](https://docs.sentry.io/api/projects/submit-user-feedback/) +See [https://docs.sentry.io/api/projects/submit-user-feedback/](https://docs.sentry.io/api/projects/submit-user-feedback/).
### Crash reports From b23ba08c6000b2f7a7859a13a91def981e9015b3 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 09:37:57 -0700 Subject: [PATCH 09/29] Update src/docs/feedback-architecture.mdx Co-authored-by: Michelle Zhang <56095982+michellewzhang@users.noreply.github.com> --- src/docs/feedback-architecture.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index b13c8fe7ae..b25bed1d8b 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -110,7 +110,7 @@ user_report = { ### [`save_userreport()`](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/ingest/userreport.py#L28-L28) Before it was extended to generic feedback, the [`UserReport` model](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/models/userreport.py#L9-L9) -was first used for crash reports. Therefore an associated event id is required, and +was first used for crash reports. Therefore an associated event ID is required, and we use it to set environment and group before saving the model to **Postgres**. Then we shim the report to a **feedback event** and pass it to `create_feedback_issue()`. From fbd89eec1ab12100fea8b0b2efeb78766ea89be8 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 09:38:05 -0700 Subject: [PATCH 10/29] Update src/docs/feedback-architecture.mdx Co-authored-by: Michelle Zhang <56095982+michellewzhang@users.noreply.github.com> --- src/docs/feedback-architecture.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index b25bed1d8b..5c2d9074e7 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -81,7 +81,7 @@ We only use attachments for the widget’s screenshot feature, which allows user to submit **at most 1 screenshot per feedback**. Attachments are another [item type](https://develop.sentry.dev/sdk/envelopes/#attachment) in an envelope. - SDK v8.0.0+, Relay v24.5.1+: Sends the feedback and attachment items in the same envelope. -- SDK < v8, all Relay versions: Send a separate envelope for each item. +- SDK < v8, all Relay versions: Sends a separate envelope for each item. **The feedback pipeline does not process attachments**. Relay routes them to a separate topic and storage, and the UI makes a separate request for them. From 6c671c5accd52a9038ff366fdf951e7976b60bb6 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 09:38:11 -0700 Subject: [PATCH 11/29] Update src/docs/feedback-architecture.mdx Co-authored-by: Michelle Zhang <56095982+michellewzhang@users.noreply.github.com> --- src/docs/feedback-architecture.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index 5c2d9074e7..9cf5ec436e 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -25,7 +25,7 @@ release, url, etc. `CRASH_REPORT_EMBED_FORM`: The [crash report modal](https://docs.sentry.io/product/user-feedback/#crash-report-modal) -## How it's stored +## How feedback is stored On the backend, each feedback submission in Sentry's UI is **an un-grouped issue occurrence**, saved via the [issues platform](https://develop.sentry.dev/issue-platform/). The entrypoint is [**`create_feedback_issue()`**](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/feedback/usecases/create_feedback.py#L184-L184), From 09c262fd2df2bf75a4c8a9fc7880ee21e7c546bc Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 09:38:19 -0700 Subject: [PATCH 12/29] Update src/docs/feedback-architecture.mdx Co-authored-by: Michelle Zhang <56095982+michellewzhang@users.noreply.github.com> --- src/docs/feedback-architecture.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index 9cf5ec436e..1d8d1f54f4 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -38,11 +38,11 @@ which ## Feedback events The new and preferred way to send feedback from the SDK is as an [event item](https://develop.sentry.dev/sdk/envelopes/#full-examples), -in a MessagePack'ed envelope. The item type is the same as errors, but event +in a MessagePack'ed envelope. The item type is the same as errors, except the event type = `"feedback"`. While user reports have an associated event, **new feedback _is_ an event**. This offers 2 improvements: -1. Users can submit generic feedback without an error occurring. The point of this feature is to catch things Sentry can’t! +1. Users can submit generic feedback without an error occurring. The point of this feature is to allow users to catch things that Sentry can’t! 2. Rather than waiting for the associated error to be ingested asynchronously, we immediately get access to context like the environment, platform, replay, user, tags... The user's submission is wrapped in a context object: From 977c6260002cfde48e7ec4403f08a84797993c29 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 12:45:47 -0700 Subject: [PATCH 13/29] Add to bottom of sidebar as 'User Feedback Architecture' --- src/components/sidebar.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/components/sidebar.tsx b/src/components/sidebar.tsx index 55a14e255d..ba03fb53db 100644 --- a/src/components/sidebar.tsx +++ b/src/components/sidebar.tsx @@ -102,6 +102,9 @@ export default () => { tree={tree.find(n => n.name === 'delightful-developer-metrics').children} /> + + User Feedback Architecture +
  • From 79dcaeca30b4d5821d6a33f30959af1cb85ed388 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 13:40:56 -0700 Subject: [PATCH 14/29] Make diagrams light mode --- src/docs/feedback-architecture.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index 1d8d1f54f4..8a180449f0 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -67,8 +67,8 @@ event[”contexts”][”feedback”] = { ### Architecture diagram -![](https://mermaid.ink/svg/pako:eNp1Uk1vwjAM_StRTiBRca-mSWiwicOmaWWHqUFVSA1EtEmWDyYE_Pc5adFAYqe6zvPze7aPVOgaaE43lpstWUyZYt6FVfdbgPL2EFPMS-cCuApUbbRUvmR03KUYXd5FkIcseyQnRl9mC0ZPJEiseQaoV1zsyOe8r0M4fq67cmPKLx0smRjTSMG91Kpv8SPrDfgunrzPb-qxjPQdQe2h0SZqO5EPaHjykIIEWVdCKxdasINSqg04n617YRns0bRbDmPFH-7C_B0APRLuiIAG7IF47naxi7DAPVQXmioNI3LcfUh0-koFo70OLUSwFpRIg00q9K0KhQtzXlsoB2-XcLi8A0S5s2im8CihjSKdCiteDhgtYjB-wunutjo4YLRj-G-FaNvKbpyJg44odmm5rPF0jkwRwqjfQotEOYY1tzgUps6I48Hr4qAEzb0NMKLB1DiPqeS47Jbma944zEIt0cdrd4vpJM-_bUbyRw) -[diagram source](https://mermaid.live/edit#pako:eNp1Uk1vwjAM_StRTiBRca-mSWiwicOmaWWHqUFVSA1EtEmWDyYE_Pc5adFAYqe6zvPze7aPVOgaaE43lpstWUyZYt6FVfdbgPL2EFPMS-cCuApUbbRUvmR03KUYXd5FkIcseyQnRl9mC0ZPJEiseQaoV1zsyOe8r0M4fq67cmPKLx0smRjTSMG91Kpv8SPrDfgunrzPb-qxjPQdQe2h0SZqO5EPaHjykIIEWVdCKxdasINSqg04n617YRns0bRbDmPFH-7C_B0APRLuiIAG7IF47naxi7DAPVQXmioNI3LcfUh0-koFo70OLUSwFpRIg00q9K0KhQtzXlsoB2-XcLi8A0S5s2im8CihjSKdCiteDhgtYjB-wunutjo4YLRj-G-FaNvKbpyJg44odmm5rPF0jkwRwqjfQotEOYY1tzg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Relay v24.5.1, we migrated feedback to its own kafka topic + consumer, `ingest-feedback-events`. This decouples risk and ownership from errors @@ -104,8 +104,8 @@ user_report = { ### Architecture diagram -![](https://mermaid.ink/svg/pako:eNqNVO9r2zAQ_VcOQSGFhnwPYzDaZvRDt9J0H4YdjCJfYq22pOlHoLT933eSbHdL3LJPVi7vnt69u9MzE7pGtmR7y00DD1elKr0L2_xzjcrbpxgqvXQuoKtQ1UZL5YuSLXKoZJtJBHyazz_DS8m-Xj-U7AWCpJwVYr3l4hF-3Ix5Fo22_h_m4NDOdz12BArLXVP18E7XvCXsZQzCfQrCbQz2eOKjz9_l7IISXmrlitVwgjnYoEAqsLhDa9H2dzl-wCrKyNfFIIBrZFd5XY3KelnIPY7BKvkwyQK9IzcrwAN5C8Zqgc5hHQ2aZj-OJo53rxyLPjsDVAdstUEw0mArVQJwY4qfOlj4YkwrBY8ubAZdQ4aLcu6x5an36ZAgnIQYKWaFVHt0fs6956LpqBK3OU_sGZDApw4Osvr54KqG1FLICNfrG9TcfV-nwTmaj3fIpzJPB-ZDZXmAwbTc77TtYnTS6ESiK0HzEzq0M5rC3hAtRCBWJdJaJEvecClN0bo5ry0Ws2_D8XwzAaQyruOMrGk_eJfmQ4UtL2br-FlcUvMeG01V5Oz057hyvwNamdt4tJVjsbH-3tpkiFsEU1OtqQtTc2u083uLrpjd9acPbs7znapL0k_bZUz1S2_JOgpq6xL9sA_guYtrf8w6SiTKQc4bV-7txBL9j8JMwS4Y-d9xWdOT-FwqgJL5BjuCLOlYc0uySvVKOB68Xj8pwZbeBrxgWdqV5PTWdGy5462jKNaSbrjNb2x6al__AGUzAsk) -[diagram source](https://mermaid.live/edit#pako:eNqNVO9r2zAQ_VcOQSGFhnwPYzDaZvRDt9J0H4YdjCJfYq22pOlHoLT933eSbHdL3LJPVi7vnt69u9MzE7pGtmR7y00DD1elKr0L2_xzjcrbpxgqvXQuoKtQ1UZL5YuSLXKoZJtJBHyazz_DS8m-Xj-U7AWCpJwVYr3l4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29DbgBcvariSnx6YbglhLuuE2v7HU353cs9c_dcADzw) ### [`save_userreport()`](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/ingest/userreport.py#L28-L28) From 2f5f833ba023794aa17a03f1f41624ab6a58a90a Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 13:50:51 -0700 Subject: [PATCH 15/29] Tweak ##Creation sources wording --- src/docs/feedback-architecture.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index 8a180449f0..842bf3a239 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -8,8 +8,8 @@ It will: 2. explain the difference between “feedback”, “user reports”, and “crash reports”, and why we built and need to support each. ## Creation sources -When broken down, there are **5** ways to create feedback 😵‍💫 in our system. -(But if it helps, 4 are very similar!) A good reference is the +When broken down, there are **5** ways to create feedback in our system 😵‍💫. +(But 4 of them, related to user reports, are quite similar!) A good reference is the `FeedbackCreationSource(Enum)` in [create_feedback.py](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/feedback/usecases/create_feedback.py#L33-L33). The 4 ways _clients_ can create feedback are: From d4c614d551e952d1d902efc4d897d269424864a3 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 13:57:08 -0700 Subject: [PATCH 16/29] Add links to envelope formats in Creation sources + some more tweaks --- src/docs/feedback-architecture.mdx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index 842bf3a239..362bc690b5 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -13,12 +13,12 @@ When broken down, there are **5** ways to create feedback in our system 😵‍ `FeedbackCreationSource(Enum)` in [create_feedback.py](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/feedback/usecases/create_feedback.py#L33-L33). The 4 ways _clients_ can create feedback are: -`NEW_FEEDBACK_ENVELOPE`: The new format created by the Replay team when adding +`NEW_FEEDBACK_ENVELOPE`: [The new format](https://develop.sentry.dev/sdk/envelopes/#full-examples) created by the Replay team when adding the [User Feedback Widget](https://docs.sentry.io/product/user-feedback/#user-feedback-widget) to the JavaScript SDK. It allows adding more information, for example tags, release, url, etc. -`USER_REPORT_ENVELOPE`: The older format with name/email/comments, that requires +`USER_REPORT_ENVELOPE`: [The older format](https://develop.sentry.dev/sdk/envelopes/#user-feedback) with name/email/comments, that requires `event_id` to link a Sentry error event. `USER_REPORT_DJANGO_ENDPOINT`: [The Web API](https://docs.sentry.io/api/projects/submit-user-feedback/) @@ -37,12 +37,12 @@ which ## Feedback events -The new and preferred way to send feedback from the SDK is as an [event item](https://develop.sentry.dev/sdk/envelopes/#full-examples), -in a MessagePack'ed envelope. The item type is the same as errors, except the event -type = `"feedback"`. While user reports have an associated event, -**new feedback _is_ an event**. This offers 2 improvements: +The new and preferred way to send feedback from the SDK is as an [event envelope](https://develop.sentry.dev/sdk/envelopes/#full-examples). +The item type is the same as errors, except the event type = `"feedback"`. While +user reports have an associated event, **new feedback _is_ an event**. This +offers 2 improvements: -1. Users can submit generic feedback without an error occurring. The point of this feature is to allow users to catch things that Sentry can’t! +1. Users can submit generic feedback without an error occurring. We're allowing users to catch things that Sentry can’t! 2. Rather than waiting for the associated error to be ingested asynchronously, we immediately get access to context like the environment, platform, replay, user, tags... The user's submission is wrapped in a context object: @@ -124,9 +124,9 @@ This is the 5th, automated way of creating feedback. ### Envelopes -User reports are also sent to Relay in [envelopes](https://develop.sentry.dev/sdk/envelopes/#user-feedback). -This item type is mistakenly called “user feedback” in some of our docs, but the -item header will read "user_report". +User reports are also sent to Relay in [envelope format](https://develop.sentry.dev/sdk/envelopes/#user-feedback). +**This item type is mistakenly called “user feedback” in some of our docs, but the +item header will read "user_report".** The SDK function that sends these is `captureUserFeedback`.
    From e7eaa9e41c7be4d2996427c414b3656c7a8a5568 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 13:57:33 -0700 Subject: [PATCH 17/29] Code-ify user_report --- src/docs/feedback-architecture.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index 362bc690b5..c3782696ec 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -126,7 +126,7 @@ This is the 5th, automated way of creating feedback. User reports are also sent to Relay in [envelope format](https://develop.sentry.dev/sdk/envelopes/#user-feedback). **This item type is mistakenly called “user feedback” in some of our docs, but the -item header will read "user_report".** +item header will read `"user_report"`.** The SDK function that sends these is `captureUserFeedback`.
    From ff8936479a848f8f2a6a0b91e102a4095cef2ee7 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 14:00:54 -0700 Subject: [PATCH 18/29] Reword mistakenly --- src/docs/feedback-architecture.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index c3782696ec..b82dd8ef88 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -125,7 +125,7 @@ This is the 5th, automated way of creating feedback. ### Envelopes User reports are also sent to Relay in [envelope format](https://develop.sentry.dev/sdk/envelopes/#user-feedback). -**This item type is mistakenly called “user feedback” in some of our docs, but the +**This item type is misleadingly called “user feedback” in some of our docs, but the item header will read `"user_report"`.** The SDK function that sends these is `captureUserFeedback`. From 6738d245634aeee3f421eb9a4c19cd35731a3db2 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 14:06:38 -0700 Subject: [PATCH 19/29] Tweak diagrams: envelopes->envelope and rm widget/api from first graph --- src/docs/feedback-architecture.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index b82dd8ef88..18265c600c 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -67,8 +67,8 @@ event[”contexts”][”feedback”] = { ### Architecture diagram -![](https://mermaid.ink/svg/pako:eNp1Uk1rAjEQ_SthTgou3qUUpNrioaV07aFsZInZcTe4m2zzYRH1v3f2iyrYUyaTN2_em8kJpMkQZpBbURdsveCaexe23TVG7e2xSXGvnAvoUtRZbZT2CYdpl-KwuYtgD1H0yM4cXpZrDmcWFNU8I2ZbIffsc9XXEZyO666irpMvEyyb13WppPDK6L7Fj8py9F08f1_d1FMZ6zuiPmBp6kbbmX1gKVoPbdBCdqk02oUK7ShROkfno10vLMIDmXabcVPxhxuYvwOSRyYck1iiPTIv3L7pIi0Kj-lAk7bDaDjuPrR05koFh16HkTJYi1q2g21VmFsVmhbmvLGYjN6GcLy5AyS5y8ZM7ElC1Yh0OmxFMuIQN8H0iaa7L0xwyKFj-G-FZNuqbpwtB0yAulRCZfR1TlwzxsEXWBHRjMJS5YXnwPWFgCJ4Ex-1hJm3AScQ6owGslCCtl0NScwU-Xjt_iK52KkcLr9c7fNN) -[diagram source](https://mermaid.live/edit#pako:eNp1Uk1rAjEQ_SthTgou3qUUpNrioaV07aFsZInZcTe4m2zzYRH1v3f2iyrYUyaTN2_em8kJpMkQZpBbURdsveCaexe23TVG7e2xSXGvnAvoUtRZbZT2CYdpl-KwuYtgD1H0yM4cXpZrDmcWFNU8I2ZbIffsc9XXEZyO666irpMvEyyb13WppPDK6L7Fj8py9F08f1_d1FMZ6zuiPmBp6kbbmX1gKVoPbdBCdqk02oUK7ShROkfno10vLMIDmXabcVPxhxuYvwOSRyYck1iiP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YciBfNHmtuuNdHTnC4M__0J2XYqKRo5YAbUpReqoV04cs0Yh9BiT0Q5hZ3atoED12cCihhMcdAS8uAiziDahgayUIKWpod8IzpPWWwUGXm9bNewZOdvXfTgJg) In Relay v24.5.1, we migrated feedback to its own kafka topic + consumer, `ingest-feedback-events`. This decouples risk and ownership from errors @@ -104,8 +104,8 @@ user_report = { ### Architecture diagram -![](https://mermaid.ink/svg/pako:eNqNVO9r2zAQ_VcOQSGFhnwPYzDaZvRDt9J0H4YdjCJfYq22pOlHoLT933eSbHdL3LJPVi7vnt69u9MzE7pGtmR7y00DD1elKr0L2_xzjcrbpxgqvXQuoKtQ1UZL5YuSLXKoZJtJBHyazz_DS8m-Xj-U7AWCpJwVYr3l4hF-3Ix5Fo22_h_m4NDOdz12BArLXVP18E7XvCXsZQzCfQrCbQz2eOKjz9_l7IISXmrlitVwgjnYoEAqsLhDa9H2dzl-wCrKyNfFIIBrZFd5XY3KelnIPY7BKvkwyQK9IzcrwAN5C8Zqgc5hHQ2aZj-OJo53rxyLPjsDVAdstUEw0mArVQJwY4qfOlj4YkwrBY8ubAZdQ4aLcu6x5an36ZAgnIQYKWaFVHt0fs6956LpqBK3OU_sGZDApw4Osvr54KqG1FLICNfrG9TcfV-nwTmaj3fIpzJPB-ZDZXmAwbTc77TtYnTS6ESiK0HzEzq0M5rC3hAtRCBWJdJaJEvecClN0bo5ry0Ws2_D8XwzAaQyruOMrGk_eJfmQ4UtL2br-FlcUvMeG01V5Oz057hyvwNamdt4tJVjsbH-3tpkiFsEU1OtqQtTc2u083uLrpjd9acPbs7znapL0k_bZUz1S2_JOgpq6xL9sA_guYtrf8w6SiTKQc4bV-7txBL9j8JMwS4Y-d9xWdOT-FwqgJL5BjuCLOnYyn3jS1aqVwLy4PX6SQm29DbgBcvariSnx6YbglhLuuE2v7HU353cs9c_dcADzw) -[diagram source](https://mermaid.live/edit#pako:eNqNVO9r2zAQ_VcOQSGFhnwPYzDaZvRDt9J0H4YdjCJfYq22pOl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Ndn5v0RWzu_70wc15vFN1Sfppu4ypfuktWUdBbV2iH9YBPHdx649ZR4lEOch548q9ndih_1GYKdgFI_87Lmt6EZ9LBVAy32BHkCUdW7lvfMlK9UpAHrxePynBlt4GvGBZ25Xk9NZ0QxBrSTfc5ic2vbSvfwAhyQKB) ### [`save_userreport()`](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/ingest/userreport.py#L28-L28) From d87a8fc16c8e2591ddbb4fde76b8ca9de4eaa2d3 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 14:07:36 -0700 Subject: [PATCH 20/29] Reword user report endpoint --- src/docs/feedback-architecture.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index 18265c600c..663c6602e9 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -151,7 +151,7 @@ URL: `/api/embed/error-page/` Python Class: `error_page_embed.ErrorPageEmbedView` Crash reports are also shimmed to feedback. The pipeline is very similar to the -user report endpoint. +Django endpoint. --- From 079470e9ec3eb93fbe5d3cacc534854c277aaa57 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 16:34:55 -0700 Subject: [PATCH 21/29] Add crash reports section --- src/docs/feedback-architecture.mdx | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index 663c6602e9..0091451331 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -138,20 +138,30 @@ to Sentry, with `/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/user-feedback/`. See [https://docs.sentry.io/api/projects/submit-user-feedback/](https://docs.sentry.io/api/projects/submit-user-feedback/). -
    -### Crash reports +--- + +## Crash reports -The crash report modal is a Django view -- an HTML form your app can render when -a page crashes. This was the earliest way of collecting feedback, and is for -submitting feedback when Sentry detects an error. You can install it as an [SDK integration](https://docs.sentry.io/platforms/javascript/user-feedback/#crash-report-modal). +The **crash report modal** pops up when Sentry detects an error on the current +page, prompting users to describe what happened. On the backend, crash report +data is the same as user reports. -URL: `/api/embed/error-page/` +You can install it as an [SDK integration](https://docs.sentry.io/platforms/javascript/user-feedback/#crash-report-modal). + +We implement it as a Django view: +* URL: `/api/embed/error-page/` +* Python Class: `error_page_embed.ErrorPageEmbedView` + +Crash reports are also shimmed to feedback. The pipeline is the same as the +`/user-feedback` endpoint. +
    -Python Class: `error_page_embed.ErrorPageEmbedView` +### Sentry UI -Crash reports are also shimmed to feedback. The pipeline is very similar to the -Django endpoint. +You can view the crash reports tied to an issue at the "User Feedback" tab of +the Issue Details page. This also includes user reports submitted with the +old feedback API. --- From 8ea03464e24d15b23dbc16001173d103101291e8 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 17:00:10 -0700 Subject: [PATCH 22/29] Split up diagrams and finalize --- src/docs/feedback-architecture.mdx | 50 +++++++++++++++++------------- 1 file changed, 29 insertions(+), 21 deletions(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index 0091451331..17335113a3 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -65,10 +65,10 @@ event[”contexts”][”feedback”] = { - API: for SDK v8.0.0+, we use the `sendFeedback` function.

    -### Architecture diagram +### Ingest diagram -![](https://mermaid.ink/svg/pako:eNp1Uk1rwzAM_StGpxYaeg9jMNZu7LAdlu4w4hBcR21ME9vzR6G0_e-T05Rt0J0sy09P78k6gjQNQg5bJ2zLVguuefBxfbkWqIM7pBQPyvuIvkbdWKN0KDnMLykO1U0Eu8uye3bi8LxccTixqKjmCbFZC7ljHy9jHcHpoEBYW36a6NiDtZ2S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3cTDRU055Azugl7NQHWV9TiFzCAPOVCxJTqofAgeur2QUMZhq0RLK4CLuINqOhtwrQTuat0vsFLG93pa37vD6DRJvo7g) +[diagram source](https://mermaid.live/edit#pako:eNptkc1qwzAQhF9F7MmGmN59KJSmx_ZQ91IsYxR5YwvbkqqfgEny7l05NW0hOg3a0erb2TNI0yGU0DthB_ax55rREdbWnyY69mTtpKQIyuiGFcUju3BAfcLJWORwYe84iYVrHlaxOo6tNNrHGV1WK92jD8URsTsIORZ4Qh18k6cXv76t8VfEiJ4JzyRO6BYWhB_TL9KhCNhubVrlfcTU425hbWf-UHD44TBSRudQS_QcbhTmP4WmNHwwDuvsbZN5c8dIuC9pmCoQwpwgvY4HUWccqiQenim3cTDRU055Azugl7NQHWV9TiFzCAPOVCxJTqofAgeur2QUMZhq0RLK4CLuINqOhtwrQTuat0vsFLG93pa37vD6DRJvo7g) In Relay v24.5.1, we migrated feedback to its own kafka topic + consumer, `ingest-feedback-events`. This decouples risk and ownership from errors @@ -102,24 +102,29 @@ user_report = { ```
    -### Architecture diagram - -![](https://mermaid.ink/svg/pako:eNqNVO9r2zAQ_VcOQSGFhnwPYzDaZvRDt9J0H4YdjCJfYq22pOlHoLT933eSbHdL3LJPVi7vnt69u9MzE7pGtmR7y00DD1elKr0L2_xzjcrbpxgqvXQuoKtQ1UZL5YuSLXKoZJtJBHyazz_DS8m-Xj-U7AWCpJwVYr3l4hF-3Ix5Fo22_h_m4NDOdz12BArLXVP18E7XvCXsZQzCfQrCbQz2eOKjz9_l7IISXmrlitVwgjnYoEAqsLhDa9H2dzl-wCrKyNfFIIBrZFd5XY3KelnIPY7BKvkwyQK9IzcrwAN5C8Zqgc5hHQ2aZj-OJo53rxyLPjsDVAdstUEw0mArVQJwY4qfOlj4YkwrBY8ubAZdQ0ZUc48tT61Ph4TgpMNIMSuk2qPzc-49F01HhbjNeSLPgAQ-NXBQ1Y8HVzWkjkJGuF7eIObu-zrNzdF4vEM-lXk6Lx8qy_MLpuV-p20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c5ic2vbSvfwAhyQKB) +### Ingest diagram +![](https://mermaid.ink/svg/pako:eNp9VE1v2zAM_SuEgAIu0CD3HAYM7Qrs0LVoehmswFBkJhZqS5o-AhRt__so2s62Npkvpomnx8dHyq9CuxbFSuyD8h083UgrU8zb8XONNoWXkpIpoHchNWhb74xNtRTLHDEsdojtVulnKTYjUAcVu2aCD65VPWGvSxIeOQl3JTnhiY9efxfdZauTcTbWt3MECwjZgrEQcIchYJhqRXXApsgYy5Uk0BM7MzTJNUdtkzBUCY_JxsSY8SQPLBZf4E2K77eAB_IAfHAaY8RWircz7B-zzHG25LHtiwtAe8DeeQRvPPbGMkB5X_90OcBX73ujVfFhM-uaTxQ1j9grHhEHjFCkwxtd1cbuMaaFSknpbqBG4uaSyUcAgz9bOKsaBw3KtsAzhRERJ3mzmIf79VMR8mFBzpCfOvl5Y_6rjE2M4HuVdi4MJXvSZyZxjaYFygOGitZwMsRpnYnV0kxpDdmSPzg-ZulWxOQC1tWPObzcnABSG9_KiqzpgqiB18PmraqrdXktr2l2z52jLvj02EDpabKLm4zL7FvSz86eWkXvYtoHjHVFpk2xFKMeLjdL-ZUxGPKGt5ZFs6J_KcWVIPWDMi3d-1dpAaRIHQ6EXVHYm32XpJD2nYAqJ7d-sVqsUsh4JUahN0bRXR3mJLaGSt2NPxL-n7z_BpMRmrE) +[diagram source](https://mermaid.live/edit#pako:eNp9VE1v2zAM_SuEgAIu0CD3HAYM7Qrs0LVoehmswFBkJhZqS5o-AhRt__so2s62Npkvpomnx8dHyq9CuxbFSuyD8h083UgrU8zb8XONNoWXkpIpoHchNWhb74xNtRTLHDEsdojtVulnKTYjUAcVu2aCD65VPWGvSxIeOQl3JTnhiY9efxfdZauTcTbWt3MECwjZgrEQcIchYJhqRXXApsgYy5Uk0BM7MzTJNUdtkzBUCY_JxsSY8SQPLBZf4E2K77eAB_IAfHAaY8RWircz7B-zzHG25LHtiwtAe8DeeQRvPPbGMkB5X_90OcBX73ujVfFhM-uaTxQ1j9grHhEHjFCkwxtd1cbuMaaFSknpbqBG4uaSyUcAgz9bOKsaBw3KtsAzhRERJ3mzmIf79VMR8mFBzpCfOvl5Y_6rjE2M4HuVdi4MJXvSZyZxjaYFygOGitZwMsRpnYnV0kxpDdmSPzg-ZulWxOQC1tWPObzcnABSG9_KiqzpgqiB18PmraqrdXktr2l2z52jLvj02EDpabKLm4zL7FvSz86eWkXvYtoHjHVFpk2xFKMeLjdL-ZUxGPKGt5ZFs6J_KcWVIPWDMi3d-1dpAaRIHQ6EXVHYm32XpJD2nYAqJ7d-sVqsUsh4JUahN0bRXR3mJLaGSt2NPxL-n7z_BpMRmrE) +
    -### [`save_userreport()`](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/ingest/userreport.py#L28-L28) +### Shimming to feedback Before it was extended to generic feedback, the [`UserReport` model](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/models/userreport.py#L9-L9) was first used for crash reports. Therefore an associated event ID is required, and we use it to set environment and group before saving the model to **Postgres**. -Then we shim the report to a **feedback event** and pass it to `create_feedback_issue()`. +Only then can we shim the report to a **feedback event** and pass it to `create_feedback_issue()`. If the event hasn’t reached eventstore (Snuba) by the time of ingest, we still save the report, but leave the environment + group empty and skip feedback creation. -To ensure the skipped reports eventually get fixed and shimmed to feedback, we +To ensure the skipped reports eventually get fixed and shimmed, we added a post process job to the errors pipeline: [`link_event_to_user_report()`](https://github.com/getsentry/sentry/blob/2b642e149c79b251e1c2f4339fc73d656347d74e/src/sentry/tasks/post_process.py#L1387-L1387). This is the 5th, automated way of creating feedback. + +Simplified diagram: +![](https://mermaid.ink/svg/pako:eNpdULtuwzAM_BWBUwIkzm4UXZq1QIF0MwNDlllLTfSoKAUokvx7ZasZWi06kMfj8a6g_EjQwhRl0OJ9j06Ux9rYPvn-g2gcpDqJ7fZZ3BCapkG4CXZ5kN3qMH-7l7NRJ-0z0_qIDtPSfAx8ZYqGWNCFXOLkI83zIfSffqirKu4QKEYfWQTPSYToFTGLmQVH8fRXbZfDKBPxIlXoUyTuVghvvxihOqnSi5X_B9XdsAFL0UozlgSucw0habLFZFvg2Uw6IaC7F6LMyR--nYI2xUwbqB72Rpbk7KNIoyk3vtZIl2TvP_9DeX4) +[diagram source](https://mermaid.live/edit#pako:eNpdULtuwzAM_BWBUwIkzm4UXZq1QIF0MwNDlllLTfSoKAUokvx7ZasZWi06kMfj8a6g_EjQwhRl0OJ9j06Ux9rYPvn-g2gcpDqJ7fZZ3BCapkG4CXZ5kN3qMH-7l7NRJ-0z0_qIDtPSfAx8ZYqGWNCFXOLkI83zIfSffqirKu4QKEYfWQTPSYToFTGLmQVH8fRXbZfDKBPxIlXoUyTuVghvvxihOqnSi5X_B9XdsAFL0UozlgSucw0habLFZFvg2Uw6IaC7F6LMyR--nYI2xUwbqB72Rpbk7KNIoyk3vtZIl2TvP_9DeX4) +
    ### Envelopes @@ -138,10 +143,9 @@ to Sentry, with `/api/0/projects/{organization_id_or_slug}/{project_id_or_slug}/user-feedback/`. See [https://docs.sentry.io/api/projects/submit-user-feedback/](https://docs.sentry.io/api/projects/submit-user-feedback/). +
    ---- - -## Crash reports +### Crash reports The **crash report modal** pops up when Sentry detects an error on the current page, prompting users to describe what happened. On the backend, crash report @@ -155,21 +159,25 @@ We implement it as a Django view: Crash reports are also shimmed to feedback. The pipeline is the same as the `/user-feedback` endpoint. -
    -### Sentry UI +--- + +## Sentry UI + +![](https://mermaid.ink/svg/pako:eNp9Uj1vwjAQ_SvWTUECsWdgKaViqFQVmDhUmeRILBI7tc8DAv577YRAG6F68fn53b37OkNmcoIUCiubUqznqEU4zu87YMXGyoJcB8fTGMeFJbdNED5utkg2juwnNcayGyGMdg--034vt8kqXtOXSmXH0nhHPYV03hmokR-ypNmeIoSsnPPkvgKxMUrzFmHaQQi7pwwxmczEBeHtdY1wEV4FlwVRvpfZUWyWIpkebq_RPYRtc_8jEpK0k57ZEvuSBuSB3u23lV3GzMScWKrKRe2ZiJ0Si2dh_y_jHvZX3zqzn0jv8O3JqtieyzDTtsdxEE-oA3UYQ022lioPy3GOQghcUk0IaTArVZSMgPoaiNKzWZ10BilbT2PwTS6Z5kqGYdaQHmTlAkq5Csv03q1bu3XXH4El2dU) +[diagram source](https://mermaid.live/edit#pako:eNp9Uj1vwjAQ_SvWTUECsWdgKaViqFQVmDhUmeRILBI7tc8DAv577YRAG6F68fn53b37OkNmcoIUCiubUqznqEU4zu87YMXGyoJcB8fTGMeFJbdNED5utkg2juwnNcayGyGMdg--034vt8kqXtOXSmXH0nhHPYV03hmokR-ypNmeIoSsnPPkvgKxMUrzFmHaQQi7pwwxmczEBeHtdY1wEV4FlwVRvpfZUWyWIpkebq_RPYRtc_8jEpK0k57ZEvuSBuSB3u23lV3GzMScWKrKRe2ZiJ0Si2dh_y_jHvZX3zqzn0jv8O3JqtieyzDTtsdxEE-oA3UYQ022lioPy3GOQghcUk0IaTArVZSMgPoaiNKzWZ10BilbT2PwTS6Z5kqGYdaQHmTlAkq5Csv03q1bu3XXH4El2dU) -You can view the crash reports tied to an issue at the "User Feedback" tab of -the Issue Details page. This also includes user reports submitted with the -old feedback API. +You can view the user reports related to an issue at the "User Feedback" tab of +the Issue Details page. This includes crash reports AND feedback submitted +through the old API. --- ## Email alerts -Email alerts are triggered in feedback issue’s post process pipeline. (Unrelated -to the task in the user report diagram.) It’s the same alerts as generic, -non-error issues, but we apply some feedback-specific filters. **We skip emails if:** +Email alerts are triggered in feedback’s post process pipeline. (Unrelated to +the post process diagram above.) We apply some feedback-specific +filters, **skipping emails if:** 1. The feedback is [marked as spam](https://docs.sentry.io/product/user-feedback/#spam-detection-for-user-feedback) AND the `organizations.user-feedback-spam-filter-actions` feature flag is enabled. 2. The source is NOT a new feedback envelope / the widget, AND the “Crash Report Notifications” setting is disabled. From 2be8544316520029ae874986eefcafc51b30d799 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 17:07:45 -0700 Subject: [PATCH 23/29] Tweak feedback envelope --- src/docs/feedback-architecture.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index 17335113a3..54ae02dc39 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -37,8 +37,8 @@ which ## Feedback events -The new and preferred way to send feedback from the SDK is as an [event envelope](https://develop.sentry.dev/sdk/envelopes/#full-examples). -The item type is the same as errors, except the event type = `"feedback"`. While +The new and preferred way to send feedback from the SDK is in an [event envelope](https://develop.sentry.dev/sdk/envelopes/#full-examples). +The format is the same as error events, except the `type` header = `"feedback"`. While user reports have an associated event, **new feedback _is_ an event**. This offers 2 improvements: From 9090d248d34f1f367d288013830c736be80d6983 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 17:10:00 -0700 Subject: [PATCH 24/29] Update report diagram --- src/docs/feedback-architecture.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index 54ae02dc39..963b7359dc 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -103,8 +103,8 @@ user_report = {
    ### Ingest diagram -![](https://mermaid.ink/svg/pako:eNp9VE1v2zAM_SuEgAIu0CD3HAYM7Qrs0LVoehmswFBkJhZqS5o-AhRt__so2s62Npkvpomnx8dHyq9CuxbFSuyD8h083UgrU8zb8XONNoWXkpIpoHchNWhb74xNtRTLHDEsdojtVulnKTYjUAcVu2aCD65VPWGvSxIeOQl3JTnhiY9efxfdZauTcTbWt3MECwjZgrEQcIchYJhqRXXApsgYy5Uk0BM7MzTJNUdtkzBUCY_JxsSY8SQPLBZf4E2K77eAB_IAfHAaY8RWircz7B-zzHG25LHtiwtAe8DeeQRvPPbGMkB5X_90OcBX73uj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Ic3uqqN3WNMC5WS0t1AjcTNJZOPAAa_t3BWNc4ZlG2BRwojIk7yZjHfv63vi5A3-3GG_NTJ9wvzX2VsYgTfq7RzYSjZkz4ziWs0LVAeMFS0hZMhTutMrJZmSmvIlrzi-JilSxGTC1hXX-fwcnMCSG18KiuypvuhBl4Pm7eqrtbltbym2T10jrrg02MDpafJLm4yLrNvST87e2oVvYtpHzDWFZk2xVKMerjcLOVXxmDIG95aFs2K_qUUV4LUD8q0dO2fpAWQInU4EHZFYW_2XZJC2hcCqpzc-tFqsUoh45UYhd4YRXd1EKud6iNlsTVU68v4I-H_ycsfwTWaqg)
    ### Shimming to feedback From 35b6d6fabe83596d075cfcd241c27edd57bce02a Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 17:13:19 -0700 Subject: [PATCH 25/29] Update title --- src/docs/feedback-architecture.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index 963b7359dc..2555f42d7f 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -1,5 +1,5 @@ --- -title: User Feedback - Backend Architecture +title: User Feedback Architecture --- **The goal of this doc is to give engineers an in-depth, systems-level understanding of User Feedback.** From e81a0317a1e88a283ed91454d6285afc69513b6a Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 17:18:51 -0700 Subject: [PATCH 26/29] Add ff's --- src/docs/feedback-architecture.mdx | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index 2555f42d7f..ca4f2306a6 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -184,3 +184,15 @@ filters, **skipping emails if:** - in UI: Settings > Projects > (project slug) > User Feedback > “Enable Crash Report Notifications” - project option in code: `sentry:feedback_user_report_notifications` - default = true/enabled + +--- + +## Feature flags for self-hosted +To disable the feedback feature, set these to false: +`organizations:user-feedback-ui` +`organizations:feedback-visible` +`organizations:user-feedback-ingest` + +To disable LLM spam filters, set these to false: +`organizations:user-feedback-spam-filter-ingest` +`organizations:user-feedback-spam-filter-actions` From 638dddaf9f4987edfc55a351beb14121587c98f9 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 17:19:23 -0700 Subject: [PATCH 27/29] Use bullet points --- src/docs/feedback-architecture.mdx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index ca4f2306a6..9a4b843793 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -189,10 +189,10 @@ filters, **skipping emails if:** ## Feature flags for self-hosted To disable the feedback feature, set these to false: -`organizations:user-feedback-ui` -`organizations:feedback-visible` -`organizations:user-feedback-ingest` +* `organizations:user-feedback-ui` +* `organizations:feedback-visible` +* `organizations:user-feedback-ingest` To disable LLM spam filters, set these to false: -`organizations:user-feedback-spam-filter-ingest` -`organizations:user-feedback-spam-filter-actions` +* `organizations:user-feedback-spam-filter-ingest` +* `organizations:user-feedback-spam-filter-actions` From 2801d44bc1eeb030f0b791ad83ad2daed40d2b45 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Mon, 24 Jun 2024 17:22:37 -0700 Subject: [PATCH 28/29] Tweak ff descrip --- src/docs/feedback-architecture.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index 9a4b843793..b15b7e3f79 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -188,7 +188,7 @@ filters, **skipping emails if:** --- ## Feature flags for self-hosted -To disable the feedback feature, set these to false: +To disable all UI features and/or ingestion, set these to false: * `organizations:user-feedback-ui` * `organizations:feedback-visible` * `organizations:user-feedback-ingest` From ec245b633e4ff7cf5bb74b00a0c201f47b4f53b2 Mon Sep 17 00:00:00 2001 From: Andrew Liu <159852527+aliu39@users.noreply.github.com> Date: Wed, 26 Jun 2024 12:01:42 -0700 Subject: [PATCH 29/29] Final tweaks --- src/docs/feedback-architecture.mdx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/docs/feedback-architecture.mdx b/src/docs/feedback-architecture.mdx index b15b7e3f79..d4ed6d4ab2 100644 --- a/src/docs/feedback-architecture.mdx +++ b/src/docs/feedback-architecture.mdx @@ -2,7 +2,7 @@ title: User Feedback Architecture --- -**The goal of this doc is to give engineers an in-depth, systems-level understanding of User Feedback.** +**The goal of this doc is to give engineers an in-depth understanding of User Feedback's backend.** It will: 1. describe the relevant ingestion pipelines, data models, and functions. 2. explain the difference between “feedback”, “user reports”, and “crash reports”, and why we built and need to support each. @@ -167,9 +167,8 @@ Crash reports are also shimmed to feedback. The pipeline is the same as the ![](https://mermaid.ink/svg/pako:eNp9Uj1vwjAQ_SvWTUECsWdgKaViqFQVmDhUmeRILBI7tc8DAv577YRAG6F68fn53b37OkNmcoIUCiubUqznqEU4zu87YMXGyoJcB8fTGMeFJbdNED5utkg2juwnNcayGyGMdg--034vt8kqXtOXSmXH0nhHPYV03hmokR-ypNmeIoSsnPPkvgKxMUrzFmHaQQi7pwwxmczEBeHtdY1wEV4FlwVRvpfZUWyWIpkebq_RPYRtc_8jEpK0k57ZEvuSBuSB3u23lV3GzMScWKrKRe2ZiJ0Si2dh_y_jHvZX3zqzn0jv8O3JqtieyzDTtsdxEE-oA3UYQ022lioPy3GOQghcUk0IaTArVZSMgPoaiNKzWZ10BilbT2PwTS6Z5kqGYdaQHmTlAkq5Csv03q1bu3XXH4El2dU) [diagram source](https://mermaid.live/edit#pako:eNp9Uj1vwjAQ_SvWTUECsWdgKaViqFQVmDhUmeRILBI7tc8DAv577YRAG6F68fn53b37OkNmcoIUCiubUqznqEU4zu87YMXGyoJcB8fTGMeFJbdNED5utkg2juwnNcayGyGMdg--034vt8kqXtOXSmXH0nhHPYV03hmokR-ypNmeIoSsnPPkvgKxMUrzFmHaQQi7pwwxmczEBeHtdY1wEV4FlwVRvpfZUWyWIpkebq_RPYRtc_8jEpK0k57ZEvuSBuSB3u23lV3GzMScWKrKRe2ZiJ0Si2dh_y_jHvZX3zqzn0jv8O3JqtieyzDTtsdxEE-oA3UYQ022lioPy3GOQghcUk0IaTArVZSMgPoaiNKzWZ10BilbT2PwTS6Z5kqGYdaQHmTlAkq5Csv03q1bu3XXH4El2dU) -You can view the user reports related to an issue at the "User Feedback" tab of -the Issue Details page. This includes crash reports AND feedback submitted -through the old API. +You can view the user reports related to a specific issue at the "User Feedback" +tab of Issue Details. This excludes "new" feedback (anything sent from the widget). --- @@ -193,6 +192,6 @@ To disable all UI features and/or ingestion, set these to false: * `organizations:feedback-visible` * `organizations:user-feedback-ingest` -To disable LLM spam filters, set these to false: +To disable auto spam filters, set these to false: * `organizations:user-feedback-spam-filter-ingest` * `organizations:user-feedback-spam-filter-actions`