Trace could be a payload with global variables errorCode, errorInfo and the new TCL 8.6 command info errorstack.
For example:
17:24:36 <Dereckson> .tcl putdebug $errorInfo
17:24:36 <Wearg> [DEBUG] can not find channel named "sock8018e0910"
17:24:36 <Wearg>     while executing
17:24:36 <Wearg> "eof $sock"
17:24:36 <Wearg> Tcl:
17:24:39 <Dereckson> .tcl putdebug $errorCode
17:24:39 <Wearg> [DEBUG] TCL LOOKUP CHANNEL sock8018e0910
17:24:39 <Wearg> Tcl:
17:25:04 <Dereckson> .tcl info errorstack
17:25:04 <Wearg> Tcl: INNER {invokeStk1 eof sock8018e0910} CALL {http::Event sock8018e0910 ::http::5}A payload could be generated from those three values:
errorCode: TCL LOOKUP CHANNEL sock8018e0910 errorInfo: | can not find channel named "sock8018e0910" while executing "eof $sock" errorstack: | INNER {invokeStk1 eof sock8018e0910} CALL {http::Event sock8018e0910 ::http::5}
We can watch $errorInfo to trigger a method to report the trace:
trace add variable ::errorInfo write { # Generate payload # Log it or send it to Sentry }
Documentation for that is located at https://wiki.tcl-lang.org/page/Traces