Skip to content

feat(core): Expose native breadcrumb off-switches - #6768

Merged
antonis merged 2 commits into
mainfrom
feat/native-breadcrumb-off-switches
Sep 23, 2026
Merged

antonis merged 2 commits into
mainfrom
feat/native-breadcrumb-off-switches

Conversation

@antonis

@antonis antonis commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Exposes native breadcrumb off-switches so apps can disable native breadcrumbs that largely duplicate the ones the JS SDK already records:

  • enableAutoBreadcrumbTracking (iOS) — read by sentry-cocoa's options dictionary parser, so it needs only the JS type + JSDoc.
  • enableActivityLifecycleBreadcrumbs, enableAppLifecycleBreadcrumbs, enableSystemEventBreadcrumbs, enableAppComponentBreadcrumbs (Android) — each mapped explicitly in RNSentryStart.java to its SentryAndroidOptions setter.

All default to true (matching the native defaults); the JS wrapper forwards them to native automatically (only functions/JS-only keys are filtered out). Follows the same mechanism as #6764.

💡 Motivation and Context

Part of #6747

💚 How did you test it?

  • Added tests: JS forwarding (wrapper.test.ts) and Android option mapping (RNSentryStartTest.java, covering true/false forwarding and native-default preservation when unset).
  • Manually

📝 Checklist

🔮 Next steps

antonis and others added 2 commits September 23, 2026 09:58
Expose enableAutoBreadcrumbTracking (iOS) and
enableActivityLifecycleBreadcrumbs, enableAppLifecycleBreadcrumbs,
enableSystemEventBreadcrumbs, enableAppComponentBreadcrumbs (Android)
so apps can turn off the native breadcrumbs, which largely duplicate the
JS breadcrumbs. All default to the native default (true).

iOS is read by cocoa's dictionary parser; Android is mapped in
RNSentryStart. Part of #6747.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <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).


  • feat(core): Expose native breadcrumb off-switches by antonis in #6768
  • test(android): Add GradleTestKit tests for sentry.gradle.kts asset tasks by antonis in #6754
  • fix(android): Generate modules.json into build folder instead of source tree by antonis in #6753
  • fix(android): Generate sentry.options.json into build folder instead of source tree by antonis in #6751
  • feat(core): Expose native network breadcrumb options by antonis in #6764
  • chore(deps): update JavaScript SDK to v10.75.2 by github-actions in #6767
  • ci: Unify derivedData path resolution with realpath by antonis in #6761
  • fix(e2e): Fix TestFlight upload after enabling Mac Catalyst on the sample by antonis in #6762
  • chore(deps): update JavaScript SDK to v10.75.1 by github-actions in #6763
  • fix(ios): Fix Mac Catalyst linking the wrong Sentry.xcframework slice by antonis in #6758
  • chore(deps): bump the codeql-action group across 1 directory with 3 updates by dependabot in #6756
  • chore(deps): bump ruby/setup-ruby from 1.321.0 to 1.324.0 by dependabot in #6757
  • fix(core): Declare optional peer dependencies to resolve phantom imports under strict package managers by antonis in #6729
  • Add missing exports and update public API report by antonis in #6731
  • test(ios): Reenable Session Replay E2E test by antonis in #6737
  • fix(ios): Honor shutdownTimeout on iOS by antonis in #6749

🤖 This preview updates automatically when you update the PR.

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 9ac2000

@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 9ac2000. Configure here.

@antonis antonis added the ready-to-merge Triggers the full CI test suite label Sep 23, 2026
@sentry

sentry Bot commented Sep 23, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-react-native Build Distribution Settings

@github-actions

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 3868.68 ms 1220.72 ms -2647.96 ms
Size 5.15 MiB 6.90 MiB 1.75 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
5fe1c6c+dirty 1220.79 ms 1217.63 ms -3.16 ms
0a147b2+dirty 3838.15 ms 1221.94 ms -2616.21 ms
41d6254+dirty 3845.71 ms 1224.51 ms -2621.20 ms
a636fa4+dirty 3852.48 ms 1236.10 ms -2616.38 ms
1a2e7e0+dirty 3842.49 ms 1220.04 ms -2622.45 ms
3d377b5+dirty 1218.48 ms 1219.51 ms 1.03 ms
bbb8d67+dirty 3838.98 ms 1217.84 ms -2621.14 ms
ab203f9+dirty 3848.07 ms 1219.71 ms -2628.35 ms
7436d0f+dirty 3851.58 ms 1232.21 ms -2619.38 ms
27d9693+dirty 3831.11 ms 1216.94 ms -2614.17 ms

App size

Revision Plain With Sentry Diff
5fe1c6c+dirty 3.38 MiB 4.77 MiB 1.39 MiB
0a147b2+dirty 4.98 MiB 6.51 MiB 1.53 MiB
41d6254+dirty 5.15 MiB 6.70 MiB 1.54 MiB
a636fa4+dirty 4.98 MiB 6.55 MiB 1.57 MiB
1a2e7e0+dirty 4.98 MiB 6.46 MiB 1.49 MiB
3d377b5+dirty 3.38 MiB 4.76 MiB 1.38 MiB
bbb8d67+dirty 4.98 MiB 6.55 MiB 1.57 MiB
ab203f9+dirty 4.98 MiB 6.51 MiB 1.53 MiB
7436d0f+dirty 5.15 MiB 6.70 MiB 1.54 MiB
27d9693+dirty 4.98 MiB 6.51 MiB 1.53 MiB

