Skip to content

Commit

Permalink
fix: Hide ANR child process from dock (#777)
Browse files Browse the repository at this point in the history
  • Loading branch information
timfish authored Oct 17, 2023
1 parent a788a0f commit eb1f60b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/sdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ensureProcess('main');

import { defaultIntegrations as defaultNodeIntegrations, init as nodeInit, NodeOptions } from '@sentry/node';
import { Integration, Options } from '@sentry/types';
import { Session, session, WebContents } from 'electron';
import { app, Session, session, WebContents } from 'electron';

import { getDefaultEnvironment, getDefaultReleaseName } from './context';
import {
Expand Down Expand Up @@ -97,6 +97,7 @@ export function init(userOptions: ElectronMainOptions): void {
const defaults = defaultIntegrations;

if (process.env.SENTRY_ANR_CHILD_PROCESS) {
app.dock?.hide();
options.autoSessionTracking = false;
options.tracesSampleRate = 0;
}
Expand Down

0 comments on commit eb1f60b

Please sign in to comment.