Skip to content

Commit

Permalink
debug(replay): Remove noisy log that is causing event buffer overflow…
Browse files Browse the repository at this point in the history
… 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.
  • Loading branch information
billyvg authored Oct 23, 2024
1 parent cee2c42 commit 3f1a84b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down
4 changes: 3 additions & 1 deletion packages/replay-internal/src/replay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 3f1a84b

Please sign in to comment.