One problem with stack traces is maybe that they can be too verbose. E.g. if you print them for any warning you print to log (or stdout). Sometimes they will be extremely helpful for debugging some problem, but in many cases, you maybe don't need them (you know why you get the warning and/or you don't care about it).
You could also add more information to the stack trace such as local variables. That can be even more helpful for debugging then, but again adds more verbosity.
For example, we often use this to add information about relevant local variables: https://github.com/albertz/py_better_exchook
One solution to the problem with verbosity is when you have foldable text output. Then the stack trace is folded away (not shown in all details) and you can unfold it to see the details. See the DomTerm demo here: https://github.com/albertz/py_better_exchook#domterm
Some more on text folding:
https://github.com/PerBothner/DomTerm/issues/54
https://gitlab.com/gnachman/iterm2/-/issues/4950
https://github.com/xtermjs/xterm.js/issues/1875
https://gitlab.freedesktop.org/terminal-wg/specifications/-/...