@github-actions

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 3880.45 ms 1241.35 ms -2639.09 ms
Size 5.15 MiB 6.90 MiB 1.75 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
68ae91b+dirty 3836.36 ms 1222.04 ms -2614.32 ms
0b5a379+dirty 3857.69 ms 1230.34 ms -2627.35 ms
bf168a4+dirty 3846.83 ms 1221.33 ms -2625.49 ms
f170ec3+dirty 3844.74 ms 1222.67 ms -2622.07 ms
68672fc+dirty 3832.22 ms 1228.29 ms -2603.93 ms
84cba31+dirty 3830.40 ms 1204.44 ms -2625.96 ms
2c735cc+dirty 1223.33 ms 1224.38 ms 1.04 ms
b9bebee+dirty 3858.02 ms 1231.92 ms -2626.11 ms
a50b33d+dirty 1207.11 ms 1212.10 ms 5.00 ms
5569641+dirty 3824.35 ms 1210.78 ms -2613.57 ms

App size

Revision Plain With Sentry Diff
68ae91b+dirty 4.98 MiB 6.46 MiB 1.48 MiB
0b5a379+dirty 5.15 MiB 6.70 MiB 1.54 MiB
bf168a4+dirty 4.98 MiB 6.47 MiB 1.49 MiB
f170ec3+dirty 5.15 MiB 6.69 MiB 1.53 MiB
68672fc+dirty 5.15 MiB 6.71 MiB 1.55 MiB
84cba31+dirty 4.98 MiB 6.55 MiB 1.57 MiB
2c735cc+dirty 3.38 MiB 4.74 MiB 1.35 MiB
b9bebee+dirty 5.15 MiB 6.68 MiB 1.53 MiB
a50b33d+dirty 3.38 MiB 4.73 MiB 1.35 MiB
5569641+dirty 5.15 MiB 6.67 MiB 1.51 MiB

@github-actions

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 428.64 ms 458.68 ms 30.04 ms
Size 50.56 MiB 56.50 MiB 5.94 MiB

@github-actions

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 425.84 ms 442.10 ms 16.26 ms
Size 50.56 MiB 56.50 MiB 5.94 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
5a21b51+dirty 505.16 ms 539.20 ms 34.04 ms
a2585ce+dirty 414.04 ms 456.83 ms 42.79 ms
af33f3b+dirty 417.68 ms 448.04 ms 30.37 ms
15d4514+dirty 413.63 ms 449.62 ms 35.99 ms
5ca03f9+dirty 412.83 ms 459.40 ms 46.57 ms
f170ec3+dirty 505.96 ms 551.88 ms 45.92 ms
635676f+dirty 420.43 ms 428.23 ms 7.80 ms
822d35b+dirty 472.69 ms 561.24 ms 88.56 ms
774257e+dirty 541.42 ms 575.55 ms 34.13 ms
4b87b12+dirty 356.23 ms 399.86 ms 43.63 ms

App size

Revision Plain With Sentry Diff
5a21b51+dirty 48.30 MiB 53.49 MiB 5.19 MiB
a2585ce+dirty 49.74 MiB 55.36 MiB 5.61 MiB
af33f3b+dirty 49.74 MiB 55.09 MiB 5.35 MiB
15d4514+dirty 48.30 MiB 53.60 MiB 5.30 MiB
5ca03f9+dirty 49.74 MiB 55.26 MiB 5.52 MiB
f170ec3+dirty 48.30 MiB 53.57 MiB 5.26 MiB
635676f+dirty 50.56 MiB 56.46 MiB 5.90 MiB
822d35b+dirty 49.74 MiB 54.84 MiB 5.10 MiB
774257e+dirty 48.30 MiB 53.58 MiB 5.28 MiB
4b87b12+dirty 43.94 MiB 49.00 MiB 5.06 MiB

@antonis
antonis merged commit 5ff0e10 into main Sep 23, 2026
141 of 148 checks passed
@antonis
antonis deleted the feat/native-breadcrumb-off-switches branch September 23, 2026 10:04
antonis added a commit to getsentry/sentry-docs that referenced this pull request Sep 24, 2026
## DESCRIBE YOUR PR

⚠️ Should be merged after
getsentry/sentry-react-native#6768 is released

Documents the native breadcrumb off-switches added in
getsentry/sentry-react-native#6768:

- `enableAutoBreadcrumbTracking` (iOS)
- `enableActivityLifecycleBreadcrumbs` (Android)
- `enableAppLifecycleBreadcrumbs` (Android)
- `enableSystemEventBreadcrumbs` (Android)
- `enableAppComponentBreadcrumbs` (Android)

All default to `true`, matching the native defaults.

> [!NOTE]
> Stacked on top of #19551 (native network breadcrumb options). The base
is set to that branch, so the diff here is only the five breadcrumb
off-switch options. Re-target the base to `master` once #19551 merges.

## IS YOUR CHANGE URGENT?

Help us prioritize incoming PRs by letting us know when the change needs
to go live.
Select exactly one option. For deadlines, replace `YYYY-MM-DD` with the
due date. You can update this information later by editing the PR
description.

- [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD
- [ ] Other deadline: YYYY-MM-DD
- [x] No deadline: Not urgent, can wait up to 1 week+

## SLA

- Teamwork makes the dream work, so please add a reviewer to your PRs.
- Please give the docs team up to 1 week to review your PR unless you've
supplied a deadline.

Thanks in advance for your help!

## PRE-MERGE CHECKLIST

_Make sure you've checked the following before merging your changes:_

- [ ] Checked Vercel preview for correctness, including links
- [ ] PR was reviewed and approved by any necessary SMEs (subject matter
experts)
- [ ] PR was reviewed and approved by a member of the [Sentry docs
team](https://github.com/orgs/getsentry/teams/docs)

## EXTRA RESOURCES

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
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