BrowserWindowSession
Captures sessions linked to the focus of Electron BrowserWindows.
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 statistics in Sentry.
Adding this integration disables the MainProcessSession session integration.
Copied
import * as Sentry from "@sentry/electron/main";
Sentry.init({
dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
integrations: [new 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:
Copied
import * as Sentry from "@sentry/electron/main";
Sentry.init({
dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
integrations: [
new Sentry.browserWindowSessionIntegration({
backgroundTimeoutSeconds: 120,
}),
],
});
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").