Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RUM-7315: Add documentation for Android Session Replay Jetpack Compose Setup #26446

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,18 @@
implementation("com.datadoghq:dd-sdk-android-session-replay:[datadog_version]")
// in case you need Material support
implementation("com.datadoghq:dd-sdk-android-session-replay-material:[datadog_version]")
// in case you need Jetpack Compose support
implementation("com.datadoghq:dd-sdk-android-session-replay-compose:[datadog_version]")
{{< /code-block >}}

3. Enable Session Replay in your app:

{{< code-block lang="kotlin" filename="Application.kt" disable_copy="false" collapsible="true" >}}
val sessionReplayConfig = SessionReplayConfiguration.Builder([sampleRate])
// in case you need Material extension support
.addExtensionSupport(MaterialExtensionSupport())
.addExtensionSupport(MaterialExtensionSupport())
// in case you need Jetpack Compose support
.addExtensionSupport(ComposeExtensionSupport)
.build()
SessionReplay.enable(sessionReplayConfig)
{{< /code-block >}}
Expand Down Expand Up @@ -186,7 +190,7 @@
## Additional configuration
### Set the sample rate for recorded sessions to appear

The sample rate is an optional parameter in the Session Replay configuration. It must be a number between 0.0 and 100.0, where 0 indicates that no replays are recorded and 100 means that all RUM sessions include a replay. If the sample rate is not specified in the configuration, the default value of 100 is applied.
The sample rate is an optional parameter in the Session Replay configuration. It must be a number between 0.0 and 100.0, where 0 indicates that no replays are recorded and 100 means that all RUM sessions include a replay. If the sample rate is not specified in the configuration, the default value of 100 is applied.

Check notice on line 193 in content/en/real_user_monitoring/session_replay/mobile/setup_and_configuration.md

View workflow job for this annotation

GitHub Actions / vale

Datadog.sentencelength

Suggestion: Try to keep your sentence length to 25 words or fewer.

This sample rate is applied in addition to the RUM sample rate. For example, if RUM uses a sample rate of 80% and Session Replay uses a sample rate of 20%, it means that out of all user sessions, 80% are included in RUM, and within those sessions, only 20% have replays.

Expand Down Expand Up @@ -231,7 +235,7 @@
val sessionReplayConfig = SessionReplayConfiguration.Builder([sampleRate])
.startRecordingImmediately(false)
.build()
// Do something
// Do something
SessionReplay.startRecording()
SessionReplay.stopRecording()
{{< /code-block >}}
Expand All @@ -245,7 +249,7 @@
replaySampleRate: sampleRate,
startRecordingImmediately: false
)
// Do something
// Do something
SessionReplay.startRecording()
SessionReplay.stopRecording()
{{< /code-block >}}
Expand Down Expand Up @@ -301,4 +305,4 @@
{{< partial name="whats-next/whats-next.html" >}}

[1]: /real_user_monitoring/mobile_and_tv_monitoring/web_view_tracking
[2]: /real_user_monitoring/session_replay/mobile/privacy_options
[2]: /real_user_monitoring/session_replay/mobile/privacy_options
Loading