Skip to content

Commit cd2ae9b

Browse files
authored
initialize api server with sentry dsn (#84)
1 parent 11f4407 commit cd2ae9b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/main.dev.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -60,15 +60,18 @@ import {
6060
} from './shared/pb/api';
6161
import { pomeriumCli } from './main/binaries';
6262

63+
const SentryDSN =
64+
'https://[email protected]/6146413';
6365
Sentry.init({
64-
dsn: 'https://[email protected]/6146413',
66+
dsn: SentryDSN,
67+
debug: process.env.NODE_ENV !== 'production',
6568
});
6669

6770
let mainWindow: BrowserWindow | null;
6871
let updateStream: grpc.ClientReadableStream<ConnectionStatusUpdate> | undefined;
6972

7073
const cliProcess = child_process
71-
.spawn(pomeriumCli, ['api'])
74+
.spawn(pomeriumCli, ['api', '--sentry-dsn', SentryDSN])
7275
.on('error', (error) => {
7376
Sentry.captureEvent({
7477
message: 'API process failed to start',
@@ -348,7 +351,7 @@ app.on('ready', async () => {
348351
app.on('before-quit', () => {
349352
mainWindow?.removeAllListeners('close');
350353
updateStream?.cancel();
351-
cliProcess.kill();
354+
cliProcess.kill('SIGINT');
352355
mainWindow?.close();
353356
});
354357
});

0 commit comments

Comments
 (0)