From 0fdce7e6a3cba5fa766e54f24baeaf7e395b6eb8 Mon Sep 17 00:00:00 2001 From: Amine Ben hammou Date: Tue, 23 Feb 2021 16:03:48 +0100 Subject: [PATCH] beforeSend can now return a boolean --- packages/logs/src/boot/logs.ts | 2 +- packages/rum-core/src/boot/rumPublicApi.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/logs/src/boot/logs.ts b/packages/logs/src/boot/logs.ts index 31de4461a2..7c17d9e15f 100644 --- a/packages/logs/src/boot/logs.ts +++ b/packages/logs/src/boot/logs.ts @@ -22,7 +22,7 @@ import { buildEnv } from './buildEnv' export interface LogsUserConfiguration extends UserConfiguration { forwardErrorsToLogs?: boolean - beforeSend?: (event: LogsEvent) => void + beforeSend?: (event: LogsEvent) => void | boolean } const FIELDS_WITH_SENSITIVE_DATA = ['view.url', 'view.referrer', 'message', 'error.stack', 'http.url'] diff --git a/packages/rum-core/src/boot/rumPublicApi.ts b/packages/rum-core/src/boot/rumPublicApi.ts index ab8a23995a..ab6f24be93 100644 --- a/packages/rum-core/src/boot/rumPublicApi.ts +++ b/packages/rum-core/src/boot/rumPublicApi.ts @@ -20,7 +20,7 @@ import { startRum } from './rum' export interface RumUserConfiguration extends UserConfiguration { applicationId: string - beforeSend?: (event: RumEvent) => void + beforeSend?: (event: RumEvent) => void | boolean } export type RumPublicApi = ReturnType