You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/en/real_user_monitoring/guide/monitor-electron-applications-using-browser-sdk.md
+7-4
Original file line number
Diff line number
Diff line change
@@ -24,12 +24,12 @@ To install the Datadog Browser SDK to support Electron apps:
24
24
25
25
1. Set up and install [RUM Browser Monitoring][2] inside **every renderer process**, following the steps for CDN sync, CDN async, or npm.
26
26
27
-
2. Set the `sessionPersistence` parameter to `"local-storage"` in the RUM initialization configuration of each renderer process, as shown below.
27
+
2. Set the `sessionPersistence` parameter to `"local-storage"` in the RUM initialization configuration of each renderer process, as shown below.
28
28
29
29
**Note**: This setting allows Datadog to collect RUM data without relying on browser cookies.
30
-
30
+
31
31
- If you are targeting pages **available on the internet** (using the `https://` protocol), you **do not** need this parameter.
32
-
- if you are embedding pages **inside your application** (using the `file://` protocol), Datadog needs to store sessions in local storage, as cookies are not available.
32
+
- if you are embedding pages **inside your application** (using the `file://` protocol), Datadog needs to store sessions in local storage, as cookies are not available.
33
33
34
34
```javascript
35
35
datadogRum.init({
@@ -40,7 +40,7 @@ To install the Datadog Browser SDK to support Electron apps:
40
40
sessionPersistence:"local-storage"
41
41
});
42
42
```
43
-
43
+
44
44
3. Once you've configured the SDK correctly, your data populates the [RUM Explorer][4].
45
45
46
46
## Troubleshooting
@@ -50,6 +50,8 @@ The same-origin policy prevents tracking an application for the same session in
50
50
51
51
This means that an application that uses Electron to embed a landing page, then later redirects the user to a website hosted on the Internet results in two sessions being created for that user - one for the embedded local files (`file://`) landing part of the application, and one for the remote part (`https://` files available on the internet).
52
52
53
+
**Note**: Unminified stack traces are not available when monitoring Electron applications that load embedded local files (i.e., when stack traces start with `file://`). To obtain unminified stack traces in this scenario, you must manually overwrite them using the [`beforeSend()` callback][2]. For further assistance, please contact [Datadog customer support][5].
54
+
53
55
### Short-lived sessions for instances with multiple windows at once
54
56
An issue with local storage replication latency between windows can cause a short-lived session to be created (<1 second). To work around this, ensure multiple windows are created and initialized with a gap of more than 10 ms.
55
57
@@ -60,3 +62,4 @@ An issue with local storage replication latency between windows can cause a shor
0 commit comments