Skip to content

Commit 5051bae

Browse files
committed
Undo electron changes in favor of #12655
1 parent 2ca2f01 commit 5051bae

File tree

3 files changed

+22
-9
lines changed

3 files changed

+22
-9
lines changed

docs/platforms/javascript/guides/electron/configuration/integrations/mainprocesssession.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,16 @@ use the <PlatformLink
1212
to="/configuration/integrations/browserwindowsession">BrowserWindowSession</PlatformLink>
1313
integration in the renderer processes.
1414

15-
To disable sending sessions, remove the `MainProcessSession` integration:
15+
{/* TODO(v9): When electron does a new major, update this since autoSessionTracking got removed */}
16+
17+
Unless `autoSessionTracking` is set to `false`, this integration will be automatically added.
1618

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

2022
Sentry.init({
2123
dsn: "___PUBLIC_DSN___",
22-
integrations: (defaults) =>
23-
defaults.filter((i) => i.name !== "MainProcessSession"),
24+
autoSessionTracking: false,
2425
});
2526
```
2627

platform-includes/configuration/auto-session-tracking/javascript.electron.mdx

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,12 @@ Due to the nature of `crashed` and `abnormal` exits, these sessions are finished
1010

1111
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.
1212

13-
To disable sending sessions, remove the `MainProcessSession` integration:
13+
{/* TODO(v9): When electron does a new major, update this since autoSessionTracking got removed */}
1414

15-
```javascript
16-
import * as Sentry from "@sentry/electron/main";
15+
To disable sending sessions, set the `autoSessionTracking` flag to `false`:
1716

17+
```javascript
1818
Sentry.init({
19-
dsn: "___PUBLIC_DSN___",
20-
integrations: (defaults) =>
21-
defaults.filter((i) => i.name !== "MainProcessSession"),
19+
autoSessionTracking: false, // default: true
2220
});
2321
```

platform-includes/configuration/auto-session-tracking/javascript.node.mdx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,17 @@ Sentry.init({
1414
autoSessionTracking: false, // default: true
1515
});
1616
```
17+
18+
{/* TODO(v9): Remove this notice? */}
19+
20+
<PlatformSection notSupported={["javacript.cordova", "javascript.capacitor", "javascript.electron"]}>
21+
22+
<Alert title="Deprecation Notice">
23+
24+
{/* We don't use platform links here because we always have to link to node and browser here and doing a conditional just for that feels overkill. */}
25+
26+
Starting with SDK version 8.43.0 and up, the `autoSessionTracking` option has been deprecated. You can use the [BrowserSession integration](/platforms/javascript/configuration/integrations/browsersession/) in browser environments and the [Http integration](/platforms/javascript/guides/node/configuration/integrations/http/) (via the `trackIncomingRequestsAsSessions` option) in Node.js runtime.
27+
28+
</Alert>
29+
30+
</PlatformSection>

0 commit comments

Comments
 (0)