Introducing Sentry Electron

Jan Michael Auer /

Great news, everyone: Sentry is going nuclear!

Wait, no, not like that.

With our new Electron SDK you get first-class support for all the things you’ve come to love in our other SDKs: breadcrumbs, device and OS information, and of course, high quality stack traces with source map support.

Electron renderer crash
Stack trace from an Electron renderer crash

But wait, there’s more. (Be sure to read that last sentence in a TV announcer voice.)

Does your app rely on native extensions or spawn subprocesses? Then you’ll be happy to learn that the Electron SDK also captures native crashes, and includes the same breadcrumbs and context information on top of symbolicated stack traces. That means you’ll see exactly what the user clicked just before a crash happened in C, C++ or any other native language.

Electron native crash
Part of the stack trace from an Electron native crash

We continually strive to make our SDKs as easy to use as possible. Following our Cordova SDK two months ago, we’ve continued our mission to provide a streamlined JavaScript experience, which is why the Electron SDK provides an even smaller API. It can be configured as easily as:

const { SentryClient } = require('@sentry/electron');
SentryClient.create({
  dsn: '__DSN__',
  // more options...
});

This sets up native crash handling and JavaScript error handling with sensible defaults. If you prefer to customize, have a look at the official documentation for all configuration options. As always, we plan to add many more features in near future, so please let us know what you think and how we could further improve Electron support at Sentry. And stay tuned as we roll out updates to more JavaScript SDKs soon.

We would like to thank our incredible community for helping us craft this integration. Special thanks in particular to Tim Fish, who started the initial work on this SDK, provided us with crucial insights into working with Electron, and continues to be an essential contributor and co-maintainer of this SDK.

All yours now. Don’t hesitate to post feedback in our forum, issue tracker, or to get in touch with our support engineers. As always, they’re here to help. And also to code. But mostly to help.