Skip to content

fix(core): Use the debug logger, not the Logs API, for SDK diagnostics - #6585

Merged
alwx merged 2 commits into
mainfrom
alwx/fix/6542-follow-up
Aug 11, 2026
Merged

fix(core): Use the debug logger, not the Logs API, for SDK diagnostics#6585
alwx merged 2 commits into
mainfrom
alwx/fix/6542-follow-up

Conversation

@alwx

@alwx alwx commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

logger from @sentry/core is the structured Logs API — every call captures a log record and ships it to the user's project. debug is the internal debug logger, printed to the console only under debug: true. Ten internal diagnostics were written against logger, so an SDK-internal failure turned into a billable log event the user cannot silence.

Switched to debug in multiple Turbo Modules related files.

💡 Motivation and Context

Follow-up to #6561 (comment), agreed with @lucas-zimerman to do separately. The logger calls predate #6561.

📝 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

  • tools/sentryOptionsSerializer.ts (7 calls) as described above.

alwx added 2 commits August 11, 2026 11:26
`logger` from `@sentry/core` is the structured Logs API: every call captures
a log record and ships it to the user's project. `debug` is the internal
debug logger, printed to the console only when `debug: true`. Ten internal
diagnostics were written against `logger`, so an SDK-internal failure became
a billable log event in the user's project and could not be silenced.

The eight TurboModule ones are the worst case. They sit in the wrap hot
path, one per failed call, and capturing a log goes through the wrapped
`RNSentry.captureEnvelope` — a failure there logs, which captures, which
calls the failing method again.

`scopeSync.ts` imported `logger` from `@sentry/react`, which does not
re-export `debug`, so that one moves to `@sentry/core`.
@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(core): Use the debug logger, not the Logs API, for SDK diagnostics by alwx in #6585
  • fix(core): Measure callback-style native module calls until completion by alwx in #6561
  • chore(deps): bump brace-expansion to ^2.1.4 / ^5.0.9 by alwx in #6577
  • fix(expo): Resolve config-plugins through the expo package by alwx in #6581
  • chore(deps): bump js-yaml to ^3.15.1 / ^4.3.1 by alwx in #6578
  • docs(core): Correct enableTurboModuleTracking docs and document TurboModule plumbing by alwx in #6582
  • docs: fix dead links in the README by luccasfraga in #6570
  • chore(deps): update Maestro to v2.8.0 by github-actions in #6551
  • chore(deps): update Android SDK to v8.52.0 by github-actions in #6566
  • chore(deps): bump the codeql-action group with 3 updates by dependabot in #6572
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.28.0 to 2.30.0 by dependabot in #6573
  • chore(deps): bump getsentry/craft from 2.28.0 to 2.30.0 by dependabot in #6575
  • chore(deps): bump dorny/paths-filter from 4.0.2 to 4.0.3 by dependabot in #6574
  • chore(deps): bump nanoid from 3.3.8 to 3.3.18 by dependabot in #6579
  • chore(deps): bump gradle/actions/setup-gradle from 6.2.0 to 6.3.0 by dependabot in #6576
  • chore(ci): remove Cirrus runners and use only Bitrise by itaybre in #6563
  • fix(ios): Re-land SentrySDK.internal migration, bump Cocoa SDK to 9.24.0 by alwx in #6541
  • ci: Replace curl-pipe-bash with action-setup-cli for Sentry CLI setup by oioki in #6567

🤖 This preview updates automatically when you update the PR.

@github-actions

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

@alwx
alwx marked this pull request as ready for review August 11, 2026 09:32

@lucas-zimerman lucas-zimerman left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@alwx
alwx merged commit 1d55d8a into main Aug 11, 2026
64 of 70 checks passed
@alwx
alwx deleted the alwx/fix/6542-follow-up branch August 11, 2026 10:23
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.

2 participants