Open JakeWharton opened 6 years ago
Thanks for the detailed proposal @JakeWharton. I think this would make a lot of sense, and has been added to our roadmap. A few things we would need to think about are:
Currently individual reports are grouped on the backend. If we grouped errors locally, this could lead to discrepancies in how they are grouped on the Dashboard. Showing each individual event separately would be the simplest solution if this functionality were to support multiple platforms.
Upload and ignore are useful actions - I would also propose Discard, which deletes an error from local storage entirely, and Export, which shares a crash report via an Intent.
@JakeWharton I might be trivializing your ask/needs here (I think the option to choose to send or not makes sense as a feature), but want to play devils advocate here.
"This prevents cluttering the website with problems that are programming mistakes which never will see the light of day"
Wouldn't something like adding a new debug "stage" to your bugsnag configuration get you past that problem? We currently have production and internal stages so that I can see all of our real production crashes (and vice versa) without being cluttered with our internal build crashes.
If that's not enough separation, our iOS team actually just created a new BugSnag project called iOS internal (you could name yours Android Debug), which would give you a new api key that you can use on debug only builds and really have things sandboxed.
I'm sure you thought of those two solutions already, but kind of curious why they weren't good enough or not solving the problem you're after. Interested to hear back.
I do/did separate production and internal already. You certainly can use a third stage for local builds by a developer but there's a few things at play:
It is for that reason that I want something which can preempt crash reporting with a local UI for local, debug builds.
In every app I've ever written, I've had the debug build on my phone as well as the release build. I tend to use the debug build day-to-day and perhaps some others do to be on the bleeding edge. I usually also have an out-of-band update mechanism to grab the latest debug build from CI.
This is fun as a developer to use the bleeding edge of your product. The downside, however, is crashes caused by the inherent unstability of these builds. It's expected!
Most developers disable crash reporting in debug builds. This prevents cluttering the website with problems that are programming mistakes which never will see the light of day. This significantly reduces noise.
The problem is that a lot of times legitimate crashes occur on these builds and are lost. If I'm actively developing chances are I'll say "I'll get back to that" or "I'll report a bug for that" and never do. If i'm away from a computer, the stacktrace and information is long gone by the time that I am.
In most of the apps I've built, we distinguish CI-built debug builds vs. local-built debug builds. This lets us turn on crash reporting for people who are just driving the latest build vs. those who are actively working on it. This works great, but it only solves half the problem and legitimate crashes during development are oft forgot.
So I'd like to propose a new module be added to this project which provides a debug-only activity and infrastructure that captures these crashes and aggregates them locally. When the crash occurs, a notification is shown with a summary. It has notification actions to "report" or "ignore". Clicking on it opens the debug-only activity which provides all of the information that would have otherwise been uploaded to Bugsnag with the familar tab interface. Here we can also choose to report or ignore this notification or others we've encountered in the past.
If you've every used or seen LeakCanary, I'm envisioning it works something like that. When enabled, as an alternative form of the notifier, it captures and aggregates locally and provides options to upload or ignore.
This certainly isn't something that's specific to Android and could be applied across nearly all of your products. But I'm an Android developer, and so maybe we can be the platform which beta tests such functionality.