Skip to content

feat(core): Expose native network breadcrumb options - #6764

Merged
antonis merged 4 commits into
mainfrom
feat/expose-network-breadcrumb-options
Sep 23, 2026
Merged

antonis merged 4 commits into
mainfrom
feat/expose-network-breadcrumb-options

Conversation

@antonis

@antonis antonis commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 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 in RNSentryStart.java to SentryAndroidOptions.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?

  • Added tests

📝 Checklist

🔮 Next steps

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>
@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 network breadcrumb options by antonis in #6764
  • 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.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@antonis antonis added the ready-to-merge Triggers the full CI test suite label Sep 22, 2026
@github-actions

github-actions Bot commented Sep 22, 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 2cade1b

@sentry

sentry Bot commented Sep 22, 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

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 416.65 ms 436.38 ms 19.74 ms
Size 50.56 MiB 56.49 MiB 5.93 MiB

Baseline results on branch: main

Startup times

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

@github-actions

github-actions Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 3855.22 ms 1229.94 ms -2625.28 ms
Size 5.15 MiB 6.90 MiB 1.75 MiB

Baseline results on branch: main

Startup times

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>

@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 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
antonis marked this pull request as ready for review September 22, 2026 10:54
@antonis
antonis requested review from a team, alwx and lucas-zimerman as code owners September 22, 2026 10:54
@github-actions

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 3871.53 ms 1241.45 ms -2630.08 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 (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 469.04 ms 537.59 ms 68.55 ms
Size 50.56 MiB 56.49 MiB 5.93 MiB

Baseline results on branch: main

Startup times

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

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

@antonis
antonis merged commit 6bc1396 into main Sep 23, 2026
91 checks passed
@antonis
antonis deleted the feat/expose-network-breadcrumb-options branch September 23, 2026 06:48
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>
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