Merge branch 'session-error-stack' into session-stress

This commit is contained in:
Dan Abramov
2024-07-10 00:29:12 +01:00
+6 -1
View File
@@ -76,7 +76,12 @@ export function addSessionErrorLog(did: string, event: AtpSessionEvent) {
if (!Statsig.initializeCalled() || !Statsig.getStableID()) {
return
}
Statsig.logEvent('session:error', null, {did, event})
const stack = (new Error().stack ?? '').slice(0, 1800)
Statsig.logEvent('session:error', null, {
did,
event,
stack,
})
} catch (e) {
console.error(e)
}