Skip to content

Blocked for now: Enable logging by default#6084

Draft
alwx wants to merge 4 commits into
mainfrom
fix/alwx/6083
Draft

Blocked for now: Enable logging by default#6084
alwx wants to merge 4 commits into
mainfrom
fix/alwx/6083

Conversation

@alwx

@alwx alwx commented May 4, 2026

Copy link
Copy Markdown
Contributor

This PR is finished but blocked because we decided to only include it to the next major.

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Enables logging by default, fixes #6083

💡 Motivation and Context

See #6083

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • All tests passing
  • No breaking changes

🔮 Next steps

@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor

Semver Impact of This PR

None (no version bump detected)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


  • Blocked for now: Enable logging by default by alwx in #6084
  • chore(deps): bump getsentry/craft from 2.26.6 to 2.26.8 by dependabot in #6260
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.26.6 to 2.26.8 by dependabot in #6259
  • chore(deps): bump actions/checkout from 6.0.2 to 6.0.3 by dependabot in #6257
  • chore(deps): bump github/codeql-action from 4.36.0 to 4.36.2 by dependabot in #6258
  • chore(deps): update Cocoa SDK to v9.16.1 by github-actions in #6252
  • chore(deps): update Android SDK to v8.43.1 by github-actions in #6253
  • chore(deps): update Sentry Android Gradle Plugin to v6.10.0 by github-actions in #6255
  • feat(tracing): Wrap Expo Router push, replace, navigate, back, dismiss in addition to prefetch by alwx in #6221
  • chore(deps): bump jwt in /samples/react-native by antonis in #6251
  • feat(profiling): Add measurements to Android profiling by antonis in #6250
  • chore(deps): update CLI to v3.5.0 by github-actions in #6248
  • chore(deps): bump jwt from 2.9.3 to 2.10.3 in /samples/react-native-macos by dependabot in #6247
  • chore(deps): bump jwt from 2.10.2 to 2.10.3 in /performance-tests by dependabot in #6246
  • feat(android): Warn when Gradle resolves unsupported sentry-android version by antonis in #6238
  • chore(deps): update JavaScript SDK to v10.56.0 by github-actions in #6249
  • chore(ci): Pin all GitHub Actions to full commit SHAs by antonis in #6243
  • fix(tracing): Enable fetch instrumentation when expo/fetch is active by antonis in #6226
  • fix: Bump tmp to 0.2.7 to resolve path traversal vulnerability by antonis in #6233
  • feat(logs): Add enableAutoConsoleLogs option to opt out of console capture by alwx in #6235
  • chore(deps): update JavaScript SDK to v10.55.0 by github-actions in #6222
  • chore(deps): update Sentry Android Gradle Plugin to v6.9.0 by github-actions in #6230
  • refactor(android): Convert sentry.gradle to Kotlin DSL (sentry.gradle.kts) by antonis in #6119
  • Lint fix for 8.13.0 by alwx in #6229

Plus 82 more


🤖 This preview updates automatically when you update the PR.

@github-actions

github-actions Bot commented May 4, 2026

Copy link
Copy Markdown
Contributor
Fails
🚫 Pull request is not ready for merge, please add the "ready-to-merge" label to the pull request

Generated by 🚫 dangerJS against 5f5e5d2

Comment thread CHANGELOG.md

- `enableLogs` defaults to `true` ([#6084](https://github.com/getsentry/sentry-react-native/pull/6084))
- `consoleLoggingIntegration` is no longer added by default. To forward `console.*` calls to Sentry logs, add it explicitly: `integrations: [Sentry.consoleLoggingIntegration()]` ([#6084](https://github.com/getsentry/sentry-react-native/pull/6084))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I added it to "Breaking Changes" because it's a breaking change :) But not sure it should be done this way.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The implementation changes LGTM @alwx 👍
Looping in @christophaigner and @dingsdax for more context on this since normally a breaking change would require a major version bump.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

this is right, a breaking change like this requires a major version, whenever the next major is planned, incl. the change there

@alwx alwx marked this pull request as ready for review May 4, 2026 12:03
Comment thread packages/core/src/js/client.ts

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 5f5e5d2. Configure here.

options.environment = getDefaultEnvironment();
}

options.enableLogs = options.enableLogs ?? options._experiments?.enableLogs ?? true;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Duplicated defaulting logic for enableLogs across two files

Low Severity

The identical defaulting expression options.enableLogs = options.enableLogs ?? options._experiments?.enableLogs ?? true appears in both sdk.tsx and client.ts. Unlike other option defaults (e.g. parentSpanIsAlwaysRootSpan, which is only set in the client constructor), enableLogs is set in two places because sdk.tsx needs it before getDefaultIntegrations() runs. This duplication risks the two locations diverging if the fallback chain or default is updated in only one place. Flagging per review rules on redundant logic.

Additional Locations (1)
Fix in Cursor Fix in Web

Triggered by project rule: PR Review Guidelines for Cursor Bot

Reviewed by Cursor Bugbot for commit 5f5e5d2. Configure here.

@alwx alwx marked this pull request as draft May 4, 2026 12:40
@alwx alwx marked this pull request as draft May 4, 2026 12:40
@alwx alwx changed the title Enable logging by default Blocked for now: Enable logging by default Jun 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable logging by default [React Native]

3 participants