I am trying to integrate Sentry crash reporting into my Electron app.
I have created an account on Sentry, integrated the Electron SDK and crashes in my main and renderer processes are reported just fine.
My main process starts a child process using child_process
module, which in turn uses my custom native module(written in C++). I need crashes to be reported from the child process either, including crashes in the native module. As the child process is not a pure Electron process and doesn’t have access to Electron API directly, initialization of Electron SDK fails.
Is there a way to achieve that?
The only way that I see is to integrate Node.js SDK into a child process and use C/C++ SDK in my native module. Though it seems to be a bit too complicated that’s why I wonder if there’s an easier way (maybe with Electron SDK only)?