Skip to content

Commit 7f1eff5

Browse files
authored
Use getIntegrationByName API for Replay docs (#8960)
1 parent a52241c commit 7f1eff5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/platforms/javascript/common/session-replay/understanding-sessions.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ Sentry.init({
6464
});
6565

6666
// You can access the active replay instance from anywhere in your code like this:
67-
const replay = Sentry.getClient().getIntegrationById("Replay");
67+
const replay = Sentry.getClient().getIntegrationByName("Replay");
6868

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

139139
replay.flush();
140140
}

0 commit comments

Comments
 (0)