Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Attempt to send minidumps for all process-gone reasons #586

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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