From 35d3e34b64655f1febe2803b53a6d63f109e5b9e Mon Sep 17 00:00:00 2001 From: Alexander Pantiukhov Date: Mon, 1 Jun 2026 10:13:12 +0200 Subject: [PATCH] feat(react-native): Document enableAutoConsoleLogs option Add the enableAutoConsoleLogs option to the React Native configuration\nreference and update the Console Logging integration page to show the new,\ncleaner opt-out alongside the legacy integrations-filter workaround.\n\nIntroduced in sentry-react-native 8.14.0 (getsentry/sentry-react-native#6231). --- .../react-native/configuration/options.mdx | 10 ++++++++++ .../react-native/integrations/console-logging.mdx | 13 ++++++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/platforms/react-native/configuration/options.mdx b/docs/platforms/react-native/configuration/options.mdx index c1058bba9bb60..9fbb1f28e4ba9 100644 --- a/docs/platforms/react-native/configuration/options.mdx +++ b/docs/platforms/react-native/configuration/options.mdx @@ -214,6 +214,16 @@ Allows the choice of which logs are captured: `native` for logs from native code + + +When `enableLogs` is `true`, the SDK automatically captures `console.*` calls as logs via the `ConsoleLogs` integration. Set this to `false` to disable the automatic console capture while still being able to send logs manually via `Sentry.logger.*`. + +Has no effect when `enableLogs` is `false` or `logsOrigin` is `'native'`. + +(New in version 8.14.0) + + + ## Integration Configuration For many platform SDKs integrations can be configured alongside it. On some platforms that happen as part of the `init()` call, in some others, different patterns apply. diff --git a/docs/platforms/react-native/integrations/console-logging.mdx b/docs/platforms/react-native/integrations/console-logging.mdx index 851556f2b56d7..63d4b827474d1 100644 --- a/docs/platforms/react-native/integrations/console-logging.mdx +++ b/docs/platforms/react-native/integrations/console-logging.mdx @@ -13,7 +13,18 @@ Console Logging integration is enabled by default which means calls to the `cons ## Disabling Console Logging Integration -To disable the integration, filter it out from the integrations array: +Since version 8.14.0, you can disable the integration with the `enableAutoConsoleLogs` option. `Sentry.logger.*` calls still work as expected: + +```js +Sentry.init({ + ..., + enableLogs: true, + enableAutoConsoleLogs: false, + ... +}) +``` + +On earlier versions, filter the integration out of the integrations array: ```js Sentry.init({