Leak upload backend server
At Square so far we've used Bugsnag to upload our debug leaks. We convert the leak trace into a stacktrace that's based on the common cause subset of the leaktrace, then upload that and get nice grouping, and we add the real leak details to a tab.
While that's worked ok, there are limitations:
- The UX is made for crashes so engineers aren't always sure how to navigate around / where to look
- The Bugsnag API is made for uploading one "report" (crash or warning) at a time. The new LeakCanary version will find all the leaks that exist in the VM. So each analysis yields many leaks. Ideally our backend would have a list of heap analysis, as well as a list of leak groups, each leak group having a list of instances that each might belong to a different leak analysis that you should be able to navigate back to. Each leak instance that belong to the same analysis should have the same metadata (about the device and logs until the heap dump was taken)
General shape:
- Deployable on square internal infra as well as public clouds. AWS? Heroku?
- Build something with Misk?
- Endpoint takes a heap report which itself consists of groups of leaks, plus maybe a ring buffer of events (?)
- Stored in db and then needs a frontend for it
- Also auth, and something pluggable to companies auth things
- In LeakCanary this will require a reporting module that depends on retrofit / okhttp
- This will be called by devices running production versions of apps
- Make it easy to share leaks, also share leaks publicly. Ideally people stop pasting leak traces here they just give a leak link.
cc @loopj : we'll try to build a reference implementation for this, but it sure would be nice if bugsnag supported uploading leak analysis reports (there's a lot to unpack here, happy to chat live)
what I've been doing at gojek is. i am uploading the stack traces in the elastic search. and ppl always able to share the details through the snapshot via Kibana.
i guess ELK would satisfy you're requirements.
You should consider building an open source example / tutorial so that anyone can do this!