ChildProcess

Captures breadcrumbs and events for child process exits and crashes. (default)

Captures breadcrumbs and events for child process exits and crashes.

Copied
type ExitReason =
  | 'clean-exit'
  | 'abnormal-exit'
  | 'killed'
  | 'crashed'
  | 'oom'
  | 'launch-failed'
  | 'integrity-failure';

interface ChildProcessOptions {
  /** Child process events that generate Sentry breadcrumbs */
  breadcrumbs: ExitReason[];
  /** Child process events that generate Sentry events */
  events: ExitReason[];
}

For example, to disable the capture of breadcrumbs and only capture events for Out-Of-Memory crashes:

Copied
import * as Sentry from '@sentry/electron/main';

Sentry.init({
  dsn: 'https://examplePublicKey@o0.ingest.sentry.io/0',
  integrations: [
    Sentry.childProcessIntegration({
      breadcrumbs: [],
      events: ['oom'],
    }),
  ],
});
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").