Sentry User Feedback: widget, API and triage
Sentry User Feedback lets users send a message, optionally with name, email and a screenshot, straight into your Sentry project. On the web you add feedbackIntegration() for a ready-made "Report a Bug" widget, or call Sentry.captureFeedback() from your own form; iOS, Android, React Native and Flutter have their own forms and capture APIs. Feedback arrives on the User Feedback page linked to the user's errors, replay and tags, where you resolve it, assign it or mark it as spam.
Steps
- Pick the collection methodUse feedbackIntegration() or a mobile form for a ready-made UI, or captureFeedback() from your own support form.
- Identify the userCall Sentry.setUser() after sign-in so name and email are filled in and feedback is tied to the user.
- Link feedback to errorsPass associatedEventId, and enable Session Replay on errors so the feedback carries a replay.
- Set up an alertUse an alert rule with Issue Category is equal to Feedback so new feedback reaches the right people.
- Triage the listResolve, assign or mark as spam on the User Feedback page, newest unresolved first.
The web widget: feedbackIntegration
Add the integration (JavaScript SDK 7.85.0 or newer; the browser needs Shadow DOM and the <dialog> element). A "Report a Bug" button appears in the bottom-right corner:
Sentry.init({
dsn: "https://<key>@o<orgId>.ingest.sentry.io/<projectId>",
integrations: [
Sentry.feedbackIntegration({
colorScheme: "system",
isEmailRequired: true,
}),
],
});| Option | Default |
|---|---|
autoInject | true (set false to use your own button) |
showName / showEmail | true |
isNameRequired / isEmailRequired | false |
enableScreenshot | true (SDK 8.0.0+, hidden on mobile devices) |
useSentryUser | { email: 'email', name: 'username' } |
triggerLabel / formTitle | "Report a Bug" |
submitButtonLabel | "Send Bug Report" |
showBranding | true |
To open the form from your own menu item, set autoInject: false and attach it:
const feedback = Sentry.getFeedback();
feedback?.attachTo(document.querySelector("#report-bug"), {
formTitle: "Report a Bug!",
});Screenshots count against your attachments quota. If Session Replay is set up with replaysOnErrorSampleRate above 0, the replay buffer is attached to the feedback, so you see what the user did before writing it (see Sentry Session Replay). Self-hosted Sentry needs 24.4.2 or newer for the full feature.
Your own form: captureFeedback and the crash-report modal
If you already have a support form, send its contents with captureFeedback. Only message is required; pass associatedEventId to tie the feedback to a specific error:
const eventId = Sentry.captureException(error);
Sentry.captureFeedback(
{
name: "Jane Doe",
email: "[email protected]",
message: "Checkout spun forever, then showed a blank page",
associatedEventId: eventId,
},
{ includeReplay: true },
);The older crash-report modal is still there: call Sentry.showReportDialog({ eventId }) after an error (outside a framework, from beforeSend when an exception event has an ID). It asks for name, email and a description and pairs them with that event. In React or Angular, Sentry suggests collecting feedback in your error boundary or error-handling component instead.
The mistake people make next is calling captureFeedback without an event ID or a user, then wondering why the feedback isn't next to the error. Get the ID from the capture call, beforeSend, or Sentry.lastEventId(), and call Sentry.setUser() after sign-in so the widget pre-fills name and email.
User feedback on mobile
| SDK | Built-in form | Your own UI |
|---|---|---|
| iOS (Cocoa) | SentrySDK.feedback.show(), or .sentryFeedback(isPresented:) in SwiftUI (9.17.0+); configure with options.configureUserFeedback | SentrySDK.capture(feedback:) with SentryFeedback(message:name:email:source:associatedEventId:attachments:) |
| Android | Sentry.feedback().show(sentryId) or SentryUserFeedbackForm.Builder | Sentry.feedback().capture(feedback) with io.sentry.protocol.Feedback |
| React Native | Sentry.showFeedbackForm() (root wrapped in Sentry.wrap) or <FeedbackForm /> | Sentry.captureFeedback({ name, email, message, associatedEventId }) |
| Flutter | SentryFeedbackForm.show(context, …) (named SentryFeedbackWidget before 9.21.0) | Sentry.captureFeedback(SentryFeedback(message: …, contactEmail: …)) |
Shake to report is opt-in everywhere: useShakeGesture on iOS, options.feedbackOptions.isUseShakeGesture = true on Android, enableShakeToReport: true in React Native's feedbackIntegration. On iOS, the old floating widget (showWidget(), configureWidget) is deprecated and due to be removed in SDK v10. Android example:
val feedback = Feedback("The export button does nothing on the orders screen")
feedback.associatedEventId = sentryId
Sentry.feedback().capture(feedback)Setup details for cross-platform apps: React Native and Flutter.
How feedback is triaged in Sentry
Feedback lands on the User Feedback page, newest unresolved first, filterable by project, environment and date. Selecting an item opens its details with the linked errors, replay and tags such as URL. From there:
- Resolve it (one at a time or bulk-select), which takes it out of the unresolved list.
- Mark as Spam, which moves it under the Spam heading. If your organization has generative AI features enabled, Sentry moves likely spam there automatically; turn that off with Enable Spam Detection under Settings > Projects > [project] > User Feedback.
- Assign it to a teammate, or create or link a GitHub or Jira issue through a configured integration.
For alerts, feedback is an issue category: the default "Alert me on every new issue" rule already fires on widget feedback, or add the filter Issue Category is equal to Feedback to a dedicated rule. Spam never triggers these alerts. Crash-report modal submissions need Enable Crash Report Notifications in the project's User Feedback settings. To route feedback into a team channel, see Sentry Slack alerts.
Questions
Does Sentry user feedback work without the widget?
Yes. Call Sentry.captureFeedback() with at least a message from your own form; name, email, an associated event ID and attachments are optional.
Can users attach screenshots?
In the web widget, yes, from SDK 8.0.0, but the button is hidden on mobile browsers. Screenshots count toward the attachments quota. Native and Flutter forms have their own screenshot options.
How do I get notified about new feedback?
The default alert on every new issue covers widget feedback; otherwise add an alert rule filtered on Issue Category is equal to Feedback. Spam doesn't trigger alerts.
Sources
- Set Up User Feedbackdocs.sentry.io
- Configurationdocs.sentry.io
- User Feedbackdocs.sentry.io
- Set Up User Feedback (Android)docs.sentry.io