Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(replay): Update docs on public replay api methods #11020

Merged
merged 3 commits into from
Aug 8, 2024
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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.
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). 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.
chargome marked this conversation as resolved.
Show resolved Hide resolved

## Manually Stopping Replay

Expand All @@ -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

Expand Down
Loading