Compare commits

...
Author SHA1 Message Date
Sonarly Claude CodeandClaude Opus 4.6 aad3d98338 Filter Node.js deprecation warnings from Sentry breadcrumbs
Node.js v24 emits DEP0169 (url.parse()) and DEP0040 (punycode) deprecation
warnings from dependencies like Express 4 and URL-processing libraries.
These warnings are captured by Sentry as error-level console breadcrumbs,
creating noise in performance transaction monitoring. Filter them out using
beforeBreadcrumb to keep Sentry data clean.

Co-Authored-By: Claude Opus 4.6 <[email protected]>
2026-02-19 06:23:36 +00:00
+10
View File
@@ -41,6 +41,16 @@ if (process.env.EXCEPTION_HANDLER_DRIVER === ExceptionHandlerDriver.SENTRY) {
}),
nodeProfilingIntegration(),
],
beforeBreadcrumb(breadcrumb) {
if (
breadcrumb.category === 'console' &&
breadcrumb.message?.includes('DeprecationWarning')
) {
return null;
}
return breadcrumb;
},
tracesSampleRate: 0.1,
profilesSampleRate: 0.3,
sendDefaultPii: true,