From 055dad87b204ad6c246478d2f07ac8d3185ec8ad Mon Sep 17 00:00:00 2001 From: Subhankar Banerjee <42092449+shubhrec@users.noreply.github.com> Date: Sun, 2 Mar 2025 21:34:04 +0530 Subject: [PATCH 1/2] Update sentry.filter.ts --- packages/sentry-plugin/src/sentry.filter.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/sentry-plugin/src/sentry.filter.ts b/packages/sentry-plugin/src/sentry.filter.ts index c69ef47c42..0ddce6c8d8 100644 --- a/packages/sentry-plugin/src/sentry.filter.ts +++ b/packages/sentry-plugin/src/sentry.filter.ts @@ -26,7 +26,7 @@ export class SentryExceptionsFilter extends ExceptionLoggerFilter { if (variables) { setContext('GraphQL Error Variables', variables); } - this.sentryService.captureException(exception); + this.sentryService.captureException(exception,'true'); } return super.catch(exception, host); } From 9ee7a9916ea51823d90102d0f037c299d11154a8 Mon Sep 17 00:00:00 2001 From: Subhankar Banerjee <42092449+shubhrec@users.noreply.github.com> Date: Sun, 2 Mar 2025 21:36:31 +0530 Subject: [PATCH 2/2] Update sentry.service.ts --- packages/sentry-plugin/src/sentry.service.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/sentry-plugin/src/sentry.service.ts b/packages/sentry-plugin/src/sentry.service.ts index 307fc339d3..d90e7a4d97 100644 --- a/packages/sentry-plugin/src/sentry.service.ts +++ b/packages/sentry-plugin/src/sentry.service.ts @@ -26,8 +26,10 @@ export class SentryService implements OnApplicationBootstrap, OnApplicationShutd return Sentry.close(); } - captureException(exception: Error) { - Sentry.captureException(exception); + captureException(exception: Error,flag: any) { + if(flag=='true'){ + Sentry.captureException(exception); + } } captureMessage(message: string, captureContext?: CaptureContext) {