1 Commits

2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -17,8 +17,8 @@ var sentryInit = sentry.Init
func SetupSentry(logger log.Interface, releaseName string, args SentryConfig) error { func SetupSentry(logger log.Interface, releaseName string, args SentryConfig) error {
if args.Disabled { if args.Disabled {
logger.Info("Sentry disabled, skipping setup") logger.Info("Sentry disabled, setup using empty options")
return nil return sentryInit(sentry.ClientOptions{})
} }
if args.Environment == "" { if args.Environment == "" {
return fmt.Errorf("no Sentry environment supplied, exiting") return fmt.Errorf("no Sentry environment supplied, exiting")
+1 -1
View File
@@ -34,7 +34,7 @@ func TestSetupSentry(t *testing.T) {
}, },
init: nil, init: nil,
wantErr: assert.NoError, wantErr: assert.NoError,
wantLogged: []string{"info: Sentry disabled, skipping setup"}, wantLogged: []string{"info: Sentry disabled, setup using empty options"},
}, },
{ {
name: "no environment", name: "no environment",