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(feedback): Add UF screenshot capability #9867

Merged
merged 21 commits into from
May 9, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ The following options can be configured for the integration in `feedbackIntegrat
| ----------------- | ------------------------ | ------------------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `showName` | `boolean` | `true` | Displays the name field on the Feedback form, however will still capture the name (if available) from Sentry SDK context. |
| `showEmail` | `boolean` | `true` | Displays the email field on the Feedback form, however will still capture the email (if available) from Sentry SDK context. |
| `showScreenshot` | `boolean` | `true` | Allows the user to send a screenshot attachment with their feedback. Requires SDK version 8.0.0 and above. |
| `isNameRequired` | `boolean` | `false` | Requires the name field on the Feedback form to be filled in. |
| `isEmailRequired` | `boolean` | `false` | Requires the email field on the Feedback form to be filled in. |
| `useSentryUser` | `Record<string, string>` | `{ email: 'email', name: 'username'}` | Map of the `email` and `name` fields to the corresponding Sentry SDK user fields that were called with `Sentry.setUser`. |
Expand Down
14 changes: 10 additions & 4 deletions docs/platforms/javascript/common/user-feedback/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,22 @@ The embeddable JavaScript widget allows users to submit feedback from anywhere i

To set up the integration, add the following to your Sentry initialization. There are many options you can pass to the integration constructor. See the [configuration documentation](/platforms/javascript/user-feedback/configuration/) for more details.

### Session Replay

The User Feedback Widget integrates easily with <PlatformLink to="/session-replay/">Session Replay</PlatformLink>. First, make sure that the Session Replay integration is configured correctly and that `replaysOnErrorSampleRate` is greater than 0. When this is done, the Replay SDK will buffer up to 30 seconds worth of events until the user *opens* the User Feedback Widget. If the user submits feedback, you'll be able to view the Feedback (including the replay), inside of Sentry's web application.

<SignInNote />

<PlatformContent includePath="user-feedback/setup" />

By default, this will insert the widget into the bottom right corner of your website. You're free to customize nearly every aspect of the widget, including replacing it completely with your own UI.

On SDK version 8.0.0 and above, users can send screenshots with their feedback. You can configure this using the `showScreenshot` option, by default it is set to `true`. Screenshots aren't supported on mobile devices, so the screenshot button will be hidden automatically in this case.
Copy link
Member

Choose a reason for hiding this comment

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

can we mention here (and on the config page above too) the min. version for on-prem users to have that enables screenshot support?

Copy link
Member Author

Choose a reason for hiding this comment

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

Just to clarify, is on-prem the same as ST?

Copy link
Member

Choose a reason for hiding this comment

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

We've got:

  • SaaS -> Software as a service, sentry.io where people signup and login on their own. There's a single database will all the orgs and users and so on saved.
  • ST -> Single Tenant, a separate deployment of sentry that we (the company) manage. We run the servers, but the servers only store information for one company.
  • On-Prem -> Someone downloads sentry from github and runs it themselves. This'll also (almost always) just have 1 org saved into the database.

S4S is an example of ST where we can deploy the sentry codebase and not affect sentry.io. ST and On-Prem have very similar configs, while the SaaS codebase is special because it has the extra billing layer added on top (all the features are the same everywhere though)

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! Feel free to make a suggestion if the wording is iffy


<Alert level="">
Screenshots use your [attachments quota](/product/accounts/quotas/manage-attachments-quota). All plans come with 1GB of attachments, which is approxiamately 2500 screenshots.
</Alert>

### Session Replay

The User Feedback widget integrates easily with <PlatformLink to="/session-replay/">Session Replay</PlatformLink>. First, make sure that the Session Replay integration is configured correctly and that `replaysOnErrorSampleRate` is greater than 0. When this is done, the Replay SDK will buffer up to 30 seconds of the user's session until the user *opens* the User Feedback widget. If the user submits feedback, you'll be able to view the feedback (including the replay), inside of Sentry's web application.
c298lee marked this conversation as resolved.
Show resolved Hide resolved

</PlatformSection>

## User Feedback API
Expand Down
1 change: 1 addition & 0 deletions docs/product/user-feedback/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ The User Feedback Widget is an out-of-the-box, persistent widget you can add any
Feedback collected via the Feedback Widget may have some or all of the following information (depending on what you mark as required and what’s available from the error context):

- Description from the user
- Screenshot from the user
- User email
- Associated replay event (with up to 60 seconds of replay recording before the user submitted the feedback)
- Learn more about how to set up Session Replay [here](/product/session-replay/getting-started/).
Expand Down