feat: session replay control with sampling and state management#200
Merged
Conversation
- Added `isRunning` property to track the current state of session replay. - Updated `start` method to accept an `ignoreSampling` parameter for debugging purposes. - Refactored `isEnabled` to manage session replay state more effectively. - Improved documentation for session replay options, including sampling behavior.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 46e6e21. Configure here.
Vadman97
approved these changes
May 27, 2026
abelonogov-ld
pushed a commit
that referenced
this pull request
May 28, 2026
🤖 I have created a release *beep* *boop* --- ## [0.36.0](0.35.0...0.36.0) (2026-05-28) ### Features * session replay control with sampling and state management ([#200](#200)) ([0fc7e85](0fc7e85)) * **session-replay:** embed sessionId at creation time in push event payloads ([#189](#189)) ([cafefbf](cafefbf)) --- 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** > Mechanical version and changelog updates with no runtime code changes in this PR. > > **Overview** > Bumps the monorepo release from **0.35.0** to **0.36.0** across Release Please (`release-please-manifest.json`), **CHANGELOG** (new `0.36.0` section), CocoaPods specs (`LaunchDarklyObservability`, `LaunchDarklySessionReplay`), and `sdkVersion` in `Version.swift`. > > The changelog entries for this release (not modified in this diff beyond being added) document **session replay control** (sampling and state management) and **sessionId embedded at push event creation** for session replay payloads. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit fd5aad6. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

isRunningproperty to track the current state of session replay.startmethod to accept anignoreSamplingparameter for debugging purposes.isEnabledto manage session replay state more effectively.Note
Medium Risk
Changes when replay captures run (sampling) and public start/stop semantics; default sampleRate preserves prior always-on behavior but integrators must handle sampledOut and isRunning vs isEnabled.
Overview
Adds probabilistic session replay via a new
sampleRateonSessionReplayOptions(default1.0). Enabling replay or callingstart()no longer guarantees capture: the service may returnsampledOutand stay off untilstop()resets the sampling decision.SessionReplayStartResultandisRunningseparate “enabled / attempted” from “actually recording.”start(ignoreSampling:)can force capture for debugging.LDReplayand theSessionReplayplugin now expose synchronous@MainActorstart/stopwith a discardable result instead of fire-and-forgetTaskwrappers.README documents sampling, result handling, and the debug bypass.
Reviewed by Cursor Bugbot for commit 9d48b9b. Bugbot is set up for automated code reviews on this repo. Configure here.