internal: skip tracing for go healthcheck and metrics endpoints

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer
2022-06-10 22:19:48 +02:00
parent 85784f796c
commit 59b899ddff
10 changed files with 55 additions and 10 deletions

View File

@ -11,6 +11,7 @@ import (
log "github.com/sirupsen/logrus"
"goauthentik.io/api/v3"
"goauthentik.io/internal/constants"
sentryutils "goauthentik.io/internal/utils/sentry"
)
var initialSetup = false
@ -47,10 +48,10 @@ func doGlobalSetup(outpost api.Outpost, globalConfig *api.Config) {
l.WithField("env", globalConfig.ErrorReporting.Environment).Debug("Error reporting enabled")
}
err := sentry.Init(sentry.ClientOptions{
Dsn: dsn,
Environment: globalConfig.ErrorReporting.Environment,
TracesSampleRate: float64(globalConfig.ErrorReporting.TracesSampleRate),
Release: fmt.Sprintf("authentik@%s", constants.VERSION),
Dsn: dsn,
Environment: globalConfig.ErrorReporting.Environment,
TracesSampler: sentryutils.SamplerFunc(float64(globalConfig.ErrorReporting.TracesSampleRate)),
Release: fmt.Sprintf("authentik@%s", constants.VERSION),
IgnoreErrors: []string{
http.ErrAbortHandler.Error(),
},