[Session] Include stack with the debug event (#4763)
parent
9b9e09d002
commit
fa64d9393b
|
@ -76,7 +76,12 @@ export function addSessionErrorLog(did: string, event: AtpSessionEvent) {
|
||||||
if (!Statsig.initializeCalled() || !Statsig.getStableID()) {
|
if (!Statsig.initializeCalled() || !Statsig.getStableID()) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
Statsig.logEvent('session:error', null, {did, event})
|
const stack = (new Error().stack ?? '').slice(0, MAX_SLICE_LENGTH)
|
||||||
|
Statsig.logEvent('session:error', null, {
|
||||||
|
did,
|
||||||
|
event,
|
||||||
|
stack,
|
||||||
|
})
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error(e)
|
console.error(e)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue