get the right panic trace into sentry
@@ -162,10 +162,8 @@ func recordPanic(err error, r *http.Request, rec *responseRecorder, stack []byte
"response": rec.Body.String()[:snippetLen],
}).Error(fmt.Errorf("RECOVERED PANIC: %v, trace: %s", err, string(stack)))
- sentry.WithScope(func(scope *sentry.Scope) {
- scope.SetLevel(sentry.LevelFatal)
- sentry.CaptureException(err)
- })
+ sentry.CurrentHub().Recover(err)
+
// if hub := sentry.GetHubFromContext(r.Context()); hub != nil {
// hub.WithScope(func(scope *sentry.Scope) {
// scope.SetExtras(extra)
