gue icon indicating copy to clipboard operation
gue copied to clipboard

stacktrace truncate

Open ccakes opened this issue 3 years ago • 1 comments

https://github.com/vgarvardt/gue/blob/c9efae2dabc919bd44cb1eadce095b49aeec7b7a/worker.go#L284-L291

Maybe a silly question - but why truncate the stacktrace?

Aside from writing bug-free code :rofl: is there a better way to extract errors than relying on the built in last_error field? This often removes the useful bit when there's tracing and other things wrapping the job.

ccakes avatar Aug 11 '22 01:08 ccakes

Stacktrace info lands also to the tracing span and logger context - https://github.com/vgarvardt/gue/blob/c9efae2dabc919bd44cb1eadce095b49aeec7b7a/worker.go#L298-L299 - use WithWorkerLogger or WithPoolLogger to set the logger instance https://github.com/vgarvardt/gue#logging

Regarding the buffer size - the only reason is to make the code a bit safer. I did not see any cases when 1024 is not enough, but if it is your case - maybe the option to set custom value could be the solution.

vgarvardt avatar Aug 11 '22 12:08 vgarvardt

As of https://github.com/vgarvardt/gue/pull/135 panic buffer size is configurable

vgarvardt avatar Nov 17 '22 21:11 vgarvardt