diff --git a/packages/core/src/integrations/inboundfilters.ts b/packages/core/src/integrations/inboundfilters.ts index 833169e33bd2..9c64476568c7 100644 --- a/packages/core/src/integrations/inboundfilters.ts +++ b/packages/core/src/integrations/inboundfilters.ts @@ -10,6 +10,7 @@ const DEFAULT_IGNORE_ERRORS = [ /^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/, /^ResizeObserver loop completed with undelivered notifications.$/, + /^Cannot redefine property: googletag$/, ]; /** Options for the InboundFilters integration */ diff --git a/packages/core/test/lib/integrations/inboundfilters.test.ts b/packages/core/test/lib/integrations/inboundfilters.test.ts index 72d553ce3dc2..e4c46d18094f 100644 --- a/packages/core/test/lib/integrations/inboundfilters.test.ts +++ b/packages/core/test/lib/integrations/inboundfilters.test.ts @@ -198,6 +198,17 @@ const RESIZEOBSERVER_EVENT: Event = { }, }; +const GOOGLETAG_EVENT: Event = { + exception: { + values: [ + { + type: 'TypeError', + value: 'Cannot redefine property: googletag', + }, + ], + }, +}; + const MALFORMED_EVENT: Event = { exception: { values: [ @@ -299,16 +310,21 @@ describe('InboundFilters', () => { expect(eventProcessor(EXCEPTION_EVENT, {})).toBe(null); }); - it('uses default filters', () => { + it('uses default filters (script error)', () => { const eventProcessor = createInboundFiltersEventProcessor(); expect(eventProcessor(SCRIPT_ERROR_EVENT, {})).toBe(null); }); - it('uses default filters ResizeObserver', () => { + it('uses default filters (ResizeObserver)', () => { const eventProcessor = createInboundFiltersEventProcessor(); expect(eventProcessor(RESIZEOBSERVER_EVENT, {})).toBe(null); }); + it('uses default filters (googletag)', () => { + const eventProcessor = createInboundFiltersEventProcessor(); + expect(eventProcessor(GOOGLETAG_EVENT, {})).toBe(null); + }); + it('filters on last exception when multiple present', () => { const eventProcessor = createInboundFiltersEventProcessor({ ignoreErrors: ['incorrect type given for parameter `chewToy`'],