[skill-drift] update(sentry-react-native-sdk): add enableAutoConsoleLogs option#154
Open
github-actions[bot] wants to merge 1 commit into
Conversation
…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 |
There was a problem hiding this comment.
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Warning
Auto-generated from external SDK content. Review all links and code suggestions before acting on them.
Summary
enableAutoConsoleLogsconfig option (SDK ≥8.14.0) to both the main skill configuration table and the logging referenceChanges
Added
enableAutoConsoleLogsto:skills/sentry-react-native-sdk/SKILL.md— Logging Options tableskills/sentry-react-native-sdk/references/logging.md— Configuration Reference table and Console Logging Integration sectionWhat it does:
Starting in SDK 8.14.0, when
enableLogs: true, the SDK automatically capturesconsole.*calls without needing to addconsoleLoggingIntegrationmanually. Users can setenableAutoConsoleLogs: falseto disable this and use only manualSentry.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=1beforepod installto 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()andresumeAppHangTracking()are now exposed on iOS. Niche APIs for temporarily disabling app hang detection during known-blocking operations.Reviewed PRs
Source PRs
disableAutoUploadoption to Expo plugin