From 1cc42c1c1e5b5e0c034236484e3a50c51c1411f8 Mon Sep 17 00:00:00 2001 From: Aymeric Date: Wed, 2 Mar 2022 09:44:44 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20Clear=20remaining=20code=20of=20?= =?UTF-8?q?network=20error=20removal=20(#1367)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🔥 Remove error resource mapping --- .../error/errorCollection.spec.ts | 15 ++------------- .../rumEventsCollection/error/errorCollection.ts | 7 ------- packages/rum-core/src/rawRumEvent.types.ts | 5 ----- 3 files changed, 2 insertions(+), 25 deletions(-) diff --git a/packages/rum-core/src/domain/rumEventsCollection/error/errorCollection.spec.ts b/packages/rum-core/src/domain/rumEventsCollection/error/errorCollection.spec.ts index d1410dc07a..d4133de802 100644 --- a/packages/rum-core/src/domain/rumEventsCollection/error/errorCollection.spec.ts +++ b/packages/rum-core/src/domain/rumEventsCollection/error/errorCollection.spec.ts @@ -43,7 +43,6 @@ describe('error collection', () => { error: { id: jasmine.any(String), message: 'foo', - resource: undefined, source: ErrorSource.CUSTOM, stack: jasmine.stringMatching('Error: foo'), handling_stack: 'Error: handling foo', @@ -125,12 +124,7 @@ describe('error collection', () => { lifeCycle.notify(LifeCycleEventType.RAW_ERROR_COLLECTED, { error: { message: 'hello', - resource: { - method: 'GET', - statusCode: 500, - url: 'url', - }, - source: ErrorSource.NETWORK, + source: ErrorSource.CUSTOM, stack: 'bar', startClocks: { relative: 1234 as RelativeTime, timeStamp: 123456789 as TimeStamp }, type: 'foo', @@ -144,12 +138,7 @@ describe('error collection', () => { error: { id: jasmine.any(String), message: 'hello', - resource: { - method: 'GET', - status_code: 500, - url: 'url', - }, - source: ErrorSource.NETWORK, + source: ErrorSource.CUSTOM, stack: 'bar', handling_stack: undefined, type: 'foo', diff --git a/packages/rum-core/src/domain/rumEventsCollection/error/errorCollection.ts b/packages/rum-core/src/domain/rumEventsCollection/error/errorCollection.ts index 64431ba8de..161818200e 100644 --- a/packages/rum-core/src/domain/rumEventsCollection/error/errorCollection.ts +++ b/packages/rum-core/src/domain/rumEventsCollection/error/errorCollection.ts @@ -85,13 +85,6 @@ function processError( error: { id: generateUUID(), message: error.message, - resource: error.resource - ? { - method: error.resource.method, - status_code: error.resource.statusCode, - url: error.resource.url, - } - : undefined, source: error.source, stack: error.stack, handling_stack: error.handlingStack, diff --git a/packages/rum-core/src/rawRumEvent.types.ts b/packages/rum-core/src/rawRumEvent.types.ts index 568b28a9e8..da4d0dfb27 100644 --- a/packages/rum-core/src/rawRumEvent.types.ts +++ b/packages/rum-core/src/rawRumEvent.types.ts @@ -50,11 +50,6 @@ export interface RawRumErrorEvent { date: TimeStamp type: RumEventType.ERROR error: { - resource?: { - url: string - status_code: number - method: string - } id: string type?: string stack?: string