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 @@ -10,10 +10,7 @@ import { addInternalBreadcrumb } from '../util/addInternalBreadcrumb';
10
10
export function handleGlobalEventListener ( replay : ReplayContainer ) : ( event : Event ) => Event {
11
11
return ( event : Event ) => {
12
12
// Do not apply replayId to the root event
13
- if (
14
- // @ts -ignore new event type
15
- event . type === REPLAY_EVENT_NAME
16
- ) {
13
+ if ( event . type === REPLAY_EVENT_NAME ) {
17
14
// Replays have separate set of breadcrumbs, do not include breadcrumbs
18
15
// from core SDK
19
16
delete event . breadcrumbs ;
@@ -22,7 +19,7 @@ export function handleGlobalEventListener(replay: ReplayContainer): (event: Even
22
19
23
20
// Only tag transactions with replayId if not waiting for an error
24
21
// @ts -ignore private
25
- if ( event . type !== 'transaction' || ! replay . _waitForError ) {
22
+ if ( ! event . type || ! replay . _waitForError ) {
26
23
event . tags = { ...event . tags , replayId : replay . session ?. id } ;
27
24
}
28
25
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