mirror of
https://github.com/httprunner/httprunner.git
synced 2026-05-13 17:29:56 +08:00
feat: disable sentry reports by setting environment DISABLE_SENTRY=true
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
- refactor: merge [hrp] into httprunner v4, which will include golang and python dual engine
|
||||
- refactor: redesign `IStep` to make step extensible to support implementing new protocols and test types
|
||||
- feat: disable GA events report by setting environment `DISABLE_GA=true`
|
||||
- feat: disable sentry reports by setting environment `DISABLE_SENTRY=true`
|
||||
|
||||
**go version**
|
||||
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -18,6 +18,9 @@ from httprunner.models import VariablesMapping
|
||||
|
||||
|
||||
def init_sentry_sdk():
|
||||
if os.getenv("DISABLE_SENTRY") == "true":
|
||||
return
|
||||
|
||||
sentry_sdk.init(
|
||||
dsn="https://460e31339bcb428c879aafa6a2e78098@sentry.io/5263855",
|
||||
release="httprunner@{}".format(__version__),
|
||||
|
||||
Reference in New Issue
Block a user