Skip to content

feat(electron): Disable sessions now autoSessionTracking has been removed #12655

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,14 @@ use the <PlatformLink
to="/configuration/integrations/browserwindowsession">BrowserWindowSession</PlatformLink>
integration in the renderer processes.

{/* TODO(v9): When electron does a new major, update this since autoSessionTracking got removed */}

Unless `autoSessionTracking` is set to `false`, this integration will be automatically added.
To disable sending sessions, filter the `MainProcessSession` from the default integrations:

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

Sentry.init({
dsn: "___PUBLIC_DSN___",
autoSessionTracking: false,
integrations: (defaults) => defaults.filter((i) => i.name !== "MainProcessSession"),
});
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ Due to the nature of `crashed` and `abnormal` exits, these sessions are finished

To receive data on user adoption, such as users crash free rate percentage, and the number of users that have adopted a specific release, set the user on the [`initialScope`](/platforms/javascript/configuration/options/#initial-scope) when initializing the SDK.

{/* TODO(v9): When electron does a new major, update this since autoSessionTracking got removed */}

To disable sending sessions, set the `autoSessionTracking` flag to `false`:
To disable sending sessions, filter the `MainProcessSession` from the default integrations:

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

Sentry.init({
autoSessionTracking: false, // default: true
dsn: "___PUBLIC_DSN___",
integrations: (defaults) => defaults.filter((i) => i.name !== "MainProcessSession"),
});
```
Loading