From 8d1137fd091b75f230392fa8c5624fb382424783 Mon Sep 17 00:00:00 2001 From: Curry Yang <1019yanglu@gmail.com> Date: Fri, 6 Dec 2024 15:26:06 +0800 Subject: [PATCH] fix: breakpoint not working --- packages/insomnia/src/main/sentry.ts | 3 ++- packages/insomnia/src/ui/sentry.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/insomnia/src/main/sentry.ts b/packages/insomnia/src/main/sentry.ts index 776eb082d1f..8875c7d6411 100644 --- a/packages/insomnia/src/main/sentry.ts +++ b/packages/insomnia/src/main/sentry.ts @@ -1,6 +1,7 @@ import * as Sentry from '@sentry/electron/main'; import * as session from '../account/session'; +import { isDevelopment } from '../common/constants'; import { type ChangeBufferEvent, database as db } from '../common/database'; import { SENTRY_OPTIONS } from '../common/sentry'; import * as models from '../models/index'; @@ -54,7 +55,7 @@ export function initializeSentry() { */ shouldSend: () => enabled, }, - integrations: [ + integrations: isDevelopment() ? [] : [ Sentry.anrIntegration({ captureStackTrace: true }), ], }); diff --git a/packages/insomnia/src/ui/sentry.ts b/packages/insomnia/src/ui/sentry.ts index f1223a277c3..ab5f0b8c4b5 100644 --- a/packages/insomnia/src/ui/sentry.ts +++ b/packages/insomnia/src/ui/sentry.ts @@ -1,5 +1,6 @@ import * as Sentry from '@sentry/electron/renderer'; +import { isDevelopment } from '../common/constants'; import { SENTRY_OPTIONS } from '../common/sentry'; export function initializeSentry() { @@ -10,7 +11,7 @@ export function initializeSentry() { // set 0.1 sample rate for traces, only send 10% of traces, and check whether the limit is exceeded // https://konghq.sentry.io/settings/billing/overview/?category=transactions tracesSampleRate: 0.1, - anrDetection: { + anrDetection: isDevelopment() ? false : { captureStackTrace: true, }, });