mirror of
https://github.com/koala73/worldmonitor.git
synced 2026-04-25 17:14:57 +02:00
fix(sentry): filter Greasemonkey/Tampermonkey x-plugin-script noise (#2209)
Two Sentry issues (7360458445, 7360459898) from Chrome WebView on Android traced to Greasemonkey/Tampermonkey userscript errors injected via x-plugin-script URLs. Both resolved in Sentry as noise. - ignoreErrors: add /^"use strict" is not a function$/ (gm_idle pattern) - beforeSend: suppress any event where all frames originate from /x-plugin-script/ paths (covers gm_idle and gm_start script variants)
This commit is contained in:
@@ -251,6 +251,7 @@ Sentry.init({
|
||||
/^(?:Error: )?uncaught exception: undefined$/,
|
||||
/Can't find variable: ss_bootstrap_config/,
|
||||
/undefined is not an object \(evaluating '[a-z]\.includes'\)/,
|
||||
/^"use strict" is not a function$/,
|
||||
],
|
||||
beforeSend(event) {
|
||||
const msg = event.exception?.values?.[0]?.value ?? '';
|
||||
@@ -296,6 +297,8 @@ Sentry.init({
|
||||
if (frames.length > 0 && frames.every(f => /^blob:/.test(f.filename ?? ''))) return null;
|
||||
// Suppress errors originating from UV proxy (Ultraviolet service worker)
|
||||
if (frames.some(f => /\/uv\/service\//.test(f.filename ?? '') || /uv\.handler/.test(f.filename ?? ''))) return null;
|
||||
// Suppress Greasemonkey/Tampermonkey userscript errors (x-plugin-script)
|
||||
if (frames.length > 0 && frames.every(f => !f.filename || /\/x-plugin-script\//.test(f.filename))) return null;
|
||||
// Suppress YouTube IFrame widget API internal errors
|
||||
if (frames.some(f => /www-widgetapi\.js/.test(f.filename ?? ''))) return null;
|
||||
// Suppress Sentry beacon XHR transport errors (readyState on aborted XHR — not our code)
|
||||
|
||||
Reference in New Issue
Block a user