Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Report as app context what's the current activity during the error #18

Closed
5 tasks done
marandaneto opened this issue Apr 11, 2023 · 5 comments
Closed
5 tasks done

Comments

@marandaneto
Copy link

marandaneto commented Apr 11, 2023

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

Tasks

  1. Platform: Android enhancement
    markushi
  2. Platform: Cocoa Type: Enhancement
    brustolin
  3. Extra Context Platform: Dart enhancement
    denrase
  4. Platform: React-Native
    lucas-zimerman

Other platforms to consider:

  • .NET
  • Unity
@romtsn
Copy link
Member

romtsn commented Apr 19, 2023

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.

@brustolin
Copy link

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.

@krystofwoldrich
Copy link
Member

RN sends this information as a tag routing.route.name.

Could the key be:

event.contexts.app.screen
event.contexts.app.view

@kahest
Copy link
Member

kahest commented Jul 19, 2023

As discussed for Cocoa here: getsentry/sentry-cocoa#3140 (comment)

  • we should consider adding a manual API to set the screen/activity for use cases where automatic detection doesn't work well (e.g. SwiftUI)

@marandaneto
Copy link
Author

For android: https://github.com/skydoves/snitcher
We can take a look at how on they track "current screen" for crashes.

@kahest kahest closed this as completed Nov 20, 2023
@stephanie-anderson stephanie-anderson added this to the Errors milestone Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

No branches or pull requests

6 participants