Skip to content

Commit

Permalink
chore(android): errorSampleRate changed to onErrorSampleRate (#11602)
Browse files Browse the repository at this point in the history
  • Loading branch information
romtsn authored Oct 17, 2024
1 parent 5d6caaf commit c0bceab
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/platforms/android/session-replay/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -63,34 +63,34 @@ SentryAndroid.init(context) { options ->
options.isDebug = true

// Currently under experimental options:
options.experimental.sessionReplay.errorSampleRate = 1.0
options.experimental.sessionReplay.onErrorSampleRate = 1.0
options.experimental.sessionReplay.sessionSampleRate = 1.0
}
```

```XML {filename:AndroidManifest.xml}
<meta-data android:name="io.sentry.session-replay.error-sample-rate" android:value="1.0" />
<meta-data android:name="io.sentry.session-replay.on-error-sample-rate" android:value="1.0" />
<meta-data android:name="io.sentry.session-replay.session-sample-rate" android:value="1.0" />
```

## Verify

While you're testing, we recommend that you set `sessionSampleRate` to `1.0`. This ensures that every user session will be sent to Sentry.

Once testing is complete, **we recommend lowering this value in production**. We still recommend keeping `errorSampleRate` set to `1.0`.
Once testing is complete, **we recommend lowering this value in production**. We still recommend keeping `onErrorSampleRate` set to `1.0`.

## Sampling

Sampling allows you to control how much of your website's traffic will result in a Session Replay. There are two sample rates you can adjust to get the replays relevant to you:

1. `sessionSampleRate` - The sample rate for
replays that begin recording immediately and last the entirety of the user's session.
2. `errorSampleRate` - The sample rate for
2. `onErrorSampleRate` - The sample rate for
replays that are recorded when an error happens. This type of replay will record
up to a minute of events prior to the error and continue recording until the session
ends.

Sampling begins as soon as a session starts. `sessionSampleRate` is evaluated first. If it's sampled, the replay recording will begin. Otherwise, `errorSampleRate` is evaluated and if it's sampled, the integration will begin buffering the replay and will only upload it to Sentry if an error occurs. The remainder of the replay will behave similarly to a whole-session replay.
Sampling begins as soon as a session starts. `sessionSampleRate` is evaluated first. If it's sampled, the replay recording will begin. Otherwise, `onErrorSampleRate` is evaluated and if it's sampled, the integration will begin buffering the replay and will only upload it to Sentry if an error occurs. The remainder of the replay will behave similarly to a whole-session replay.

## Privacy

Expand Down

0 comments on commit c0bceab

Please sign in to comment.