mirror of
https://github.com/turnstonelabs/turnstone.git
synced 2026-08-12 23:12:23 -06:00
fix(streaming): correlate the fatal trace line with its recorded event
The DEBUG trace for a fatal turn now carries ws and error_type, mirroring the ERROR-level session.fatal.recorded line — without them a stack trace under concurrent sessions correlates to its fatal event by timestamp guesswork only. Frames-only rendering is unchanged (the sanitize floor: no exception message text in the journal).
This commit is contained in:
@@ -5304,10 +5304,14 @@ class ChatSession:
|
||||
# Frames only — ``exc_info=True`` would render the raw exception
|
||||
# message, which can carry credentials verbatim (the sanitize floor
|
||||
# the lines above exist to hold); format_tb renders the stack
|
||||
# without the message.
|
||||
# without the message. ws + error_type mirror the ERROR line so a
|
||||
# trace correlates to its session.fatal.recorded event under
|
||||
# concurrent sessions.
|
||||
if exc.__traceback__ is not None:
|
||||
log.debug(
|
||||
"session.fatal.recorded.trace",
|
||||
ws=self._ws_id,
|
||||
error_type=type(exc).__name__,
|
||||
trace="".join(traceback.format_tb(exc.__traceback__)),
|
||||
)
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user