Closed marandaneto closed 7 months ago
We should define what would be the key for this in App
context, this also requires some backend work to make it searchable, update relay with the new known key, etc.
The navigation crumbs on Cocoa are based on viewDidAppear
of UIViewControllers. While this helps you to understand which UIViewControllers are visible, it is not a reliable way of detecting on which screen the user currently is, as you can have nested UIViewControllers. On Android, we have a similar problem with single activity and fragments. So basically, we need a reliable way of reporting the current screen.
We could traverse the view controller tree to find out the root controller, but even this is not guaranteed to be correct.
RN sends this information as a tag routing.route.name
.
Could the key be:
event.contexts.app.screen
event.contexts.app.view
As discussed for Cocoa here: https://github.com/getsentry/sentry-cocoa/issues/3140#issuecomment-1641992662
For android: https://github.com/skydoves/snitcher We can take a look at how on they track "current screen" for crashes.
I'd like to know which Activity/Screen was visible during the error (right now we only know if it's in the background or foreground). Right now it's only possible by looking at crumbs, I want to make this more visible. This should be searchable/alertable, I want to know which screens are getting more errors and alert only the screens I care the most. For transactions this is not needed since the Screen name is already the transaction name. I want to filter/alert errors that happened during screen X only.
For example, an error that happened after payment is less important than an error during the payment :P
Other platforms to consider: