Skip to content

[skill-drift] update(sentry-react-native-sdk): add enableAutoConsoleLogs option#154

Open
github-actions[bot] wants to merge 1 commit into
mainfrom
skill-drift/sentry-react-native-sdk-skill-drift-update-sentry-react-native-s-1780325441
Open

[skill-drift] update(sentry-react-native-sdk): add enableAutoConsoleLogs option#154
github-actions[bot] wants to merge 1 commit into
mainfrom
skill-drift/sentry-react-native-sdk-skill-drift-update-sentry-react-native-s-1780325441

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented Jun 1, 2026

Warning

Auto-generated from external SDK content. Review all links and code suggestions before acting on them.

Summary

  • Add new enableAutoConsoleLogs config option (SDK ≥8.14.0) to both the main skill configuration table and the logging reference
  • Update Console Logging Integration section to explain the new default behavior and how to opt out

Changes

Added enableAutoConsoleLogs to:

  • skills/sentry-react-native-sdk/SKILL.md — Logging Options table
  • skills/sentry-react-native-sdk/references/logging.md — Configuration Reference table and Console Logging Integration section

What it does:
Starting in SDK 8.14.0, when enableLogs: true, the SDK automatically captures console.* calls without needing to add consoleLoggingIntegration manually. Users can set enableAutoConsoleLogs: false to disable this and use only manual Sentry.logger.* calls.

Additional findings (not addressed in this PR)

Swift Package Manager for iOS (SDK 8.13.0, PR #6182) — Not documented. This is a new opt-in iOS installation method that requires setting SENTRY_USE_SPM=1 before pod install to consume sentry-cocoa via SPM instead of CocoaPods source build. This needs architectural guidance on when to use it (simpler builds, binary xcframework) vs. standard CocoaPods.

App hang tracking APIs (SDK 8.13.0, PR #6192) — pauseAppHangTracking() and resumeAppHangTracking() are now exposed on iOS. Niche APIs for temporarily disabling app hang detection during known-blocking operations.

Reviewed PRs

  • #6235 — feat(logs): Add enableAutoConsoleLogs option (addressed)
  • #6199 — feat(tracing): Add Sentry.NavigationContainer wrapper (already documented)
  • #6195 — feat(core): Add disableAutoUpload to Expo plugin (already documented)
  • #6182 — feat(ios): SPM support (needs separate work)
  • #6228 — fix(expo): Rethrow native exceptions (internal behavior)
  • #6224 — chore(deps): Android SDK 8.43.0 (version tracking)
  • #6223 — chore(deps): Cocoa SDK 9.15.0 (version tracking)
  • #6222 — chore(deps): JavaScript SDK 10.55.0 (version tracking)
  • #6218 — feat(tracing): Navigation breadcrumbs (covered)
  • #6210 — fix(tracing): Bound TTID/TTFD (internal behavior)
  • #6202 — fix(ios): requiresMainQueueSetup (internal implementation)
  • #6119 — refactor(android): Kotlin DSL (already documented)

Source PRs

…ogs option

Automated drift-fix run.

Co-Authored-By: Claude (claude-sonnet-4-5) <noreply@anthropic.com>
Comment on lines +165 to 171
// SDK ≥8.14.0: console capture is automatic. To disable:
// enableAutoConsoleLogs: false,

// SDK <8.14.0: add consoleLoggingIntegration manually:
integrations: [
Sentry.consoleLoggingIntegration({
levels: ["log", "warn", "error"], // default — adjust as needed
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The documentation in logging.md contains an outdated code example and troubleshooting advice that will cause duplicate console log capture for users on SDK ≥8.14.0.
Severity: MEDIUM

Suggested Fix

Comment out the consoleLoggingIntegration() code block in the example, as it's only for SDKs <8.14.0. Update the troubleshooting table to advise checking enableLogs: true and ensuring enableAutoConsoleLogs is not false for newer SDKs, instead of adding the manual integration.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: skills/sentry-react-native-sdk/references/logging.md#L165-L171

Potential issue: The documentation in `logging.md` contains an outdated code example and
troubleshooting advice. For SDK versions 8.14.0 and newer, console logging is enabled by
default via `enableAutoConsoleLogs`. However, a code example for manual setup with
`consoleLoggingIntegration()` is still active, and a troubleshooting entry incorrectly
advises adding this manual integration. Users on newer SDKs who follow either the
example or the troubleshooting advice will have both automatic and manual integrations
running, resulting in duplicate capture for every console log.

Also affects:

  • skills/sentry-react-native-sdk/references/logging.md:156~164

Did we get this right? 👍 / 👎 to inform future reviews.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants