From 91d4466457545d34f414285fe4d81fb972e49eb8 Mon Sep 17 00:00:00 2001 From: Lukas Bloder Date: Fri, 18 Aug 2023 11:57:54 +0200 Subject: [PATCH] Add Docs for enabled option for Java SDK (#7654) --- src/platforms/common/configuration/options.mdx | 2 +- .../java/common/configuration/index.mdx | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/platforms/common/configuration/options.mdx b/src/platforms/common/configuration/options.mdx index 300573db0f545..2045c891e0e49 100644 --- a/src/platforms/common/configuration/options.mdx +++ b/src/platforms/common/configuration/options.mdx @@ -575,7 +575,7 @@ If the callback is not set, or it returns `undefined`, the default naming scheme - + Specifies whether this SDK should send events to Sentry. Defaults to `true`. Setting this to `enabled: false` doesn't prevent all overhead from Sentry instrumentation. To disable Sentry completely, depending on environment, call `Sentry.init` conditionally. diff --git a/src/platforms/java/common/configuration/index.mdx b/src/platforms/java/common/configuration/index.mdx index 71c0a4ef93a42..4b91b5edae9e0 100644 --- a/src/platforms/java/common/configuration/index.mdx +++ b/src/platforms/java/common/configuration/index.mdx @@ -297,6 +297,22 @@ SENTRY_DEBUG=true sentry.debug=true ``` +### Disable Sentry + +To disable Sentry, use the `enabled` option: + +```properties {tabTitle:sentry.properties} +enabled=false +``` + +```properties {tabTitle:environment variable} +SENTRY_ENABLED=false +``` + +```properties {tabTitle:system property} +sentry.enabled=false +``` + ## Configuring Timeouts It’s possible to manually set the connection timeouts length with `connectionTimeoutMillis` and `readTimeoutMillis`: