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

chore: exclude static endpoints from sentry tracing

chore: include user info to sentry tracing again
This commit is contained in:
Ferdinand Mütsch
2021-04-29 21:19:43 +02:00
parent 37d4d58b57
commit 5a8287a06b
3 changed files with 43 additions and 4 deletions

View File

@@ -2,7 +2,6 @@ package main
import (
"embed"
sentryhttp "github.com/getsentry/sentry-go/http"
"io/fs"
"log"
"net/http"
@@ -184,7 +183,7 @@ func main() {
router.Use(middlewares.NewLoggingMiddleware(logbuch.Info, []string{"/assets"}))
router.Use(handlers.RecoveryHandler())
if config.Sentry.Dsn != "" {
router.Use(sentryhttp.New(sentryhttp.Options{Repanic: true}).Handle)
router.Use(middlewares.NewSentryMiddleware())
}
rootRouter.Use(middlewares.NewSecurityMiddleware())