feat(core): Expose native network breadcrumb options - #6764
Merged
Merged
Conversation
Expose `enableNetworkBreadcrumbs` (iOS) and `enableNetworkEventBreadcrumbs` (Android) so apps can disable the native network breadcrumbs, which largely duplicate the JS `fetch`/`XHR` breadcrumbs. iOS is read by cocoa's dictionary parser; Android is mapped in RNSentryStart. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
|
📲 Install BuildsAndroid
|
Contributor
Android (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 20fbd51+dirty | 487.89 ms | 535.60 ms | 47.71 ms |
| 580fb5c+dirty | 436.34 ms | 471.63 ms | 35.28 ms |
| d0e3b3e+dirty | 421.53 ms | 498.19 ms | 76.66 ms |
| 0d9949d+dirty | 403.57 ms | 437.00 ms | 33.43 ms |
| 37a2091+dirty | 407.82 ms | 441.22 ms | 33.40 ms |
| 2d5d963+dirty | 460.71 ms | 511.54 ms | 50.83 ms |
| 3817909+dirty | 406.67 ms | 416.58 ms | 9.91 ms |
| 2bf6e2c+dirty | 542.76 ms | 563.73 ms | 20.97 ms |
| 0a147b2+dirty | 464.71 ms | 538.81 ms | 74.09 ms |
| 5748023+dirty | 446.69 ms | 505.63 ms | 58.94 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 20fbd51+dirty | 49.74 MiB | 54.81 MiB | 5.07 MiB |
| 580fb5c+dirty | 49.74 MiB | 54.79 MiB | 5.05 MiB |
| d0e3b3e+dirty | 49.74 MiB | 55.09 MiB | 5.34 MiB |
| 0d9949d+dirty | 43.75 MiB | 48.13 MiB | 4.37 MiB |
| 37a2091+dirty | 48.30 MiB | 53.58 MiB | 5.28 MiB |
| 2d5d963+dirty | 50.56 MiB | 56.46 MiB | 5.90 MiB |
| 3817909+dirty | 43.75 MiB | 48.08 MiB | 4.33 MiB |
| 2bf6e2c+dirty | 50.56 MiB | 56.49 MiB | 5.93 MiB |
| 0a147b2+dirty | 49.74 MiB | 55.08 MiB | 5.34 MiB |
| 5748023+dirty | 48.30 MiB | 53.54 MiB | 5.23 MiB |
Contributor
iOS (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 64630e5+dirty | 3842.70 ms | 1218.11 ms | -2624.60 ms |
| b0d3373+dirty | 3831.75 ms | 1227.29 ms | -2604.46 ms |
| b04af96+dirty | 3818.92 ms | 1219.76 ms | -2599.16 ms |
| 3d31fcf+dirty | 3838.09 ms | 1223.46 ms | -2614.63 ms |
| a0a3177+dirty | 3844.73 ms | 1225.23 ms | -2619.51 ms |
| af33f3b+dirty | 3849.98 ms | 1236.45 ms | -2613.53 ms |
| 09a902f+dirty | 3835.67 ms | 1217.11 ms | -2618.57 ms |
| 5a316ea+dirty | 3820.11 ms | 1211.28 ms | -2608.83 ms |
| acd838e+dirty | 3849.78 ms | 1230.00 ms | -2619.78 ms |
| c2e182c+dirty | 3848.40 ms | 1211.79 ms | -2636.61 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 64630e5+dirty | 4.98 MiB | 6.46 MiB | 1.49 MiB |
| b0d3373+dirty | 5.15 MiB | 6.68 MiB | 1.53 MiB |
| b04af96+dirty | 4.98 MiB | 6.54 MiB | 1.56 MiB |
| 3d31fcf+dirty | 4.98 MiB | 6.56 MiB | 1.58 MiB |
| a0a3177+dirty | 4.98 MiB | 6.55 MiB | 1.58 MiB |
| af33f3b+dirty | 4.98 MiB | 6.51 MiB | 1.54 MiB |
| 09a902f+dirty | 4.98 MiB | 6.46 MiB | 1.49 MiB |
| 5a316ea+dirty | 4.98 MiB | 6.51 MiB | 1.53 MiB |
| acd838e+dirty | 5.15 MiB | 6.70 MiB | 1.55 MiB |
| c2e182c+dirty | 4.98 MiB | 6.50 MiB | 1.52 MiB |
Cover getSentryAndroidOptions forwarding of enableNetworkEventBreadcrumbs onto SentryAndroidOptions for true/false, and that omitting the RN option preserves the native default (true). First unit coverage for this method. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
✅ 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 a5380b0. Configure here.
The Android enableNetworkEventBreadcrumbs option gates connectivity/network-state breadcrumbs (network available/lost, capability changes, bandwidth/VPN), not per-HTTP-request breadcrumbs. Fix the JSDoc and split the CHANGELOG so it no longer describes it as duplicating JS HTTP breadcrumbs. iOS enableNetworkBreadcrumbs is unchanged and does cover HTTP requests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
antonis
marked this pull request as ready for review
September 22, 2026 10:54
antonis
requested review from
a team,
alwx and
lucas-zimerman
as code owners
September 22, 2026 10:54
Contributor
iOS (new) Performance metrics 🚀
|
| 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 |
Contributor
Android (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3a829f0+dirty | 410.78 ms | 454.22 ms | 43.44 ms |
| a5d243c+dirty | 499.20 ms | 525.62 ms | 26.42 ms |
| a858ac3+dirty | 498.50 ms | 575.22 ms | 76.72 ms |
| f9c1ed4+dirty | 520.57 ms | 594.84 ms | 74.27 ms |
| b9bebee+dirty | 500.50 ms | 536.42 ms | 35.92 ms |
| 2bf6e2c+dirty | 426.33 ms | 457.02 ms | 30.69 ms |
| a0d8cf8+dirty | 533.71 ms | 564.25 ms | 30.54 ms |
| 7d8c8bd+dirty | 406.06 ms | 460.88 ms | 54.81 ms |
| af33f3b+dirty | 417.68 ms | 448.04 ms | 30.37 ms |
| 1122a96+dirty | 510.16 ms | 542.00 ms | 31.84 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| 3a829f0+dirty | 48.30 MiB | 53.58 MiB | 5.28 MiB |
| a5d243c+dirty | 48.30 MiB | 53.54 MiB | 5.23 MiB |
| a858ac3+dirty | 49.74 MiB | 55.08 MiB | 5.34 MiB |
| f9c1ed4+dirty | 49.74 MiB | 54.86 MiB | 5.12 MiB |
| b9bebee+dirty | 48.30 MiB | 53.58 MiB | 5.28 MiB |
| 2bf6e2c+dirty | 50.56 MiB | 56.49 MiB | 5.93 MiB |
| a0d8cf8+dirty | 48.30 MiB | 53.49 MiB | 5.19 MiB |
| 7d8c8bd+dirty | 48.30 MiB | 53.54 MiB | 5.23 MiB |
| af33f3b+dirty | 49.74 MiB | 55.09 MiB | 5.35 MiB |
| 1122a96+dirty | 48.30 MiB | 53.54 MiB | 5.24 MiB |
6 tasks
This was referenced Sep 23, 2026
3 tasks
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#6764 is released Documents two native SDK options newly exposed in the React Native SDK via getsentry/sentry-react-native#6764: - **`enableNetworkBreadcrumbs`** (iOS, default `true`) — off-switch for the native per-HTTP-request breadcrumbs, which largely duplicate the JS `fetch`/`XHR` breadcrumbs. - **`enableNetworkEventBreadcrumbs`** (Android, default `true`) — off-switch for native network **connectivity/state** breadcrumbs (network available/lost, WiFi ↔ cellular, bandwidth/VPN). These track device network state, not HTTP requests, so they are distinct from the JS `fetch`/`XHR` breadcrumbs. Both are added to the **Hybrid SDK Options** section of the React Native options page, following the existing `<SdkOption>` prose/platform conventions. `availableSince` is intentionally omitted for now (the SDK release version isn't tagged yet); it can be added once the SDK PR lands and a version is cut. ## IS YOUR CHANGE URGENT? - [ ] Urgent deadline (GA date, etc.): YYYY-MM-DD - [ ] Other deadline: YYYY-MM-DD - [x] No deadline: Not urgent, can wait up to 1 week+ Blocked on the SDK PR (getsentry/sentry-react-native#6764) shipping in a release. ## PRE-MERGE CHECKLIST - [ ] 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) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📢 Type of change
📜 Description
Exposes two native SDK options that let apps turn off the native network breadcrumbs:
enableNetworkBreadcrumbs(iOS) — read by sentry-cocoa's options dictionary parser, so it needs only the JS type + JSDoc.enableNetworkEventBreadcrumbs(Android) — mapped explicitly inRNSentryStart.javatoSentryAndroidOptions.setEnableNetworkEventBreadcrumbs.Both default to
true(matching the native defaults); the JS wrapper forwards them to native automatically (only functions/JS-only keys are filtered out).💡 Motivation and Context
Part of #6747
💚 How did you test it?
📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps