feat: disable sentry reports by setting environment DISABLE_SENTRY=true

This commit is contained in:
debugtalk
2022-04-18 15:27:45 +08:00
parent eaf3ffb16c
commit 67d37c0605
3 changed files with 7 additions and 0 deletions

View File

@@ -29,6 +29,9 @@ func init() {
gaClient = NewGAClient(trackingID, clientID)
// init sentry sdk
if os.Getenv("DISABLE_SENTRY") == "true" {
return
}
err = sentry.Init(sentry.ClientOptions{
Dsn: sentryDSN,
Release: fmt.Sprintf("httprunner@%s", version.VERSION),