Skip to content

Commit

Permalink
DOC-319 fix config
Browse files Browse the repository at this point in the history
  • Loading branch information
markzegarelli committed Oct 30, 2024
1 parent 2c89fd0 commit a37fded
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,19 @@ The Sample Rate in these code sample is set to `1.0`. This ensures Amplitude cap

Pass the following options when you initialize the Session Replay plugin:

{{partial:partials/session-replay/sr-android-config}}
| Name | Type | Required | Default | Description |
| --------- |-----------| -------- |-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `sampleRate` | `Number` | No | `0.0` | Use this option to control how many sessions to select for replay collection. <br></br>The number should be a decimal between 0 and 1, for example `0.4`, representing the fraction of sessions to have randomly selected for replay collection. Over a large number of sessions, `0.4` would select `40%` of those sessions. |
| `enableRemoteConfig` | `boolean` | No | `true` | Enables or disables [remote configuration ](#remote-configuration) for this instance of Session Replay. |

### Remote configuration

Enable remote configuration to set Sample Rate and Masking Level in Amplitude.

{{partial:admonition type="note" heading="Remote configuration and testing"}}
When you enable remote configuration, settings you define in Amplitude take precedence over settings you define locally in the SDK. As a result, while testing your application, Amplitude recommends that you **disable** remote configuration to ensure you can set `sampleRate` to `1`, and ensure you capture test sessions.
{{/partial:admonition}}


{{partial:partials/session-replay/sr-android-mask-data}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,24 @@ sessionReplay.flush()

Pass the following configuration options when you initialize the Session Replay SDK.

{{partial:partials/session-replay/sr-android-config}}

| Name | Type | Required | Default | Description |
| --------- |-----------| -------- |-----------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `deviceId` | `String` | Yes | `null` | Sets an identifier for the device running your application. |
| `sessionId` | `Long` | Yes | `null` | Sets an identifier for the users current session. The value must be in milliseconds since epoch (Unix Timestamp). |
| `sampleRate` | `Number` | No | `0.0` | Use this option to control how many sessions to select for replay collection. <br></br>The number should be a decimal between 0 and 1, for example `0.4`, representing the fraction of sessions to have randomly selected for replay collection. Over a large number of sessions, `0.4` would select `40%` of those sessions. |
| `optOut` | `Boolean` | No | `false` | Sets permission to collect replays for sessions. Setting a value of true prevents Amplitude from collecting session replays. |
| `logger` | `Logger` | No | `LogcatLogger` | Sets a custom `logger` class from the Logger to emit log messages to desired destination. Set to `null` to disable logging. |
| `serverZone` | `ServerZone` | No | `ServerZone.US` | `ServerZone.EU` or `ServerZone.US`. Sets the Amplitude server zone. Set this to EU for Amplitude projects created in EU data center.
| `enableRemoteConfig` | `boolean` | No | `true` | Enables or disables [remote configuration ](#remote-configuration) for this instance of Session Replay. |

### Remote configuration

Enable remote configuration to set Sample Rate and Masking Level in Amplitude.

{{partial:admonition type="note" heading="Remote configuration and testing"}}
When you enable remote configuration, settings you define in Amplitude take precedence over settings you define locally in the SDK. As a result, while testing your application, Amplitude recommends that you **disable** remote configuration to ensure you can set `sampleRate` to `1`, and ensure you capture test sessions.
{{/partial:admonition}}


{{partial:partials/session-replay/sr-android-mask-data}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,19 @@ amplitude.initializeApiKey(API_KEY)

Pass the following option when you initialize the Session Replay plugin:

{{partial:partials/session-replay/sr-ios-config}}
| Name | Type | Required | Default | Description |
| --------------------- | --------- | -------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `sampleRate` | `number` | No | `0` | Use this option to control how many sessions to select for replay collection. The number should be a decimal between 0 and 1, for example `0.4`, representing the fraction of sessions to have randomly selected for replay collection. Over a large number of sessions, `0.4` would select `40%` of those sessions. |
| `enableRemoteConfig` | `boolean` | No | `true` | Enables or disables [remote configuration ](#remote-configuration) for this instance of Session Replay. |

### Remote configuration

Enable remote configuration to set Sample Rate and Masking Level in Amplitude.

{{partial:admonition type="note" heading="Remote configuration and testing"}}
When you enable remote configuration, settings you define in Amplitude take precedence over settings you define locally in the SDK. As a result, while testing your application, Amplitude recommends that you **disable** remote configuration to ensure you can set `sampleRate` to `1`, and ensure you capture test sessions.
{{/partial:admonition}}


{{partial:partials/session-replay/sr-ios-mask-data}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,25 @@ sessionReplay.deviceId = ThirdPartyAnalytics.getDeviceId()

Pass the following configuration options when you initialize the Session Replay SDK.

{{partial:partials/session-replay/sr-ios-config}}
| Name | Type | Required | Default | Description |
| --------------------- | --------- | -------- | ---------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `apiKey` | `String` | No | `null` | Sets the Amplitude API Key. |
| `deviceId` | `string` | Yes | `undefined` | Sets an identifier for the device running your application. |
| `sessionId` | `number` | Yes | `undefined` | Sets an identifier for the users current session. The value must be in milliseconds since epoch (Unix Timestamp). |
| `sampleRate` | `number` | No | `0` | Use this option to control how many sessions to select for replay collection. The number should be a decimal between 0 and 1, for example `0.4`, representing the fraction of sessions to have randomly selected for replay collection. Over a large number of sessions, `0.4` would select `40%` of those sessions. |
| `optOut` | `boolean` | No | `false` | Sets permission to collect replays for sessions. Setting a value of true prevents Amplitude from collecting session replays. |
| `logger` | `Logger` | No | `ConsoleLogger` | Sets a custom `logger` class from the Logger to emit log messages to desired destination. Set to `null` to disable logging. |
| `serverZone` | `string` | No | `US` | EU or US. Sets the Amplitude server zone. Set this to EU for Amplitude projects created in EU data center. |
| `enableRemoteConfig` | `boolean` | No | `true` | Enables or disables [remote configuration ](#remote-configuration) for this instance of Session Replay. |
| `serverUrl` | `string` | No | `null` | Explicitly set the server URL. Use this setting for proxy configuration. |

### Remote configuration

Enable remote configuration to set Sample Rate and Masking Level in Amplitude.

{{partial:admonition type="note" heading="Remote configuration and testing"}}
When you enable remote configuration, settings you define in Amplitude take precedence over settings you define locally in the SDK. As a result, while testing your application, Amplitude recommends that you **disable** remote configuration to ensure you can set `sampleRate` to `1`, and ensure you capture test sessions.
{{/partial:admonition}}

{{partial:partials/session-replay/sr-ios-mask-data}}

Expand Down

0 comments on commit a37fded

Please sign in to comment.