---
title: "BrowserWindowSession"
description: "Captures sessions linked to the focus of Electron BrowserWindows."
url: https://docs.sentry.io/platforms/javascript/guides/electron/configuration/integrations/browserwindowsession/
---

# BrowserWindowSession | Sentry for Electron

Requires `@sentry/electron` version `4.11.0` or higher.

Captures sessions linked to the focus of Electron `BrowserWindow`s. Capturing sessions makes it possible to show [release health](https://docs.sentry.io/product/releases/health.md) statistics in Sentry.

Adding this integration disables the [MainProcessSession](https://docs.sentry.io/platforms/javascript/guides/electron/configuration/integrations/mainprocesssession.md) session integration.

```javascript
import * as Sentry from "@sentry/electron/main";

Sentry.init({
  dsn: "___PUBLIC_DSN___",
  integrations: [Sentry.browserWindowSessionIntegration()],
});
```

By default, sessions are ended when no window has had focus for 30 seconds. You can adjust this timeout via the `backgroundTimeoutSeconds` option:

```javascript
import * as Sentry from "@sentry/electron/main";

Sentry.init({
  dsn: "___PUBLIC_DSN___",
  integrations: [
    Sentry.browserWindowSessionIntegration({
      backgroundTimeoutSeconds: 120,
    }),
  ],
});
```
