Skip to content

Commit

Permalink
[Session] Include stack with the debug event (bluesky-social#4763)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaearon authored Jul 9, 2024
1 parent 9b9e09d commit fa64d93
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/state/session/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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, MAX_SLICE_LENGTH)
Statsig.logEvent('session:error', null, {
did,
event,
stack,
})
} catch (e) {
console.error(e)
}
Expand Down

0 comments on commit fa64d93

Please sign in to comment.