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 @@ -12,10 +12,7 @@ import { isRrwebError } from '../util/isRrwebError';
1212export function handleGlobalEventListener ( replay : ReplayContainer ) : ( event : Event ) => Event | null {
1313 return ( event : Event ) => {
1414 // Do not apply replayId to the root event
15- if (
16- // @ts -ignore new event type
17- event . type === REPLAY_EVENT_NAME
18- ) {
15+ if ( event . type === REPLAY_EVENT_NAME ) {
1916 // Replays have separate set of breadcrumbs, do not include breadcrumbs
2017 // from core SDK
2118 delete event . breadcrumbs ;
@@ -31,7 +28,7 @@ export function handleGlobalEventListener(replay: ReplayContainer): (event: Even
3128
3229 // Only tag transactions with replayId if not waiting for an error
3330 // @ts -ignore private
34- if ( event . type !== 'transaction' || replay . recordingMode === 'session' ) {
31+ if ( ! event . type || replay . recordingMode === 'session' ) {
3532 event . tags = { ...event . tags , replayId : replay . session ?. id } ;
3633 }
3734
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ export interface Event {
6363 * Note that `ErrorEvent`s do not have a type (hence its undefined),
6464 * while all other events are required to have one.
6565 */
66- export type EventType = 'transaction' | 'profile' | undefined ;
66+ export type EventType = 'transaction' | 'profile' | 'replay_event' | undefined ;
6767
6868export interface ErrorEvent extends Event {
6969 type : undefined ;
You can’t perform that action at this time.
0 commit comments