Open thinkocapo opened 1 year ago
Assigning to @getsentry/support for routing ⏲️
Routing to @getsentry/product-owners-user-feedback for triage ⏲️
Let's improve the docs and provide some shared content across platforms on how getLastEvent
can be used in conjunction with user feedback.
Core or SDK?
Platform/SDK
Which part? Which one?
Android, Flutter, iOS
Description
Ask1: Docs for Android, iOS, Flutter say to Capture Message and then create a userFeedback object. Shouldn't you create the userFeedback object before you Capture a Message? This way it is on scope, similar to how you setTags and setBreadcrumbs before you Capture Message or Capture Exception.
https://docs.sentry.io/platforms/android/enriching-events/user-feedback/ https://docs.sentry.io/platforms/flutter/enriching-events/user-feedback/?original_referrer=https%3A%2F%2Fdocs.sentry.io%2Fplatforms%2Fandroid%2Fenriching-events%2Fuser-feedback%2F https://docs.sentry.io/platforms/apple/enriching-events/user-feedback/?original_referrer=https%3A%2F%2Fdocs.sentry.io%2Fplatforms%2Fandroid%2Fenriching-events%2Fuser-feedback%2F
Update: I've re-read the docs, and it's clear "Sentry needs the eventId" so I guess Sentry.captureUserFeedback will send the feedback up to Sentry.io and Sentry.io will pair it to the event.
Ask2: Can you show code example of how to get the event Id? Docs say it is needed I heard there is some method like
Sentry.getLastEventId()
can we show that in docs here?Or doesn't this work?
eventId = Sentry.captureMessage("message")
I'm not sure. Can we document how to do this?Ask3: Do you use this the same way for both handled events and unhandled events? I was getting asked that. If app crashes, then when app restarts, will
getLastEventId()
have the eventId from the preceding crash? If you need to handle these differently, then let's document it or write some text about what to expect here. I kept getting asked, "Well what about crashes, because docs say captureMessage"Suggested Solution
see asks