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

View File

@@ -8,6 +8,7 @@ import (
"github.com/caos/zitadel/internal/telemetry/metrics"
"github.com/caos/zitadel/internal/telemetry/metrics/otel"
view_model "github.com/caos/zitadel/internal/view/model"
sentryhttp "github.com/getsentry/sentry-go/http"
"go.opentelemetry.io/otel/api/metric"
"net/http"
@@ -78,7 +79,8 @@ func (a *API) RegisterServer(ctx context.Context, server server.Server) {
}
func (a *API) RegisterHandler(prefix string, handler http.Handler) {
a.gatewayHandler.RegisterHandler(prefix, handler)
sentryHandler := sentryhttp.New(sentryhttp.Options{})
a.gatewayHandler.RegisterHandler(prefix, sentryHandler.Handle(handler))
}
func (a *API) Start(ctx context.Context) {