Skip to main content
An Electron application has a main process and one or more renderer processes. After you instrument both sides, you can view desktop runtime activity and page experience in the same RUM session. Regular renderer events are forwarded to the main process and uploaded together with main-process events. You do not need to write custom IPC forwarding code.

Prerequisites

Before you start, make sure that:
  • Your application uses Electron 39 or later.
  • You created or selected an Electron application on the Flashduty RUM application management page and obtained its Application ID and Client Token.
  • The application can reach https://browser.flashcat.cloud/api/v2/rum. For a self-hosted deployment, prepare your own intake endpoint.

Integration steps

1

Install the SDKs

Install the main-process SDK and Browser SDK in your project:
Use @flashcatcloud/browser-rum 0.0.7 or later to enable Session Replay in Electron.
2

Configure the main-process entry point

The Electron SDK must start instrumentation before Electron loads. Choose the setup that matches how you build the main process.
Make instrument the first import in the main-process entry point:
main.ts
If your project sorts imports automatically, make sure it does not move this import after electron.
When you use a bundler plugin, do not manually import @flashcatcloud/electron-sdk/instrument. The plugin handles execution order and runtime dependencies.
3

Initialize the main-process SDK

Call init() after app.whenReady() and before you create the first BrowserWindow:
main.ts
applicationId, clientToken, and service are required. Flashduty SaaS users do not need to set site. Initialization failure does not prevent the application from starting; the SDK logs the specific reason in the main-process console.
4

Initialize the renderer SDK

Initialize the Browser SDK in the renderer entry point:
renderer.ts
Use the same applicationId, clientToken, service, env, and version in both processes so one application is not split across different dimensions.After the main process is configured, the SDK injects its preload and establishes the bridge automatically. You do not need to modify your application’s preload or write ipcRenderer / ipcMain forwarding code. Use allowedWebViewHosts only for third-party pages loaded in a <webview> or BrowserView.
5

Verify the integration

Start the application, visit a page, click an element, and make a network request. Then verify the data in RUM Explorer:
  1. Filter all Electron events with source:electron OR container.source:electron.
  2. Confirm that main-process events appear with view.url: electron://main-process.
  3. Confirm that renderer view, action, resource, or error events appear.
  4. Check that renderer events contain container.source: electron.
The default upload interval is 10 seconds. Wait for one upload cycle before refreshing the Explorer.
The integration is working when the same session contains main-process and renderer events, and renderer events include container.source: electron.

Enable Session Replay (optional)

The renderer records and uploads Session Replay directly. Set both the sample rate and direct-upload option in the renderer configuration:
renderer.ts
Replay recording creates a blob Worker and connects to the intake from the renderer. If your page defines a Content Security Policy (CSP), allow worker-src blob: and the actual intake origin:
For self-hosted Session Replay, configure proxy separately in the renderer. See Advanced configuration · Custom upload endpoints. If no replay is collected, see Electron SDK troubleshooting.

Next steps

Advanced configuration

Configure custom upload endpoints, batching, user identity, and manual APIs.

Data collection

Learn what the main and renderer processes collect.

Error symbolication

Upload JavaScript source maps and native crash symbols.

Troubleshooting

Diagnose bridge, Session Replay, and stack symbolication issues.