tracker: better restart logging

This commit is contained in:
nick-delirium 2024-10-25 17:03:41 +02:00
parent 1f2ff3a487
commit 54e2fa6626
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
3 changed files with 4 additions and 3 deletions

View file

@ -1,7 +1,7 @@
{
"name": "@openreplay/tracker",
"description": "The OpenReplay tracker main package",
"version": "14.0.12",
"version": "14.0.13-beta.3",
"keywords": [
"logging",
"replay"

View file

@ -757,9 +757,10 @@ export default class App {
this.stop(false)
} else if (data === 'a_start') {
this.waitStatus(ActivityState.NotActive).then(() => {
this.allowAppStart()
this.start({}, true)
.then((r) => {
this.debug.info('Worker restart, session too long', r)
this.debug.info('Worker restarted, session was too long', r)
})
.catch((e) => {
this.debug.error('Worker restart failed', e)
@ -1749,7 +1750,6 @@ export default class App {
stop(stopWorker = true): void {
if (this.activityState !== ActivityState.NotActive) {
console.trace('stopped')
try {
if (!this.insideIframe && this.options.crossdomain?.enabled) {
this.killChildrenFrames()
@ -1762,6 +1762,7 @@ export default class App {
this.stopCallbacks.forEach((cb) => cb())
this.tagWatcher.clear()
if (this.worker && stopWorker) {
console.log('stop worker')
this.worker.postMessage('stop')
}
this.canvasRecorder?.clear()