From 7e2cadcc9b280ef1097cf168813bfca686a7326b Mon Sep 17 00:00:00 2001 From: Baptiste Grob <60621355+baptiste-grob@users.noreply.github.com> Date: Thu, 5 Nov 2020 16:58:54 +0100 Subject: [PATCH] fix: reduce amount of information sent to bugsnag --- app/assets/javascripts/services/errorReporting.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/services/errorReporting.ts b/app/assets/javascripts/services/errorReporting.ts index 7aeb87810..57eddf3ed 100644 --- a/app/assets/javascripts/services/errorReporting.ts +++ b/app/assets/javascripts/services/errorReporting.ts @@ -6,7 +6,7 @@ import Bugsnag from '@bugsnag/js'; declare const __VERSION__: string; function redactFilePath(line: string): string { - const fileName = line.match(/\w+\.(html|js)?.*/)?.[0]; + const fileName = line.match(/\w+\.(html|js)/)?.[0]; const redacted = ''; if (fileName) { return redacted + '/' + fileName; @@ -28,6 +28,7 @@ export function startErrorReporting() { collectUserIp: false, autoTrackSessions: false, releaseStage: isDev ? 'development' : undefined, + enabledBreadcrumbTypes: ['error', 'log'], onError(event) { /** * Redact any data that could be used to identify user,