Set Up User Feedback

Learn more about collecting user feedback when an event occurs. Sentry pairs the feedback with the original event, giving you additional insight into issues.

The User Feedback feature allows you to collect user feedback from anywhere inside your application at any time, without needing an error event to occur first.

The User Feedback API allows you to collect user feedback while using your own UI components.

Sentry can optionally pair the feedback with an event, giving you additional insight into issues. Sentry needs the eventId to be able to associate the user feedback to the corresponding event. For example, to get the eventId, you can use beforeSendor the return value of the method capturing an event.

Copied
import io.sentry.Sentry;
import io.sentry.protocol.Feedback;

Feedback feedback = new Feedback("I encountered a bug while using the app.");
feedback.setName("John Doe");
feedback.setContactEmail("john.doe@example.com");
// Optionally associate the feedback with an event
SentryId sentryId = Sentry.captureMessage("My message");
feedback.setAssociatedEventId(sentryId);

Sentry.captureFeedback(feedback);
Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").