docs(android): Document manual Session Replay controls - #19077
Open
romtsn wants to merge 1 commit into
Open
Conversation
Explain how to start full-session or buffered recording. Document how pause, resume, stop, and flush affect the active replay. Describe manual startup with zero sample rates and the remaining on-error sampling behavior. Refs JAVA-691 Co-Authored-By: OpenAI Codex <noreply@openai.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
romtsn
marked this pull request as ready for review
August 19, 2026 13:44
0xadam-brown
approved these changes
Aug 21, 2026
runningcode
reviewed
Aug 24, 2026
runningcode
left a comment
Contributor
There was a problem hiding this comment.
LGTM, just some questions for my understanding!
|
|
||
| ## Disable Automatic Replay Sampling | ||
|
|
||
| If Session Replay should start only after user consent or an app-specific condition, set both sample rates to `0.0` during initialization. This disables automatic session and error recording while keeping the Session Replay integration available for manual control. |
Contributor
There was a problem hiding this comment.
can we make this active voice? like
Suggested change
| If Session Replay should start only after user consent or an app-specific condition, set both sample rates to `0.0` during initialization. This disables automatic session and error recording while keeping the Session Replay integration available for manual control. | |
| To configure Session Replay to start only after user consent or an app-specific condition, set both sample rates to `0.0` during initialization. This disables automatic session and error recording while keeping the Session Replay integration available for manual control. |
|
|
||
| ### Pause Recording on Sensitive Screens | ||
|
|
||
| Pause recording before showing sensitive content, such as a PIN entry screen, and resume it after the content is hidden. A manually paused replay stays paused across app background and foreground transitions until you call `resume()`. Calling `resume()` when replay is stopped does nothing. |
Contributor
There was a problem hiding this comment.
should we add that you need to call start instead of resume here?
Suggested change
| Pause recording before showing sensitive content, such as a PIN entry screen, and resume it after the content is hidden. A manually paused replay stays paused across app background and foreground transitions until you call `resume()`. Calling `resume()` when replay is stopped does nothing. | |
| Pause recording before showing sensitive content, such as a PIN entry screen, and resume it after the content is hidden. A manually paused replay stays paused across app background and foreground transitions until you call `resume()`. Calling `resume()` when replay is stopped does nothing. Instead, call `start()` to start a new replay. |
|
|
||
| ### Stop or Flush Recording | ||
|
|
||
| Call `stop()` to end the current replay. A later call to `start()` or `startBuffering()` creates a new replay session. |
Contributor
There was a problem hiding this comment.
when is it sent up if flush() is never called?
coolguyzone
reviewed
Aug 24, 2026
| </application> | ||
| ``` | ||
|
|
||
| Explicit calls to `Sentry.replay().start()` and `Sentry.replay().startBuffering()` bypass these sample rates when starting recording. With `onErrorSampleRate` set to `0.0`, call `flush()` to send a manually started buffer. See [Manual Control](/platforms/android/session-replay/#manual-control) for the complete API behavior. |
Contributor
There was a problem hiding this comment.
Suggested change
| Explicit calls to `Sentry.replay().start()` and `Sentry.replay().startBuffering()` bypass these sample rates when starting recording. With `onErrorSampleRate` set to `0.0`, call `flush()` to send a manually started buffer. See [Manual Control](/platforms/android/session-replay/#manual-control) for the complete API behavior. | |
| Explicit calls to `Sentry.replay().start()` and `Sentry.replay().startBuffering()` bypass these sample rates. With `onErrorSampleRate` set to `0.0`, call `flush()` to send a manually started buffer. See [Manual Control](/platforms/android/session-replay/#manual-control) for the complete API behavior. |
coolguyzone
reviewed
Aug 24, 2026
| Choose the recording mode that fits your use case: | ||
|
|
||
| - `start()` starts a full-session replay. | ||
| - `startBuffering()` keeps a rolling buffer of up to 30 seconds. The SDK sends the buffer when an error is sampled or you call `flush()`, then continues recording in session mode. |
Contributor
There was a problem hiding this comment.
Suggested change
| - `startBuffering()` keeps a rolling buffer of up to 30 seconds. The SDK sends the buffer when an error is sampled or you call `flush()`, then continues recording in session mode. | |
| - `startBuffering()` keeps a rolling buffer of up to 30 seconds. The SDK sends the buffer when either an error is sampled or you call `flush()`, then continues recording in session mode. |
coolguyzone
reviewed
Aug 24, 2026
| Sentry.replay().stop(); | ||
| ``` | ||
|
|
||
| Call `flush()` to send the current replay data without stopping recording. In session mode, it sends the pending segment and continues recording. In buffer mode, it sends the buffer and switches to session mode. Calling `flush()` while recording is stopped starts a new full-session replay. |
Contributor
There was a problem hiding this comment.
Suggested change
| Call `flush()` to send the current replay data without stopping recording. In session mode, it sends the pending segment and continues recording. In buffer mode, it sends the buffer and switches to session mode. Calling `flush()` while recording is stopped starts a new full-session replay. | |
| Call `flush()` to send the current replay data without stopping the recording. In session mode, it sends the pending segment and continues recording. In buffer mode, it sends the buffer and switches to session mode. Calling `flush()` while recording is stopped starts a new full-session replay. |
coolguyzone
approved these changes
Aug 24, 2026
coolguyzone
left a comment
Contributor
There was a problem hiding this comment.
Looks good, thanks for updating.
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.
DESCRIBE YOUR PR
Document manual Session Replay control for Android, including:
0.0This gives Android developers the same manual lifecycle guidance available for the JavaScript SDK while documenting Android-specific behavior such as the 30-second buffer and persistent manual pause.
Depends on getsentry/sentry-java#5978.
Refs JAVA-691
IS YOUR CHANGE URGENT?
Help us prioritize incoming PRs by letting us know when the change needs to go live.
SLA
Thanks in advance for your help!
PRE-MERGE CHECKLIST