Skip to content

fix(android): Restore enableLogs option mapping - #6967

Merged
antonis merged 2 commits into
mainfrom
fix/android-enable-logs
Oct 30, 2026
Merged

antonis merged 2 commits into
mainfrom
fix/android-enable-logs

Conversation

@antonis

@antonis antonis commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Restores the enableLogs → options.getLogs().setEnabled(...) mapping in RNSentryStart.getSentryAndroidOptions. It goes back in its original place, right after enableNdk.

Both Android init paths read options through getSentryAndroidOptions, so this one change fixes both:

  • JS initNativeSdk → RNSentryModuleImpl → RNSentryStart.startWithOptions. Old and New Architecture share this path.
  • RNSentrySDK.init (start before JS, options from sentry.options.json) → RNSentryStart.startWithOptions

💡 Motivation and Context

Since v8, Sentry.init({ enableLogs: true }) has had no effect on the native Android SDK

💚 How did you test it?

  • Added three tests to RNSentryStartTest.kt: enableLogs: true, enableLogs: false, and key absent (the native default is left unchanged).
  • Confirmed the true/false tests fail without the fix (2 failures) and pass with it (37/37).
  • Ran yarn lint:lerna. yarn lint:android and yarn lint:kotlin show no issues in the changed files (the only failures are in generated/local build output).
  • Manual testing (example link)

📝 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.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.
  • No breaking changes.

🔮 Next steps

antonis and others added 2 commits October 29, 2026 15:26
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

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


  • fix(android): Restore enableLogs option mapping by antonis and claude in #6967

🤖 This preview updates automatically when you update the PR.

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 0b6915b. Configure here.

@antonis antonis added the ready-to-merge Triggers the full CI test suite label Oct 29, 2026
@antonis
antonis marked this pull request as ready for review October 29, 2026 14:41
@antonis
antonis requested review from a team and lucas-zimerman as code owners October 29, 2026 14:41
@antonis
antonis requested review from alwx and buenaflor and removed request for a team October 29, 2026 14:41
@sentry

sentry Bot commented Oct 29, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
Sentry RN io.sentry.reactnative.sample 8.33.0 (113) Release

⚙️ sentry-react-native Build Distribution Settings

@antonis
antonis merged commit 8d2ee97 into main Oct 30, 2026
134 of 141 checks passed
@antonis
antonis deleted the fix/android-enable-logs branch October 30, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-to-merge Triggers the full CI test suite

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants