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.
If you're using a self-hosted Sentry instance, you'll need to be on version 24.4.2 or higher in order to use the full functionality of the User Feedback feature. Lower versions may have limited functionality. Ensure you are using the Java SDK version 8.12.0 or above of the SDK to access the latest features.
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 beforeSend
or the return value of the method capturing an event.
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);
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").