Skip to content

feat(replay): Default networkCaptureBodies to true#6372

Merged
alwx merged 4 commits into
mainfrom
alwx/flip-replay-capture-bodies-default
Jun 29, 2026
Merged

feat(replay): Default networkCaptureBodies to true#6372
alwx merged 4 commits into
mainfrom
alwx/flip-replay-capture-bodies-default

Conversation

@alwx

@alwx alwx commented Jun 29, 2026

Copy link
Copy Markdown
Contributor

📢 Type of change

  • Bugfix
  • New feature
  • Enhancement
  • Refactoring

📜 Description

Flip the default of mobileReplayIntegration({ networkCaptureBodies }) from false to true so the React Native SDK matches the iOS and Android native SDK defaults.

💚 How did you test it?

  • All existing tests pass.

📝 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
  • No breaking changes

🔮 Next steps

alwx added 2 commits June 29, 2026 12:35
… parity

Flip the default of `mobileReplayIntegration({ networkCaptureBodies })`\nfrom `false` to `true` so the React Native SDK matches the iOS and\nAndroid native SDKs out of the box.\n\nThe original opt-in default was conservative because body capture can\ncarry sensitive payloads, but the opt-in step is already covered by\n`networkDetailAllowUrls`: bodies are only recorded for URLs the user\nexplicitly lists there (empty by default). Splitting that into a\nseparate `networkCaptureBodies` flag duplicated the gate and put us\nout of step with the native defaults, which has been confusing for\nusers expecting bodies to flow once they allow-listed a URL.\n\nUsers who want to keep header-only capture for allow-listed URLs can\nset `networkCaptureBodies: false` explicitly.\n\nJSDoc updated to describe the new behaviour and the fact that the\nallow-list is the real opt-in. All existing tests still pass.
@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(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.

@github-actions

github-actions Bot commented Jun 29, 2026

Copy link
Copy Markdown
Contributor
Fails
🚫 Pull request is not ready for merge, please add the "ready-to-merge" label to the pull request
Messages
📖 Do not forget to update Sentry-docs with your feature once the pull request gets approved.

Generated by 🚫 dangerJS against 94860f1

Comment thread packages/core/src/js/replay/mobilereplay.ts
@alwx alwx marked this pull request as ready for review June 29, 2026 10:46

@antonis antonis left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The changes LGTM after the changelog is fixed

Comment thread CHANGELOG.md Outdated

### Changes

- Default `mobileReplayIntegration({ networkCaptureBodies })` to `true`, matching the iOS and Android native SDK defaults. Bodies are still only recorded for URLs explicitly listed in `networkDetailAllowUrls` (empty by default); the previous opt-in step is now part of the allow-list, not a separate flag. Set `networkCaptureBodies: false` to keep header-only capture for allow-listed URLs. ([#6372](https://github.com/getsentry/sentry-react-native/pull/6372))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Let's also try a shorter entry if you agree

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@alwx alwx requested a review from antonis June 29, 2026 14:28
@alwx alwx merged commit 74b3df5 into main Jun 29, 2026
59 of 65 checks passed
@alwx alwx deleted the alwx/flip-replay-capture-bodies-default branch June 29, 2026 14:36
alwx added a commit to getsentry/sentry-docs that referenced this pull request Jun 30, 2026
…#18580)

## DESCRIBE YOUR PR

Update the React Native [Network
Details](https://docs.sentry.io/platforms/react-native/session-replay/#network-details)
section to reflect
[getsentry/sentry-react-native#6372](getsentry/sentry-react-native#6372),
which flips the `mobileReplayIntegration({ networkCaptureBodies })`
default from `false` to `true` so RN matches the iOS and Android native
SDK defaults.

## IS YOUR CHANGE URGENT?

- [ ] Urgent deadline (GA date, etc.): <!-- ENTER DATE HERE -->
- [ ] Other deadline: <!-- ENTER DATE HERE -->
- [x] None: Not urgent, can wait up to 1 week+

Pair with the SDK release that ships
[#6372](getsentry/sentry-react-native#6372).

## 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
added an urgent due date to it.
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)

## LEGAL BOILERPLATE

Look, I get it. The entity doing business as "Sentry" was incorporated
in the State of Delaware in 2015 as Functional Software, Inc. and is
gonna need some rights from me in order to utilize my contributions in
this here PR. So here's the deal: I retain all rights, title and
interest in and to my contributions, and by keeping this boilerplate
intact I confirm that Sentry can use, modify, copy, and redistribute my
contributions, under Sentry's choice of terms.

## EXTRA RESOURCES

- [Sentry Docs contributor guide](https://docs.sentry.io/contributing/)

Co-authored-by: Aleksandr Pantiukhov <911127+alwx@users.noreply.github.com>
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