fix: add sentry in ui, http and projection handlers (#1977)

* fix: add sentry in ui, http and projection handlers

* fix test
This commit is contained in:
Livio Amstutz
2021-07-06 13:36:35 +02:00
committed by GitHub
parent 9277928ef7
commit 0e472a347f
78 changed files with 339 additions and 11 deletions
+4 -1
View File
@@ -4,6 +4,8 @@ import (
"context"
"net/http"
sentryhttp "github.com/getsentry/sentry-go/http"
http_util "github.com/caos/zitadel/internal/api/http"
"github.com/caos/zitadel/internal/ui/console"
"github.com/caos/zitadel/internal/ui/login"
@@ -32,7 +34,8 @@ func Create(config Config) *UI {
}
func (u *UI) RegisterHandler(prefix string, handler http.Handler) {
http_util.RegisterHandler(u.mux, prefix, handler)
sentryHandler := sentryhttp.New(sentryhttp.Options{})
http_util.RegisterHandler(u.mux, prefix, sentryHandler.Handle(handler))
}
func (u *UI) Start(ctx context.Context) {