Skip to content

feat: Propagate session replay frameRate, scale, and sampleRate in React Native#661

Merged
abelonogov-ld merged 7 commits into
mainfrom
andrey/rn-sampling
Jun 30, 2026
Merged

feat: Propagate session replay frameRate, scale, and sampleRate in React Native#661
abelonogov-ld merged 7 commits into
mainfrom
andrey/rn-sampling

Conversation

@abelonogov-ld

Copy link
Copy Markdown
Contributor

Summary

  • Expose frameRate, scale, minimumAlpha, and sampleRate on RN SessionReplayOptions and forward them through the iOS and Android native adapters.
  • Add client-side sampleRate to Android session replay (mirroring iOS), including sampling gating and skipping identify export when sampled out.
  • Add unit tests for JS passthrough, Android adapter mapping, and Android sampling logic.

Dependency

Merge and publish the Android library changes first (#660). This branch includes the same observability-android updates inline; after #660 lands, rebase and bump launchdarkly-observability-android in the RN podspec/Gradle dependency if needed.

Test plan

  • yarn test in react-native-ld-session-replay
  • ./gradlew :lib:testDebugUnitTest in observability-android
  • Verify createSessionReplayPlugin({ frameRate, scale, sampleRate }) on iOS and Android
  • Confirm sampled-out sessions (sampleRate: 0) do not record or export identify events

Made with Cursor

abelonogov-ld and others added 2 commits June 30, 2026 11:35
Gate identifySession on isRunning so sampled-out sessions do not send replay
identify payloads, matching tracks and collectors.

Co-authored-by: Cursor <cursoragent@cursor.com>
@abelonogov-ld abelonogov-ld requested a review from a team as a code owner June 30, 2026 18:46
@abelonogov-ld abelonogov-ld changed the title Propagate session replay frameRate, scale, and sampleRate in React Native feat:Propagate session replay frameRate, scale, and sampleRate in React Native Jun 30, 2026
@abelonogov-ld abelonogov-ld changed the title feat:Propagate session replay frameRate, scale, and sampleRate in React Native feat: Propagate session replay frameRate, scale, and sampleRate in React Native Jun 30, 2026
@abelonogov-ld abelonogov-ld enabled auto-merge (squash) June 30, 2026 20:52
@abelonogov-ld abelonogov-ld merged commit 3cf63ab into main Jun 30, 2026
22 checks passed
@abelonogov-ld abelonogov-ld deleted the andrey/rn-sampling branch June 30, 2026 21:00
abelonogov-ld pushed a commit that referenced this pull request Jun 30, 2026
🤖 I have created a release *beep* *boop*
---


<details><summary>session-replay-react-native: 0.16.0</summary>

##
[0.16.0](session-replay-react-native-0.15.0...session-replay-react-native-0.16.0)
(2026-06-30)


### Features

* Propagate session replay frameRate, scale, and sampleRate in React
Native
([#661](#661))
([3cf63ab](3cf63ab))
</details>

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Low Risk**
> Version and changelog-only changes with no runtime code in the diff;
feature risk was assessed in the merged #661 PR.
> 
> **Overview**
> Release Please bumps **`@launchdarkly/session-replay-react-native`**
from **0.15.0** to **0.16.0**.
> 
> The diff only updates release metadata:
`.release-please-manifest.json`, `package.json` version, and a new
**0.16.0** changelog entry. The shipped feature (from
[#661](#661),
not in this diff) is **propagating session replay `frameRate`, `scale`,
and `sampleRate`** from the React Native plugin into native iOS/Android
capture settings.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
ddee5de. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
abelonogov-ld added a commit that referenced this pull request Jun 30, 2026
* main: (39 commits)
  chore: release main (#666)
  feat: Propagate session replay frameRate, scale, and sampleRate in React Native (#661)
  ci: skip yarn test for .NET/Python/Ruby plugin-only changes (#664)
  chore: release main (#663)
  chore: Skip yarn test for Android and MAUI, Flutter PRs (#662)
  feat: client-side sampleRate to Android session replay (#660)
  chore: release main (#659)
  feat(observability-react-native): expose LDTracer with withSpan via getTracer() (#658)
  chore: release main (#657)
  feat(ruby): boot-time OTel auto-instrumentation; keep it working on Rails 7.0 (#643)
  feat: add GraphQL operation attributes to instrumented spans (#644)
  chore: release main (#656)
  feat(observability-react-native): accept plain nested dictionaries in track (#650)
  chore: release main (#655)
  fix: backendurl and otlpendpoind pass through (#648)
  feat(session-replay-react-native): support React Native legacy architecture (RN 0.75+) (#653)
  fix: MAUI - drop OTel activity instrumentation dependency (#651)
  chore: release main (#652)
  feat: supporting advanced trace cases (#645)
  chore: release main (#649)
  ...

# Conflicts:
#	sdk/@launchdarkly/flutter/packages/observability/ios/launchdarkly_flutter_observability.podspec
#	sdk/@launchdarkly/flutter/packages/observability/ios/launchdarkly_flutter_observability/Package.swift
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