Skip to content

Commit

Permalink
feat: Use new Sentry.getReplay() util (#9194)
Browse files Browse the repository at this point in the history
  • Loading branch information
mydea authored Feb 21, 2024
1 parent 1434ced commit c7e5cc0
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Sentry.init({
});

// You can access the active replay instance from anywhere in your code like this:
const replay = Sentry.getClient().getIntegrationByName("Replay");
const replay = Sentry.getReplay();

// This starts in `session` mode, regardless of sample rates
replay.start();
Expand Down Expand Up @@ -134,7 +134,7 @@ Sentry.init({
// Check if user is an employee, if so, always record a replay
if (loggedInUser.isEmployee) {
// You can get a reference to the Sentry Replay integration like so:
const replay = Sentry.getClient().getIntegrationByName("Replay");
const replay = Sentry.getReplay();

replay.flush();
}
Expand Down

0 comments on commit c7e5cc0

Please sign in to comment.