mirror of
https://github.com/httprunner/httprunner.git
synced 2026-07-12 16:01:27 +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: 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
|
- 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 GA events report by setting environment `DISABLE_GA=true`
|
||||||
|
- feat: disable sentry reports by setting environment `DISABLE_SENTRY=true`
|
||||||
|
|
||||||
**go version**
|
**go version**
|
||||||
|
|
||||||
|
|||||||
@@ -29,6 +29,9 @@ func init() {
|
|||||||
gaClient = NewGAClient(trackingID, clientID)
|
gaClient = NewGAClient(trackingID, clientID)
|
||||||
|
|
||||||
// init sentry sdk
|
// init sentry sdk
|
||||||
|
if os.Getenv("DISABLE_SENTRY") == "true" {
|
||||||
|
return
|
||||||
|
}
|
||||||
err = sentry.Init(sentry.ClientOptions{
|
err = sentry.Init(sentry.ClientOptions{
|
||||||
Dsn: sentryDSN,
|
Dsn: sentryDSN,
|
||||||
Release: fmt.Sprintf("httprunner@%s", version.VERSION),
|
Release: fmt.Sprintf("httprunner@%s", version.VERSION),
|
||||||
|
|||||||
@@ -18,6 +18,9 @@ from httprunner.models import VariablesMapping
|
|||||||
|
|
||||||
|
|
||||||
def init_sentry_sdk():
|
def init_sentry_sdk():
|
||||||
|
if os.getenv("DISABLE_SENTRY") == "true":
|
||||||
|
return
|
||||||
|
|
||||||
sentry_sdk.init(
|
sentry_sdk.init(
|
||||||
dsn="https://460e31339bcb428c879aafa6a2e78098@sentry.io/5263855",
|
dsn="https://460e31339bcb428c879aafa6a2e78098@sentry.io/5263855",
|
||||||
release="httprunner@{}".format(__version__),
|
release="httprunner@{}".format(__version__),
|
||||||
|
|||||||
Reference in New Issue
Block a user