Skip to content

Commit 2d71c0c

Browse files
authored
feat(replay-javascript): Streamline verify instructions (#11301)
Streamline the verify instructions for configuring replay using a JS SDK so they match the in-product docs.
1 parent f80d61e commit 2d71c0c

13 files changed

+75
-134
lines changed

platform-includes/session-replay/setup/javascript.angular.mdx

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,12 @@ Sentry.init({
2222
});
2323
```
2424

25-
With the settings above, session replays with errors are always captured.
26-
You can verify this by triggering a test error somewhere in your Angular app, for example in your main app component:
25+
### Verify
2726

28-
```html {filename: app.component.html}
29-
<button (click)="throwTestError()">Test Sentry Error</button>
30-
```
27+
While you're testing, we recommend that you set `replaysSessionSampleRate` to `1.0`. This ensures that every user session will be sent to Sentry.
3128

32-
Then, in your `app.component.ts` add:
29+
Once testing is complete, **we recommend lowering this value in production**. We still recommend keeping `replaysOnErrorSampleRate` set to `1.0`, so that, whenever possible, every error has an associated replay with additional debugging context.
3330

34-
```javascript {filename: app.component.ts}
35-
public throwTestError(): void {
36-
throw new Error("Sentry Test Error");
37-
}
38-
```
3931

4032
### PII & Privacy Considerations
4133

platform-includes/session-replay/setup/javascript.astro.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ Session Replay can only be included on the client side.
3737

3838
</Alert>
3939

40+
### Verify
41+
42+
While you're testing, we recommend that you set `replaysSessionSampleRate` to `1.0`. This ensures that every user session will be sent to Sentry.
43+
44+
Once testing is complete, **we recommend lowering this value in production**. We still recommend keeping `replaysOnErrorSampleRate` set to `1.0`, so that, whenever possible, every error has an associated replay with additional debugging context.
45+
46+
47+
4048
### PII & Privacy Considerations
4149

4250
Personally identifiable information (PII) and privacy are important considerations when enabling Session Replay. There are multiple ways in which Sentry helps you avoid collecting PII, including:

platform-includes/session-replay/setup/javascript.capacitor.mdx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,12 @@ Sentry.init({
3030
});
3131
```
3232

33-
Session replays with errors, will always be captured with the settings above.
34-
You can verify this by adding the following snippet anywhere in your code and running it:
33+
### Verify
34+
35+
While you're testing, we recommend that you set `replaysSessionSampleRate` to `1.0`. This ensures that every user session will be sent to Sentry.
36+
37+
Once testing is complete, **we recommend lowering this value in production**. We still recommend keeping `replaysOnErrorSampleRate` set to `1.0`, so that, whenever possible, every error has an associated replay with additional debugging context.
3538

36-
```javascript
37-
setTimeout(() => {
38-
throw new Error("Sentry Test Error");
39-
});
40-
```
4139

4240
### PII & Privacy Considerations
4341
Personally identifiable information (PII) and privacy are important considerations when enabling Session Replay. There are multiple ways in which Sentry helps you avoid collecting PII, including:

platform-includes/session-replay/setup/javascript.electron.mdx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,13 @@ Sentry.init({
2222
});
2323
```
2424

25-
With the settings above, session replays with errors are always captured.
26-
You can verify this by adding the following snippet anywhere in your renderer code and running it:
25+
### Verify
26+
27+
While you're testing, we recommend that you set `replaysSessionSampleRate` to `1.0`. This ensures that every user session will be sent to Sentry.
28+
29+
Once testing is complete, **we recommend lowering this value in production**. We still recommend keeping `replaysOnErrorSampleRate` set to `1.0`, so that, whenever possible, every error has an associated replay with additional debugging context.
30+
2731

28-
```javascript
29-
setTimeout(() => {
30-
throw new Error("Sentry Test Error");
31-
});
32-
```
3332
### PII & Privacy Considerations
3433

3534
Personally identifiable information (PII) and privacy are important considerations when enabling Session Replay. There are multiple ways in which Sentry helps you avoid collecting PII, including:

platform-includes/session-replay/setup/javascript.ember.mdx

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,12 @@ Sentry.init({
2222
});
2323
```
2424

25-
With the settings above, session replays with errors are always captured.
26-
You can verify this by adding the following snippet anywhere in your code and running it:
25+
### Verify
26+
27+
While you're testing, we recommend that you set `replaysSessionSampleRate` to `1.0`. This ensures that every user session will be sent to Sentry.
28+
29+
Once testing is complete, **we recommend lowering this value in production**. We still recommend keeping `replaysOnErrorSampleRate` set to `1.0`, so that, whenever possible, every error has an associated replay with additional debugging context.
2730

28-
```javascript
29-
setTimeout(() => {
30-
throw new Error("Sentry Test Error");
31-
});
32-
```
3331

3432
### PII & Privacy Considerations
3533

platform-includes/session-replay/setup/javascript.gatsby.mdx

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,12 @@ Sentry.init({
2222
});
2323
```
2424

25-
With the settings above, session replays with errors are always captured.
26-
You can verify this by adding the following button to your app and pressing it:
27-
28-
```javascript
29-
<button
30-
type="button"
31-
onClick={() => {
32-
throw new Error("Sentry Test Error");
33-
}}
34-
>
35-
Break the world
36-
</button>
37-
```
25+
### Verify
26+
27+
While you're testing, we recommend that you set `replaysSessionSampleRate` to `1.0`. This ensures that every user session will be sent to Sentry.
28+
29+
Once testing is complete, **we recommend lowering this value in production**. We still recommend keeping `replaysOnErrorSampleRate` set to `1.0`, so that, whenever possible, every error has an associated replay with additional debugging context.
30+
3831

3932
### PII & Privacy Considerations
4033

platform-includes/session-replay/setup/javascript.mdx

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,13 @@ Sentry.init({
2323
});
2424
```
2525

26-
With the settings above, session replays with errors are always captured.
27-
You can verify this by adding the following snippet anywhere in your code and running it:
26+
### Verify
27+
28+
While you're testing, we recommend that you set `replaysSessionSampleRate` to `1.0`. This ensures that every user session will be sent to Sentry.
29+
30+
Once testing is complete, **we recommend lowering this value in production**. We still recommend keeping `replaysOnErrorSampleRate` set to `1.0`, so that, whenever possible, every error has an associated replay with additional debugging context.
31+
2832

29-
```javascript
30-
setTimeout(() => {
31-
throw new Error("Sentry Test Error");
32-
});
33-
```
3433
### PII & Privacy Considerations
3534

3635
Personally identifiable information (PII), and privacy are important considerations when enabling Session Replay. There are multiple ways in which Sentry helps you avoid collecting PII, including:

platform-includes/session-replay/setup/javascript.nextjs.mdx

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,12 @@ Sentry.init({
2424
});
2525
```
2626

27-
With the settings above, session replays with errors are always captured.
28-
You can verify this by adding the following button to your app and pressing it:
29-
30-
```javascript
31-
<button
32-
type="button"
33-
onClick={() => {
34-
throw new Error("Sentry Test Error");
35-
}}
36-
>
37-
Break the world
38-
</button>
39-
```
27+
### Verify
28+
29+
While you're testing, we recommend that you set `replaysSessionSampleRate` to `1.0`. This ensures that every user session will be sent to Sentry.
30+
31+
Once testing is complete, **we recommend lowering this value in production**. We still recommend keeping `replaysOnErrorSampleRate` set to `1.0`, so that, whenever possible, every error has an associated replay with additional debugging context.
32+
4033

4134
### PII & Privacy Considerations
4235

platform-includes/session-replay/setup/javascript.react.mdx

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,12 @@ Sentry.init({
2222
});
2323
```
2424

25-
With the settings above, session replays with errors are always captured.
26-
You can verify this by adding the following button to your app and pressing it:
27-
28-
```javascript
29-
<button
30-
type="button"
31-
onClick={() => {
32-
throw new Error("Sentry Test Error");
33-
}}
34-
>
35-
Break the world
36-
</button>
37-
```
25+
### Verify
26+
27+
While you're testing, we recommend that you set `replaysSessionSampleRate` to `1.0`. This ensures that every user session will be sent to Sentry.
28+
29+
Once testing is complete, **we recommend lowering this value in production**. We still recommend keeping `replaysOnErrorSampleRate` set to `1.0`, so that, whenever possible, every error has an associated replay with additional debugging context.
30+
3831

3932
### PII & Privacy Considerations
4033

platform-includes/session-replay/setup/javascript.remix.mdx

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,12 @@ Sentry.init({
2424
});
2525
```
2626

27-
With the settings above, session replays with errors are always captured.
28-
You can verify this by adding the following button to your app and pressing it:
29-
30-
```javascript
31-
<button
32-
type="button"
33-
onClick={() => {
34-
throw new Error("Sentry Test Error");
35-
}}
36-
>
37-
Break the world
38-
</button>
39-
```
27+
### Verify
28+
29+
While you're testing, we recommend that you set `replaysSessionSampleRate` to `1.0`. This ensures that every user session will be sent to Sentry.
30+
31+
Once testing is complete, **we recommend lowering this value in production**. We still recommend keeping `replaysOnErrorSampleRate` set to `1.0`, so that, whenever possible, every error has an associated replay with additional debugging context.
32+
4033

4134
### PII & Privacy Considerations
4235

0 commit comments

Comments
 (0)