Set Up User Feedback
The user feedback API allows you to collect user feedback while utilizing your own UI. You can use the same programming language you have in your app to send user feedback. In this case, the SDK creates the HTTP request so you don't have to deal with posting data via HTTP.
Sentry pairs the feedback with the original 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.UserFeedback; SentryId sentryId = Sentry.captureMessage("My message"); UserFeedback userFeedback = new UserFeedback(sentryId); userFeedback.setComments("It broke."); userFeedback.setEmail("firstname.lastname@example.org"); userFeedback.setName("John Doe"); Sentry.captureUserFeedback(userFeedback);
Alternatively, you can use the User Feedback API endpoint directly.