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.When you use a bundler plugin, do not manually import
- Unbundled main process
- Vite
- Webpack
- esbuild
Make If your project sorts imports automatically, make sure it does not move this import after
instrument the first import in the main-process entry point:main.ts
electron.@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:Use the same
renderer.ts
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:
- Filter all Electron events with
source:electron OR container.source:electron. - Confirm that main-process events appear with
view.url: electron://main-process. - Confirm that renderer
view,action,resource, orerrorevents appear. - Check that renderer events contain
container.source: electron.
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
worker-src blob: and the actual intake origin:
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.