While reviewing a recent error report sent via Nagios over Teams, I noticed that the stack trace details that I wanted were truncated. This is due to the current limit set here:
After some digging (see ref links), I learned that the debug.Stack() function wraps runtime.Stack() and automatically grows the slice as needed to capture the entire stack trace. This could be used to capture the entire trace, vs truncating it and potentially losing access to needed details.
While reviewing a recent error report sent via Nagios over Teams, I noticed that the stack trace details that I wanted were truncated. This is due to the current limit set here:
https://github.com/atc0005/go-nagios/blob/8007ac77bae39dcef015975e9d49b74d53aba92c/nagios.go#L144-L148
After some digging (see ref links), I learned that the
debug.Stack()
function wrapsruntime.Stack()
and automatically grows the slice as needed to capture the entire stack trace. This could be used to capture the entire trace, vs truncating it and potentially losing access to needed details.refs: