Skip to content

Commit

Permalink
fix: Attempt to send minidumps for all process-gone reasons (#586)
Browse files Browse the repository at this point in the history
  • Loading branch information
timfish authored Nov 15, 2022
1 parent cd7ffcb commit de9bf65
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/main/integrations/sentry-minidump/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { app, crashReporter } from 'electron';

import { mergeEvents } from '../../../common';
import { getEventDefaults } from '../../context';
import { CRASH_REASONS, onChildProcessGone, onRendererProcessGone } from '../../electron-normalize';
import { EXIT_REASONS, onChildProcessGone, onRendererProcessGone } from '../../electron-normalize';
import { sentryCachePath } from '../../fs';
import { getRendererProperties, trackRendererProperties } from '../../renderers';
import { ElectronMainOptions } from '../../sdk';
Expand Down Expand Up @@ -58,8 +58,8 @@ export class SentryMinidump implements Integration {

this._minidumpLoader = getMinidumpLoader();

onRendererProcessGone(CRASH_REASONS, (contents, details) => this._sendRendererCrash(options, contents, details));
onChildProcessGone(CRASH_REASONS, (details) => this._sendChildProcessCrash(options, details));
onRendererProcessGone(EXIT_REASONS, (contents, details) => this._sendRendererCrash(options, contents, details));
onChildProcessGone(EXIT_REASONS, (details) => this._sendChildProcessCrash(options, details));

// Start to submit recent minidump crashes. This will load breadcrumbs and
// context information that was cached on disk prior to the crash.
Expand Down Expand Up @@ -121,6 +121,7 @@ export class SentryMinidump implements Integration {
tags: {
'event.environment': 'native',
'event.process': crashedProcess,
'exit.reason': details.reason,
event_type: 'native',
},
});
Expand Down Expand Up @@ -153,6 +154,7 @@ export class SentryMinidump implements Integration {
tags: {
'event.environment': 'native',
'event.process': details.type,
'exit.reason': details.reason,
event_type: 'native',
},
});
Expand Down

0 comments on commit de9bf65

Please sign in to comment.