From f85d36925f09bd7013e41920eefc242a62ea2b5a Mon Sep 17 00:00:00 2001 From: Andrei Borza Date: Tue, 14 May 2024 17:22:51 +0200 Subject: [PATCH] feat(scope): Only set `lastEventId` for error events --- packages/core/src/baseclient.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/core/src/baseclient.ts b/packages/core/src/baseclient.ts index 830346fca855..096b288c8a21 100644 --- a/packages/core/src/baseclient.ts +++ b/packages/core/src/baseclient.ts @@ -650,9 +650,8 @@ export abstract class BaseClient implements Client { this.emit('preprocessEvent', event, hint); - const eventId = event.event_id || hint.event_id; - if (eventId) { - isolationScope.setLastEventId(eventId); + if (!event.type) { + isolationScope.setLastEventId(event.event_id || hint.event_id); } return prepareEvent(options, event, hint, currentScope, this, isolationScope).then(evt => {