1
0
mirror of https://github.com/muety/wakapi.git synced 2023-08-10 21:12:56 +03:00

feat: sentry integration (resolve #142)

This commit is contained in:
Ferdinand Mütsch
2021-03-23 22:12:15 +01:00
parent f73285160d
commit 9fc3c65efe
8 changed files with 156 additions and 7 deletions

14
middlewares/sentry.go Normal file
View File

@@ -0,0 +1,14 @@
package middlewares
import (
sentryhttp "github.com/getsentry/sentry-go/http"
"net/http"
)
func NewSentryMiddleware() func(http.Handler) http.Handler {
return func(h http.Handler) http.Handler {
return sentryhttp.New(sentryhttp.Options{
Repanic: true,
}).Handle(h)
}
}