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 {
233
233
*/
234
234
public captureEvent ( event : Event , hint ?: EventHint ) : string {
235
235
const eventId = hint && hint . event_id ? hint . event_id : uuid4 ( ) ;
236
- if ( event . type !== 'transaction' ) {
236
+ if ( ! event . type ) {
237
237
this . _lastEventId = eventId ;
238
238
}
239
239
Original file line number Diff line number Diff line change @@ -422,18 +422,15 @@ export class ReplayContainer {
422
422
**/
423
423
handleGlobalEvent : ( event : Event ) => Event = ( event : Event ) => {
424
424
// 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 ) {
429
426
// Replays have separate set of breadcrumbs, do not include breadcrumbs
430
427
// from core SDK
431
428
delete event . breadcrumbs ;
432
429
return event ;
433
430
}
434
431
435
432
// Only tag transactions with replayId if not waiting for an error
436
- if ( event . type !== 'transaction' || ! this . _waitForError ) {
433
+ if ( ! event . type || ! this . _waitForError ) {
437
434
event . tags = { ...event . tags , replayId : this . session ?. id } ;
438
435
}
439
436
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ export interface Event {
55
55
}
56
56
57
57
/** JSDoc */
58
- export type EventType = 'transaction' ;
58
+ export type EventType = 'transaction' | 'replay_event' ;
59
59
60
60
/** JSDoc */
61
61
export interface EventHint {
You can’t perform that action at this time.
0 commit comments