Skip to content

fix(replay): Forward Session Replay network detail options to native SDKs#6373

Merged
antonis merged 8 commits into
mainfrom
fix/replay-forward-network-detail-options
Jun 30, 2026
Merged

fix(replay): Forward Session Replay network detail options to native SDKs#6373
antonis merged 8 commits into
mainfrom
fix/replay-forward-network-detail-options

Conversation

@antonis

@antonis antonis commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Enhances the network detail capture for Mobile Session Replay (added in #6288) by forwarding the network-detail options into the native SentryReplayOptions on both platforms

💡 Motivation and Context

Follow-up to #6288

💚 How did you test it?

CI checks and tests, Manual (example iOS, example Android)

Screenshot 2026-06-30 at 09 49 24

📝 Checklist

  • I added tests to verify changes
  • No new PII added or SDK only sends newly added PII if sendDefaultPii is enabled
    • Capture remains opt-in via networkDetailAllowUrls (empty by default); auth-like headers are always stripped in the JS layer.
  • I updated the docs if needed
  • I updated the wizard if needed
  • All tests passing (JS + Android local; iOS via CI)
  • No breaking changes

🔮 Next steps

antonis and others added 2 commits June 29, 2026 14:18
…SDKs

Network detail capture for Mobile Session Replay is implemented in the JS
layer (xhrUtils enriches breadcrumbs), but the rrweb options event that
tells the Sentry frontend to render request/response bodies and headers is
emitted by the native SDKs from their SentryReplayOptions. RN never forwarded
the network detail config to native, so SentryReplayOptions.networkDetailAllowUrls
stayed empty, networkDetailHasUrls was false, and the frontend never rendered
the captured details.

Forward networkDetailAllowUrls, networkDetailDenyUrls, networkCaptureBodies,
networkRequestHeaders and networkResponseHeaders from mobileReplayOptions into
the native SentryReplayOptions on both platforms. RegExp allow/deny patterns
can't cross the native bridge, so they are forwarded as their string source;
JS-side matching in xhrUtils keeps using the original RegExp values.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Jun 29, 2026

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(replay): Forward Session Replay network detail options to native SDKs by antonis in #6373
  • feat(core): Expose top-level Sentry.setAttribute / setAttributes by antonis in #6354
  • docs: Add AI Use section to CONTRIBUTING.md by christophaigner in #6374
  • feat(replay): Default networkCaptureBodies to true by alwx in #6372
  • chore(deps): bump getsentry/craft from 2.26.10 to 2.26.13 by dependabot in #6368
  • chore(deps): bump getsentry/github-workflows/danger from 17cc15eb58ea3687cd8f2714a4192dcee4aa09ef to 4013fc6e1aeb1be1f9d3b4d232624f0ec1afa613 by dependabot in #6366
  • chore(deps): bump getsentry/github-workflows/validate-pr from 71588ddf95134f804e82c5970a8098588e2eaecd to 4013fc6e1aeb1be1f9d3b4d232624f0ec1afa613 by dependabot in #6364
  • chore(deps): bump getsentry/craft/.github/workflows/changelog-preview.yml from 2.26.10 to 2.26.13 by dependabot in #6367
  • feat(core): Wire TurboModulePerfLogger on iOS and Android by alwx in #6307
  • chore(deps): bump actions/cache from 4 to 6 by dependabot in #6365
  • chore(deps): update CLI to v3.6.0 by github-actions in #6362
  • chore(deps): bump faraday from 1.10.5 to 1.10.6 in /samples/react-native by dependabot in #6363
  • chore(deps): update JavaScript SDK to v10.62.0 by github-actions in #6361
  • Expo Router ErrorBoundary auto wrapped by alwx in #6347
  • chore(ci): Move sample app iOS build jobs to GitHub Actions runners by itaybre in #6356
  • docs: Add missing 8.14.1 to changelog and SDK versions table by antonis in #6360
  • chore(deps): update Android SDK to v8.46.0 by github-actions in #6357
  • chore(ci): Move testflight and size-analysis iOS jobs to GitHub Actions macos-26 by itaybre in #6355
  • feat(core): Use native btoa for envelope base64 encoding by alwx in #6351

🤖 This preview updates automatically when you update the PR.

@antonis

antonis commented Jun 29, 2026

Copy link
Copy Markdown
Contributor Author

@sentry review

@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 47cb22d. Configure here.

@antonis antonis added the ready-to-merge Triggers the full CI test suite label Jun 29, 2026
Allow-list the Spaceflight News API host and enable networkCaptureBodies so
the sample exercises request/response detail rendering in the Replay network
tab via the existing News screen.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@sentry

sentry Bot commented Jun 29, 2026

Copy link
Copy Markdown

📲 Install Builds

Android

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

⚙️ sentry-react-native Build Distribution Settings

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

iOS (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 3830.59 ms 1220.91 ms -2609.68 ms
Size 4.98 MiB 6.51 MiB 1.53 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
f9c1ed4+dirty 3833.98 ms 1226.30 ms -2607.68 ms
a50b33d+dirty 1197.74 ms 1197.17 ms -0.57 ms
7436d0f+dirty 3851.58 ms 1232.21 ms -2619.38 ms
5a21b51+dirty 3823.11 ms 1214.46 ms -2608.65 ms
09a902f+dirty 3835.67 ms 1217.11 ms -2618.57 ms
ad66da3+dirty 3820.96 ms 1214.43 ms -2606.52 ms
eb93136+dirty 3843.09 ms 1220.11 ms -2622.98 ms
d2eadf8+dirty 3842.42 ms 1228.91 ms -2613.50 ms
1e5d96d+dirty 3851.45 ms 1212.05 ms -2639.41 ms
64630e5+dirty 3842.70 ms 1218.11 ms -2624.60 ms

App size

Revision Plain With Sentry Diff
f9c1ed4+dirty 4.98 MiB 6.50 MiB 1.53 MiB
a50b33d+dirty 3.38 MiB 4.73 MiB 1.35 MiB
7436d0f+dirty 5.15 MiB 6.70 MiB 1.54 MiB
5a21b51+dirty 5.15 MiB 6.67 MiB 1.51 MiB
09a902f+dirty 4.98 MiB 6.46 MiB 1.49 MiB
ad66da3+dirty 5.15 MiB 6.67 MiB 1.51 MiB
eb93136+dirty 5.15 MiB 6.69 MiB 1.53 MiB
d2eadf8+dirty 5.15 MiB 6.67 MiB 1.51 MiB
1e5d96d+dirty 4.98 MiB 6.46 MiB 1.49 MiB
64630e5+dirty 4.98 MiB 6.46 MiB 1.49 MiB

Previous results on branch: fix/replay-forward-network-detail-options

Startup times

Revision Plain With Sentry Diff
20db9ee+dirty 3849.84 ms 1221.21 ms -2628.63 ms

App size

Revision Plain With Sentry Diff
20db9ee+dirty 4.98 MiB 6.51 MiB 1.53 MiB

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

iOS (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 3846.06 ms 1219.77 ms -2626.30 ms
Size 4.98 MiB 6.51 MiB 1.53 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
f9c1ed4+dirty 3842.09 ms 1220.70 ms -2621.40 ms
1122a96+dirty 3839.17 ms 1219.23 ms -2619.93 ms
23598c3+dirty 1223.59 ms 1229.13 ms 5.53 ms
3ce5254+dirty 1217.70 ms 1224.69 ms 6.99 ms
68672fc+dirty 3832.22 ms 1228.29 ms -2603.93 ms
04207c4+dirty 1228.55 ms 1226.04 ms -2.51 ms
88735e9+dirty 3837.80 ms 1216.39 ms -2621.41 ms
09a902f+dirty 3847.65 ms 1221.31 ms -2626.34 ms
7ac3378+dirty 1202.35 ms 1198.31 ms -4.04 ms
d2eadf8+dirty 3841.53 ms 1216.15 ms -2625.39 ms

App size

Revision Plain With Sentry Diff
f9c1ed4+dirty 4.98 MiB 6.50 MiB 1.53 MiB
1122a96+dirty 5.15 MiB 6.68 MiB 1.53 MiB
23598c3+dirty 3.38 MiB 4.80 MiB 1.42 MiB
3ce5254+dirty 3.38 MiB 4.76 MiB 1.38 MiB
68672fc+dirty 5.15 MiB 6.71 MiB 1.55 MiB
04207c4+dirty 3.38 MiB 4.76 MiB 1.38 MiB
88735e9+dirty 4.98 MiB 6.46 MiB 1.49 MiB
09a902f+dirty 4.98 MiB 6.46 MiB 1.49 MiB
7ac3378+dirty 3.38 MiB 4.76 MiB 1.38 MiB
d2eadf8+dirty 5.15 MiB 6.67 MiB 1.51 MiB

Previous results on branch: fix/replay-forward-network-detail-options

Startup times

Revision Plain With Sentry Diff
20db9ee+dirty 3826.16 ms 1211.90 ms -2614.26 ms

App size

Revision Plain With Sentry Diff
20db9ee+dirty 4.98 MiB 6.51 MiB 1.53 MiB

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Android (new) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 413.30 ms 447.42 ms 34.12 ms
Size 49.74 MiB 55.08 MiB 5.34 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
4b87b12+dirty 356.23 ms 399.86 ms 43.63 ms
5a21b51+dirty 505.16 ms 539.20 ms 34.04 ms
d038a14+dirty 405.08 ms 444.36 ms 39.28 ms
5257d80+dirty 472.37 ms 494.54 ms 22.17 ms
a50b33d+dirty 353.21 ms 398.48 ms 45.27 ms
5a23c47+dirty 406.83 ms 451.47 ms 44.64 ms
acd838e+dirty 492.90 ms 551.42 ms 58.52 ms
2c735cc+dirty 435.20 ms 459.48 ms 24.28 ms
5ee78d6+dirty 411.18 ms 437.83 ms 26.65 ms
3a829f0+dirty 410.78 ms 454.22 ms 43.44 ms

App size

Revision Plain With Sentry Diff
4b87b12+dirty 43.94 MiB 49.00 MiB 5.06 MiB
5a21b51+dirty 48.30 MiB 53.49 MiB 5.19 MiB
d038a14+dirty 48.30 MiB 53.49 MiB 5.19 MiB
5257d80+dirty 48.30 MiB 53.58 MiB 5.28 MiB
a50b33d+dirty 43.94 MiB 48.94 MiB 5.00 MiB
5a23c47+dirty 49.74 MiB 54.82 MiB 5.07 MiB
acd838e+dirty 48.30 MiB 53.60 MiB 5.30 MiB
2c735cc+dirty 43.94 MiB 48.94 MiB 5.00 MiB
5ee78d6+dirty 48.30 MiB 53.58 MiB 5.28 MiB
3a829f0+dirty 48.30 MiB 53.58 MiB 5.28 MiB

Previous results on branch: fix/replay-forward-network-detail-options

Startup times

Revision Plain With Sentry Diff
20db9ee+dirty 435.06 ms 459.09 ms 24.02 ms

App size

Revision Plain With Sentry Diff
20db9ee+dirty 49.74 MiB 55.08 MiB 5.34 MiB

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

Android (legacy) Performance metrics 🚀

  Plain With Sentry Diff
Startup time 412.92 ms 446.44 ms 33.52 ms
Size 49.74 MiB 55.08 MiB 5.34 MiB

Baseline results on branch: main

Startup times

Revision Plain With Sentry Diff
5569641+dirty 406.43 ms 428.51 ms 22.08 ms
3d377b5+dirty 406.18 ms 453.52 ms 47.34 ms
3b6e9f9+dirty 442.70 ms 486.44 ms 43.74 ms
b04af96+dirty 496.48 ms 557.88 ms 61.40 ms
68ae91b+dirty 416.44 ms 477.56 ms 61.12 ms
f3215d3+dirty 411.11 ms 454.38 ms 43.27 ms
0d9949d+dirty 403.57 ms 437.00 ms 33.43 ms
6176a94+dirty 410.90 ms 452.20 ms 41.31 ms
4b87b12+dirty 421.82 ms 413.60 ms -8.22 ms
a50b33d+dirty 500.81 ms 532.11 ms 31.30 ms

App size

Revision Plain With Sentry Diff
5569641+dirty 48.30 MiB 53.48 MiB 5.18 MiB
3d377b5+dirty 43.75 MiB 48.14 MiB 4.39 MiB
3b6e9f9+dirty 48.30 MiB 53.54 MiB 5.23 MiB
b04af96+dirty 49.74 MiB 55.00 MiB 5.26 MiB
68ae91b+dirty 49.74 MiB 54.79 MiB 5.05 MiB
f3215d3+dirty 48.30 MiB 53.49 MiB 5.19 MiB
0d9949d+dirty 43.75 MiB 48.13 MiB 4.37 MiB
6176a94+dirty 48.30 MiB 53.54 MiB 5.24 MiB
4b87b12+dirty 43.75 MiB 48.14 MiB 4.39 MiB
a50b33d+dirty 43.75 MiB 48.08 MiB 4.33 MiB

Previous results on branch: fix/replay-forward-network-detail-options

Startup times

Revision Plain With Sentry Diff
20db9ee+dirty 472.58 ms 544.46 ms 71.88 ms

App size

Revision Plain With Sentry Diff
20db9ee+dirty 49.74 MiB 55.08 MiB 5.34 MiB

@romtsn romtsn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nice!

@antonis antonis left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Noting that the failed Sample Application / Test android production REV2 is unrelated with the changes on this PR and will be fixed with #6378

@antonis antonis merged commit a216cb9 into main Jun 30, 2026
114 of 116 checks passed
@antonis antonis deleted the fix/replay-forward-network-detail-options branch June 30, 2026 11:10
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