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:
14
middlewares/sentry.go
Normal file
14
middlewares/sentry.go
Normal 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)
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user