Skip to content

Commit 311cc50

Browse files
feat(docs): add replay onboarding docs for electron (#7635)
* feat(docs): add replay onboarding docs for electron * update package
1 parent 0a65072 commit 311cc50

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Electron
3+
doc_link: https://docs.sentry.io/platforms/javascript/guides/electron/session-replay/
4+
support_level: production
5+
type: language
6+
---
7+
8+
#### Install
9+
10+
For the Session Replay to work, you must have the framework SDK (e.g. @sentry/electron) installed, minimum version 4.2.0.
11+
12+
```bash
13+
# Using yarn
14+
yarn add @sentry/electron
15+
16+
# Using npm
17+
npm install --save @sentry/electron
18+
```
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Electron
3+
doc_link: https://docs.sentry.io/platforms/javascript/guides/electron/session-replay/
4+
support_level: production
5+
type: language
6+
---
7+
8+
#### Configure
9+
10+
Add the following to your SDK config. There are several privacy and sampling options available, all of which can be set using the `integrations` constructor. Learn more about configuring Session Replay by reading the [configuration docs](https://docs.sentry.io/platforms/javascript/session-replay/).
11+
12+
```javascript
13+
import * as Sentry from "@sentry/electron";
14+
15+
Sentry.init({
16+
dsn: "___PUBLIC_DSN___",
17+
18+
// This sets the sample rate to be 10%. You may want this to be 100% while
19+
// in development and sample at a lower rate in production
20+
replaysSessionSampleRate: 0.1,
21+
// If the entire session is not sampled, use the below sample rate to sample
22+
// sessions when an error occurs.
23+
replaysOnErrorSampleRate: 1.0,
24+
25+
integrations: [new Sentry.Replay()],
26+
});
27+
```

0 commit comments

Comments
 (0)