Skip to content

feat: add slowRenderingDetection config option - #60

Merged
Archish27 merged 5 commits into
mainfrom
feat/slow-rendering-config
Nov 3, 2026
Merged

Archish27 merged 5 commits into
mainfrom
feat/slow-rendering-config

Conversation

@Archish27

@Archish27 Archish27 commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Summary

Adds a slowRenderingDetection config option. Set it to false to stop the native SDK sending slowRenders and frozenRenders spans on iOS and Android. Until now React Native apps had no way to turn these off, even though both native builders support it.

Leaving it unset keeps the current behaviour, so nothing changes for existing apps.

MiddlewareRum.init({
  // ...
  slowRenderingDetection: false,
});

Native settings are read once per process, so the app must relaunch for a change to apply. A JS reload is not enough.

Related

The bug fixes are in the iOS SDK: middleware-labs/middleware-ios#67. This PR does not depend on it, because disableSlowRenderingDetection() already exists in the iOS and Android versions pinned here. The podspec's ~> 2.3.0 picks up a 2.3.x iOS release on pod update.

Testing

  • Jest: all suites pass, including new tests that the option is passed to native when set and left out when unset.
  • tsc --noEmit and ESLint on the changed files are clean.
  • Not tested: the iOS and Android bridge changes were not compiled or run on a device. Both are a few lines each, so please check them in CI or the example app.

Release

This PR also bumps the package to 2.3.2 and moves [Unreleased] to [2.3.2] in CHANGELOG.md, which includes the iOS SDK changes from #62.

Merging does not publish anything. To release, run the npm-publish workflow on main with version 2.3.2 (no v). Update the changelog date first if it goes out after 2026-11-03.

Archish27 and others added 2 commits November 3, 2026 15:50
Let React Native apps turn off native slowRenders and frozenRenders
spans on iOS and Android. Leaving it unset keeps the current behaviour.
@Archish27
Archish27 merged commit 8ed1267 into main Nov 3, 2026
6 checks passed
@Archish27
Archish27 deleted the feat/slow-rendering-config branch November 3, 2026 11:52
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.

1 participant