The standard library “Go” way here fails when you’re returning errors that no longer have any obvious context. This generally happens when errors cross package boundaries or propagate unhandled beyond where they have meaning except to signal failure.
There’s a slight performance hit in generating call stacks. I think it’s best to generate stack traces as soon as you have an error that you can’t handle, and isn’t defined as part of the interface your caller expects. That’s where you’d use Dave Cheney’s errors package to create your error values.