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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
db9636bd9e
commit
aad3d98338
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user