diff --git a/serve/env.go b/serve/env.go index 966e90768f..c0ea2cc075 100644 --- a/serve/env.go +++ b/serve/env.go @@ -3,7 +3,7 @@ package serve import "os" func getEnvOrDefault(env, def string) string { - if v := os.Getenv(env); v != "" { + if v := os.Getenv(env); len(v) > 0 { return v } return def diff --git a/serve/plugin.go b/serve/plugin.go index 397431768a..7b20b7dd6a 100644 --- a/serve/plugin.go +++ b/serve/plugin.go @@ -88,6 +88,7 @@ func Plugin(p *plugin.Plugin, opts ...PluginOption) *PluginServe { for _, opt := range opts { opt(s) } + s.sentryDSN = getEnvOrDefault("CQ_SENTRY_DSN", s.sentryDSN) return s }