File tree Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Expand file tree Collapse file tree 3 files changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -233,7 +233,7 @@ export class Hub implements HubInterface {
233233 */
234234 public captureEvent ( event : Event , hint ?: EventHint ) : string {
235235 const eventId = hint && hint . event_id ? hint . event_id : uuid4 ( ) ;
236- if ( event . type !== 'transaction' ) {
236+ if ( ! event . type ) {
237237 this . _lastEventId = eventId ;
238238 }
239239
Original file line number Diff line number Diff line change @@ -422,18 +422,15 @@ export class ReplayContainer {
422422 **/
423423 handleGlobalEvent : ( event : Event ) => Event = ( event : Event ) => {
424424 // Do not apply replayId to the root event
425- if (
426- // @ts -ignore new event type
427- event . type === REPLAY_EVENT_NAME
428- ) {
425+ if ( event . type === REPLAY_EVENT_NAME ) {
429426 // Replays have separate set of breadcrumbs, do not include breadcrumbs
430427 // from core SDK
431428 delete event . breadcrumbs ;
432429 return event ;
433430 }
434431
435432 // Only tag transactions with replayId if not waiting for an error
436- if ( event . type !== 'transaction' || ! this . _waitForError ) {
433+ if ( ! event . type || ! this . _waitForError ) {
437434 event . tags = { ...event . tags , replayId : this . session ?. id } ;
438435 }
439436
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ export interface Event {
5555}
5656
5757/** JSDoc */
58- export type EventType = 'transaction' ;
58+ export type EventType = 'transaction' | 'replay_event' ;
5959
6060/** JSDoc */
6161export interface EventHint {
You can’t perform that action at this time.
0 commit comments