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 @@ -10,10 +10,7 @@ import { addInternalBreadcrumb } from '../util/addInternalBreadcrumb';
1010export function handleGlobalEventListener ( replay : ReplayContainer ) : ( event : Event ) => Event {
1111 return ( event : Event ) => {
1212 // 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 ) {
1714 // Replays have separate set of breadcrumbs, do not include breadcrumbs
1815 // from core SDK
1916 delete event . breadcrumbs ;
@@ -22,7 +19,7 @@ export function handleGlobalEventListener(replay: ReplayContainer): (event: Even
2219
2320 // Only tag transactions with replayId if not waiting for an error
2421 // @ts -ignore private
25- if ( event . type !== 'transaction' || ! replay . _waitForError ) {
22+ if ( ! event . type || ! replay . _waitForError ) {
2623 event . tags = { ...event . tags , replayId : replay . session ?. id } ;
2724 }
2825
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