From c3c592a105f88aee819c8e0ef8de9bfaffe6f890 Mon Sep 17 00:00:00 2001 From: Subhankar Banerjee <42092449+shubhrec@users.noreply.github.com> Date: Sun, 2 Mar 2025 22:08:20 +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 99ad4ac954baf2e11f0673f988e799ee1bf3fb43 Mon Sep 17 00:00:00 2001 From: Subhankar Banerjee <42092449+shubhrec@users.noreply.github.com> Date: Sun, 2 Mar 2025 22:11:12 +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) {