We could do something similar and either send a new event, or send the analysis as an attachment or context for OOM events (depending on how long the analysis takes).
This has to be a new integration, because of dependency on leakcanary.
In the first iteration, let's roll with sending a custom event. At a later point we could think of doing the analysis right after an OOM happens (if possible).
Description
LeakCanary has a whole section on how to integrate heap analysis with bugsnag https://square.github.io/leakcanary/leakcanary-for-releases/.
We could do something similar and either send a new event, or send the analysis as an attachment or context for OOM events (depending on how long the analysis takes).
This has to be a new integration, because of dependency on leakcanary.
There's also a bunch of recipes here: https://github.com/square/leakcanary/issues/2119