root: make sentry DSN configurable (#4016)
* make sentry DSN configurable Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * make proxy smarter Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> * fix typo in config struct Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org> Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -44,12 +44,11 @@ func doGlobalSetup(outpost api.Outpost, globalConfig *api.Config) {
|
||||
}
|
||||
|
||||
if globalConfig.ErrorReporting.Enabled {
|
||||
dsn := "https://a579bb09306d4f8b8d8847c052d3a1d3@sentry.beryju.org/8"
|
||||
if !initialSetup {
|
||||
l.WithField("env", globalConfig.ErrorReporting.Environment).Debug("Error reporting enabled")
|
||||
}
|
||||
err := sentry.Init(sentry.ClientOptions{
|
||||
Dsn: dsn,
|
||||
Dsn: globalConfig.ErrorReporting.SentryDsn,
|
||||
Environment: globalConfig.ErrorReporting.Environment,
|
||||
TracesSampler: sentryutils.SamplerFunc(float64(globalConfig.ErrorReporting.TracesSampleRate)),
|
||||
Release: fmt.Sprintf("authentik@%s", constants.VERSION),
|
||||
|
||||
@ -19,7 +19,7 @@ func TestSecret() string {
|
||||
|
||||
func MockConfig() api.Config {
|
||||
return *api.NewConfig(
|
||||
*api.NewErrorReportingConfig(false, "test", false, 0.0),
|
||||
*api.NewErrorReportingConfig(false, "https://foo.bar/9", "test", false, 0.0),
|
||||
[]api.CapabilitiesEnum{},
|
||||
100,
|
||||
100,
|
||||
|
||||
Reference in New Issue
Block a user