From 257988fb0190a78d541822156b56dcb13e8dcf36 Mon Sep 17 00:00:00 2001 From: Charly Gomez Date: Thu, 8 Aug 2024 10:11:13 +0200 Subject: [PATCH] docs(replay): Update docs on public replay api methods (#11020) --- .../common/session-replay/understanding-sessions.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/platforms/javascript/common/session-replay/understanding-sessions.mdx b/docs/platforms/javascript/common/session-replay/understanding-sessions.mdx index b2cb7f5435c1e..285f160c85c71 100644 --- a/docs/platforms/javascript/common/session-replay/understanding-sessions.mdx +++ b/docs/platforms/javascript/common/session-replay/understanding-sessions.mdx @@ -85,7 +85,7 @@ replay.start(); replay.startBuffering(); ``` -This can be used either if both `replaysSessionSampleRate` and `replaysOnErrorSampleRate` are `0` and thus no session has been started automatically, or if you previously stopped a session and want to start a new one (see below). `start()` and `startBuffering()` will throw an error if a session is currently running. +If both `replaysSessionSampleRate` and `replaysOnErrorSampleRate` are `0`, then you'll need to manually start a session replay, as shown above. This is also useful if you previously stopped a session and want to start a new one (see below). If a session is currently running, `start()` and `startBuffering()` are safe and have no effect. They will [log a debug message](/platforms/javascript/configuration/options/#debug) in this case. ## Manually Stopping Replay @@ -107,7 +107,7 @@ await replay.flush(); In `session` mode, this will upload any pending recording data to Sentry. In `buffer` mode, this will upload any pending recording data to Sentry and then continue recording, the same as when an error is sampled with `replaysOnErrorSampleRate`. -Note that it's safe to call `flush()` at any time, even if Session Replay is stopped, in which case, it will do nothing. +Calling `flush()` while Session Replay is stopped will start a new session recording. ## Examples of Custom Sampling