From 3f1a84b8760a398acfd0d4b05d8f1f0aa5a3a528 Mon Sep 17 00:00:00 2001 From: Billy Vong Date: Thu, 24 Oct 2024 01:05:08 +0200 Subject: [PATCH] debug(replay): Remove noisy log that is causing event buffer overflow as well (#14069) Removes a log statement that is output when buffer is already full (which will keep overflowing the buffer). Also noticed a log statement in `stop()` that would trigger when we stop due to event buffer being full, which would compoound the issue. This last fix should be pulled into the SDK. --- .../src/eventBuffer/EventBufferCompressionWorker.ts | 6 ------ packages/replay-internal/src/replay.ts | 4 +++- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/packages/replay-internal/src/eventBuffer/EventBufferCompressionWorker.ts b/packages/replay-internal/src/eventBuffer/EventBufferCompressionWorker.ts index 246467180cdc..007858d65d45 100644 --- a/packages/replay-internal/src/eventBuffer/EventBufferCompressionWorker.ts +++ b/packages/replay-internal/src/eventBuffer/EventBufferCompressionWorker.ts @@ -67,12 +67,6 @@ export class EventBufferCompressionWorker implements EventBuffer { this._totalSize += data.length; if (this._totalSize > REPLAY_MAX_EVENT_BUFFER_SIZE) { - DEBUG_BUILD && - logger.info( - `Cannot add new event with raw size of ${data.length} to existing buffer of size ${ - this._totalSize - data.length - }`, - ); return Promise.reject(new EventBufferSizeExceededError()); } diff --git a/packages/replay-internal/src/replay.ts b/packages/replay-internal/src/replay.ts index bd469a965e46..26fd57cbf54e 100644 --- a/packages/replay-internal/src/replay.ts +++ b/packages/replay-internal/src/replay.ts @@ -452,7 +452,9 @@ export class ReplayContainer implements ReplayContainerInterface { this._isEnabled = false; try { - DEBUG_BUILD && logger.info(`Stopping Replay${reason ? ` triggered by ${reason}` : ''}`); + DEBUG_BUILD && + reason !== 'addEventSizeExceeded' && + logger.info(`Stopping Replay${reason ? ` triggered by ${reason}` : ''}`); resetReplayIdOnDynamicSamplingContext();