Skip to content

Commit 18ceb22

Browse files
Document electron main process integration sendOnCreate (#7639)
Co-authored-by: vivianyentran <20403606+vivianyentran@users.noreply.github.com>
1 parent 2119ec0 commit 18ceb22

File tree

1 file changed

+11
-0
lines changed
  • src/platforms/javascript/guides/electron/configuration/integrations

1 file changed

+11
-0
lines changed

src/platforms/javascript/guides/electron/configuration/integrations/default.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,17 @@ Sentry.init({
226226
});
227227
```
228228

229+
The default behavior is to only send sessions on error or when the main process ends. To send sessions when the main process is created, enable the `sendOnCreate` option.
230+
231+
```
232+
import * as Sentry from "@sentry/electron";
233+
234+
Sentry.init({
235+
dsn: "___PUBLIC_DSN___",
236+
integrations: [new Sentry.Integrations.MainProcessSession({ sendOnCreate: true })]
237+
});
238+
```
239+
229240
## Renderer Process
230241

231242
### `ScopeToMain`

0 commit comments

Comments
 (0)