PreloadInjection
Injects a preload script via the Electron. (default)
This integration injects a preload script via the Electron session.setPreloads(preloads)
API.
By default, sessions are only injected into the defaultSession
. If you're using other sessions, you can pass a function as getSessions
to init
.
Copied
import { session } from "electron";
import * as Sentry from "@sentry/electron/main";
Sentry.init({
dsn: "https://examplePublicKey@o0.ingest.sentry.io/0",
getSessions: () => [
session.defaultSession,
session.fromPartition("persist:my-session"),
],
});
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").