(sentry) inspect frame.filename besides frame.abs_path

looks like at the stage of beforeSend filename can contain an url
This commit is contained in:
Valentyne Stigloher 2024-03-19 18:55:43 +01:00
parent 49fffa6d91
commit 8e05e2ffbd

View File

@ -263,7 +263,10 @@ const nuxtConfig: NuxtConfig = {
// filter out exceptions originating from third party
for (const exception of event.exception?.values || []) {
for (const frame of exception.stacktrace?.frames || []) {
if (denyUrls.some((denyUrl) => frame.abs_path?.startsWith(denyUrl))) {
const originatingFromThirdParty = denyUrls.some((denyUrl) => {
return frame.abs_path?.startsWith(denyUrl) || frame.filename?.startsWith(denyUrl);
});
if (originatingFromThirdParty) {
return null;
}
}
@ -273,13 +276,6 @@ const nuxtConfig: NuxtConfig = {
// https://docs.sentry.io/platforms/javascript/data-management/sensitive-data/
delete event.user;
// temporarily add the event data as breadcrumb to show original event information
event.breadcrumbs?.push({
category: 'sentry.troubleshoot',
level: 'debug',
message: JSON.stringify(event),
});
return event;
},
beforeSendTransaction(event) {