Skip to content

Commit 5065a34

Browse files
committed
docs(javascript): Session Replay Sampling clarification
1 parent 7d989fd commit 5065a34

File tree

1 file changed

+14
-0
lines changed
  • docs/platforms/javascript/common/session-replay

1 file changed

+14
-0
lines changed

docs/platforms/javascript/common/session-replay/index.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,20 @@ Sampling allows you to control how much of your website's traffic will result in
157157
record up to a minute of events prior to the error and continue recording
158158
until the session ends.
159159

160+
### Recommended Sample Rate Values
161+
162+
**For Development/Testing:**
163+
- `replaysSessionSampleRate: 1.0` (100%) - Capture all sessions for complete visibility
164+
- `replaysOnErrorSampleRate: 1.0` (100%) - Capture all error sessions
165+
166+
**For Production:**
167+
- `replaysSessionSampleRate: 0.01` (1%) for high-traffic sites (100k+ sessions/day)
168+
- `replaysSessionSampleRate: 0.1` (10%) for medium-traffic sites (10k-100k sessions/day)
169+
- `replaysSessionSampleRate: 0.25` (25%) for low-traffic sites (under 10k sessions/day)
170+
- `replaysOnErrorSampleRate: 1.0` (100%) - Always capture sessions with errors for debugging
171+
172+
### How Sampling Works
173+
160174
Sampling begins as soon as a session starts. <PlatformIdentifier name="replays-session-sample-rate" /> is evaluated first. If it's sampled, the replay recording will begin. Otherwise, <PlatformIdentifier name="replays-on-error-sample-rate" /> 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.
161175

162176
## Error Linking

0 commit comments

Comments
 (0)