diff --git a/internal/command/server/admin/run.go b/internal/command/server/admin/run.go index e45b25a..a573ce8 100644 --- a/internal/command/server/admin/run.go +++ b/internal/command/server/admin/run.go @@ -35,12 +35,15 @@ func RunCommand() *cli.Command { logger.SetLevel(logger.Level(conf.Logger.Level)) projectVersion := ctx.String("projectVersion") - flushSentry, err := setup.SetupSentry(ctx.Context, conf.Admin.Sentry, projectVersion) - if err != nil { - return errors.Wrap(err, "could not initialize sentry client") - } - defer flushSentry() + if conf.Proxy.Sentry.DSN != "" { + flushSentry, err := setup.SetupSentry(ctx.Context, conf.Proxy.Sentry, projectVersion) + if err != nil { + return errors.Wrap(err, "could not initialize sentry client") + } + + defer flushSentry() + } integrations, err := setup.SetupIntegrations(ctx.Context, conf) if err != nil { diff --git a/internal/command/server/proxy/run.go b/internal/command/server/proxy/run.go index ae0a876..37bde57 100644 --- a/internal/command/server/proxy/run.go +++ b/internal/command/server/proxy/run.go @@ -30,12 +30,15 @@ func RunCommand() *cli.Command { logger.SetLevel(logger.Level(conf.Logger.Level)) projectVersion := ctx.String("projectVersion") - flushSentry, err := setup.SetupSentry(ctx.Context, conf.Proxy.Sentry, projectVersion) - if err != nil { - return errors.Wrap(err, "could not initialize sentry client") - } - defer flushSentry() + if conf.Proxy.Sentry.DSN != "" { + flushSentry, err := setup.SetupSentry(ctx.Context, conf.Proxy.Sentry, projectVersion) + if err != nil { + return errors.Wrap(err, "could not initialize sentry client") + } + + defer flushSentry() + } layers, err := setup.GetLayers(ctx.Context, conf) if err != nil {