diff options
author | Jaime Martinez <jmartinez@gitlab.com> | 2021-12-07 01:51:02 +0300 |
---|---|---|
committer | Jaime Martinez <jmartinez@gitlab.com> | 2021-12-07 01:53:05 +0300 |
commit | 86d8aac645d1a6ccb24ab57c87e4aacf535bec7b (patch) | |
tree | 5e9df26a5baac333c18d74835da0fb87a3145eb6 /app.go | |
parent | d228c13c76d11091f8514e40940dc7df1b633e5a (diff) |
chore: upgrade to labkit 1.11.0
And report stack trace with error tracking to Sentry.
Changelog: other
Diffstat (limited to 'app.go')
-rw-r--r-- | app.go | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -132,7 +132,7 @@ func (a *theApp) tryAuxiliaryHandlers(w http.ResponseWriter, r *http.Request, ht if _, err := domain.GetLookupPath(r); err != nil { if errors.Is(err, gitlab.ErrDiskDisabled) { - errortracking.Capture(err) + errortracking.Capture(err, errortracking.WithStackTrace()) httperrors.Serve500(w) return true } @@ -517,7 +517,7 @@ func handlePanicMiddleware(handler http.Handler) http.Handler { err := fmt.Errorf("panic trace: %v", i) metrics.PanicRecoveredCount.Inc() logging.LogRequest(r).WithError(err).Error("recovered from panic") - errortracking.Capture(err, errortracking.WithRequest(r), errortracking.WithContext(r.Context())) + errortracking.Capture(err, errortracking.WithRequest(r), errortracking.WithContext(r.Context()), errortracking.WithStackTrace()) httperrors.Serve500(w) } }() |