internal: fix sentry sample rate not applying to proxy

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-12-20 19:42:26 +01:00
parent ff8a812823
commit 82acba26af
3 changed files with 5 additions and 3 deletions

View File

@ -41,7 +41,7 @@ func main() {
err := sentry.Init(sentry.ClientOptions{
Dsn: config.G.ErrorReporting.DSN,
AttachStacktrace: true,
TracesSampleRate: 0.6,
TracesSampleRate: config.G.ErrorReporting.SampleRate,
Release: fmt.Sprintf("authentik@%s", constants.VERSION),
Environment: config.G.ErrorReporting.Environment,
})

View File

@ -26,6 +26,7 @@ func DefaultConfig() {
ErrorReporting: ErrorReportingConfig{
Enabled: false,
DSN: "https://a579bb09306d4f8b8d8847c052d3a1d3@sentry.beryju.org/8",
SampleRate: 1,
},
}
}

View File

@ -42,4 +42,5 @@ type ErrorReportingConfig struct {
Environment string `yaml:"environment" env:"AUTHENTIK_ERROR_REPORTING__ENVIRONMENT"`
SendPII bool `yaml:"send_pii" env:"AUTHENTIK_ERROR_REPORTING__SEND_PII"`
DSN string
SampleRate float64 `yaml:"sample_rate" env:"AUTHENTIK_ERROR_REPORTING__SAMPLE_RATE"`
}