获取更多动态,关注公众号:黑客下午茶

User Feedback

The user feedback API provides the ability to collect user information when an event occurs. 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. To get the eventId, for example, you can use the beforeSend or the return value of the methods capturing an event.

Copied
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("john.doe@example.com");
userFeedback.setName("John Doe");
Sentry.captureUserFeedback(userFeedback);
You can edit this page on GitHub.