Skip to content

docs: add sampleRate config for Android and iOS session replay#15365

Open
marandaneto wants to merge 1 commit intomasterfrom
docs/add-sample-rate-mobile-sdks
Open

docs: add sampleRate config for Android and iOS session replay#15365
marandaneto wants to merge 1 commit intomasterfrom
docs/add-sample-rate-mobile-sdks

Conversation

@marandaneto
Copy link
Member

Changes

Add documentation for the sampleRate session replay configuration option for mobile SDKs.

  • Android: sessionReplayConfig.sampleRate — requires SDK v3.34.0+, default null
  • iOS: config.sessionReplayConfig.sampleRate — requires SDK v3.42.0+, default nil

The value is a Double between 0.0 and 1.0 that determines the percentage of sessions to record (e.g., 0.5 = 50%). When not set, no client-side sampling is applied and server-side settings apply.

Related PRs

Add documentation for the sampleRate session replay configuration option:
- Android: requires SDK v3.34.0+, default null
- iOS: requires SDK v3.42.0+, default nil
- Value range: 0.0 to 1.0 (percentage of sessions to record)
@github-actions
Copy link
Contributor

github-actions bot commented Feb 27, 2026

Deploy preview

Status Details Updated (UTC)
🟢 Ready View preview Feb 27, 2026 09:47AM

@marandaneto marandaneto requested a review from a team February 27, 2026 09:36
@github-actions
Copy link
Contributor

Vale prose linter → found 0 errors, 9 warnings, 0 suggestions in your markdown

Full report → Copy the linter results into an LLM to batch-fix issues.

Linter being weird? Update the rules!

contents/docs/session-replay/_snippets/android-installation.mdx — 0 errors, 5 warnings, 0 suggestions
Line Severity Message Rule
11:3 warning Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. PostHogBase.ProductNames
55:24 warning Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. PostHogBase.ProductNames
66:3 warning 'Jetpack' is a possible misspelling. PostHogBase.Spelling
74:44 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
76:7 warning Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. PostHogBase.ProductNames
contents/docs/session-replay/_snippets/ios-installation.mdx — 0 errors, 4 warnings, 0 suggestions
Line Severity Message Rule
11:5 warning Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. PostHogBase.ProductNames
77:56 warning Capitalize 'Session Replay' for PostHog's product. Use 'session replay' for the general industry concept. PostHogBase.ProductNames
100:44 warning Capitalize 'Feature Flags' for PostHog's product. Use 'feature flags' for the general industry concept. PostHogBase.ProductNames
102:7 warning Capitalize 'Session Replay' for PostHog's product. Use 'Session replay' for the general industry concept. PostHogBase.ProductNames

@ioannisj
Copy link
Contributor

@marandaneto
Copy link
Member Author

marandaneto commented Feb 27, 2026

Would be good to also add docs here as well posthog.com/docs/session-replay/how-to-control-which-sessions-you-record#sampling with tabs, similar to how we did for posthog.com/docs/session-replay/how-to-control-which-sessions-you-record#programmatically-start-and-stop-recordings?

yep, although there's no code snippets at all so it feels either all or nothing is supported
for the start/stop there were some code snippets, so it made more sense to add
i can add this when i finish the other 2 sdks so i do all at once
the bot liked your idea #15367
will copy from there later, ps web does not have a sdk config, just remote config for sample rate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants