Skip to content

Enable logging by default#6084

Draft
alwx wants to merge 4 commits intomainfrom
fix/alwx/6083
Draft

Enable logging by default#6084
alwx wants to merge 4 commits intomainfrom
fix/alwx/6083

Conversation

@alwx
Copy link
Copy Markdown
Contributor

@alwx alwx commented May 4, 2026

📢 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
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

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).


  • Enable logging by default by alwx in #6084
  • chore(deps): bump github/codeql-action from 4.35.2 to 4.35.3 by dependabot in #6078
  • fix: Prevent shell injection vulnerability in GitHub Actions workflow by fix-it-felix-sentry in #6077
  • chore(deps): update Maestro to v2.5.1 by github-actions in #6075

🤖 This preview updates automatically when you update the PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 4, 2026

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
Copy link
Copy Markdown

@cursor cursor Bot left a comment

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
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