feat: sentry integration (#1944)

* initial sentry variables and secrets

* feat: sentry monitoring

* fix typo

* feat(sentry version): sentry capability

* fix(sentry include): included sentry import 4 zitadel

* usage flag for sentry

* improve sentry flag

* merge main

* fix sentry config

* add sentry dsn to secret env vars

* fix test

* log sentry start

* add sentry grpc interceptor and recover

* add sentry http interceptor to asset api

* fix interceptor order

* try improve sentry recover

* fix i18n interception

* panic

Co-authored-by: Livio Amstutz <livio.a@gmail.com>
This commit is contained in:
Christian Jakob
2021-07-05 10:58:58 +02:00
committed by GitHub
parent beb1c1604a
commit b024cda4e5
16 changed files with 218 additions and 11 deletions

View File

@@ -8,6 +8,7 @@ import (
"strings"
"github.com/caos/logging"
sentryhttp "github.com/getsentry/sentry-go/http"
"github.com/gorilla/mux"
"github.com/caos/zitadel/internal/api/authz"
@@ -84,6 +85,7 @@ func NewHandler(
verifier.RegisterServer("Management-API", "assets", AssetsService_AuthMethods) //TODO: separate api?
router := mux.NewRouter()
router.Use(sentryhttp.New(sentryhttp.Options{}).Handle)
RegisterRoutes(router, h)
router.PathPrefix("/{id}").Methods("GET").HandlerFunc(DownloadHandleFunc(h, h.GetFile()))
return router