From fc8cfc35e935f8ebe9d89cf8c65eb2998136e27c Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Tue, 15 Aug 2023 11:25:47 -0400 Subject: [PATCH 1/2] Document electron main process integration `sendOnCreate` --- .../electron/configuration/integrations/default.mdx | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/platforms/javascript/guides/electron/configuration/integrations/default.mdx b/src/platforms/javascript/guides/electron/configuration/integrations/default.mdx index 7d1688f8dbbd3..523e62cfef3a2 100644 --- a/src/platforms/javascript/guides/electron/configuration/integrations/default.mdx +++ b/src/platforms/javascript/guides/electron/configuration/integrations/default.mdx @@ -226,6 +226,17 @@ Sentry.init({ }); ``` +The default behaviour 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. + +``` +import * as Sentry from "@sentry/electron"; + +Sentry.init({ + dsn: "___PUBLIC_DSN___", + integrations: [new Sentry.Integrations.MainProcessSession({ sendOnCreate: true })] +}); +``` + ## Renderer Process ### `ScopeToMain` From 07f8da768c88fdc5a10eded5f73e77627ab2eb40 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Tue, 15 Aug 2023 13:19:47 -0400 Subject: [PATCH 2/2] Update src/platforms/javascript/guides/electron/configuration/integrations/default.mdx Co-authored-by: vivianyentran <20403606+vivianyentran@users.noreply.github.com> --- .../guides/electron/configuration/integrations/default.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platforms/javascript/guides/electron/configuration/integrations/default.mdx b/src/platforms/javascript/guides/electron/configuration/integrations/default.mdx index 523e62cfef3a2..7d8f9df74af72 100644 --- a/src/platforms/javascript/guides/electron/configuration/integrations/default.mdx +++ b/src/platforms/javascript/guides/electron/configuration/integrations/default.mdx @@ -226,7 +226,7 @@ Sentry.init({ }); ``` -The default behaviour 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. +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. ``` import * as Sentry from "@sentry/electron";