Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Nov 13, 2024
1 parent 1d9fd06 commit 64cde82
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/__tests__/extensions/replay/sessionrecording.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1891,6 +1891,7 @@ describe('SessionRecording', () => {
loadScriptMock.mockImplementation((_ph, _path, callback) => {
callback()
})
sessionRecording = new SessionRecording(posthog)

sessionRecording.afterDecideResponse(makeDecideResponse({ sessionRecording: { endpoint: '/s/' } }))
sessionRecording.startIfEnabledOrStop()
Expand Down
4 changes: 3 additions & 1 deletion src/extensions/replay/sessionrecording.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,9 @@ export class SessionRecording {
this.instance.register_for_session({
$session_recording_start_reason: startReason,
})
this._tryAddCustomEvent(startReason, tagPayload)
logger.info(LOGGER_PREFIX + ' ' + startReason.replace('_', ' '), tagPayload)
if (startReason !== 'recording_initialized') {
this._tryAddCustomEvent(startReason, tagPayload)
}
}
}

0 comments on commit 64cde82

Please sign in to comment.