Skip to content

Commit ee3c78d

Browse files
authored
Merge pull request #1118 from zhx828/upgrade-mut-mapper
Sentry updates
2 parents ba2bc40 + 34bfd74 commit ee3c78d

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/main/webapp/app/index.tsx

+20
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ if (AppConfig.serverConfig?.sentryProjectId) {
125125
ignoreErrors: [
126126
// the following errors are for this project only
127127
'ResizeObserver loop limit exceeded',
128+
'ResizeObserver loop completed',
128129
'Request has been terminated',
129130
'Failed to fetch all transcripts',
130131
'Non-Error promise rejection captured',
@@ -176,6 +177,25 @@ if (AppConfig.serverConfig?.sentryProjectId) {
176177
/webappstoolbarba\.texthelp\.com\//i,
177178
/metrics\.itunes\.apple\.com\.edgesuite\.net\//i,
178179
],
180+
181+
// Called for message and error events
182+
beforeSend(event) {
183+
// identify deprecated API that used for mutation mapper. Do not report such event.
184+
// we need to upgrade mutation mapper but it's limited by our node version
185+
const hasInvalidUrl =
186+
(
187+
event.breadcrumbs?.filter(breadcrumb => {
188+
const url = breadcrumb.data?.url || '';
189+
return url.includes('getMutationAligner.json');
190+
}) || []
191+
).length > 0;
192+
193+
if (hasInvalidUrl) {
194+
return null;
195+
} else {
196+
return event;
197+
}
198+
},
179199
});
180200
}
181201

0 commit comments

Comments
 (0)