dev/sg: recover and format panics, add bug report template
Created by: bobheadxi
Analytics hooks now recover from panics when executing an action - this covers most command-running cases. Also adds a similar handler in Before
, where a lot of stuff happens, in case we run into panics there.
The stacktrace is customized to only include dev/sg
components, for user-friendliness.
Part of https://github.com/sourcegraph/sourcegraph/issues/33447, related to https://github.com/sourcegraph/sourcegraph/issues/32562
Test plan
Added panics in various places and checked output + analytics logs
Example: