Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0acd857ab5 |
@@ -17,8 +17,8 @@ var sentryInit = sentry.Init
|
||||
|
||||
func SetupSentry(logger log.Interface, releaseName string, args SentryConfig) error {
|
||||
if args.Disabled {
|
||||
logger.Info("Sentry disabled, skipping setup")
|
||||
return nil
|
||||
logger.Info("Sentry disabled, setup using empty options")
|
||||
return sentryInit(sentry.ClientOptions{})
|
||||
}
|
||||
if args.Environment == "" {
|
||||
return fmt.Errorf("no Sentry environment supplied, exiting")
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ func TestSetupSentry(t *testing.T) {
|
||||
},
|
||||
init: nil,
|
||||
wantErr: assert.NoError,
|
||||
wantLogged: []string{"info: Sentry disabled, skipping setup"},
|
||||
wantLogged: []string{"info: Sentry disabled, setup using empty options"},
|
||||
},
|
||||
{
|
||||
name: "no environment",
|
||||
|
||||
Reference in New Issue
Block a user