Skip to content

Commit 2cf5ba6

Browse files
coolguyzoneAlex Krawiec
andauthored
Remove old constructor keywords in JS integration options that can cause browser errors (#11801)
Co-authored-by: Alex Krawiec <[email protected]>
1 parent 6559e11 commit 2cf5ba6

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import * as Sentry from "@sentry/electron/main";
2020

2121
Sentry.init({
2222
dsn: "___PUBLIC_DSN___",
23-
integrations: [new Sentry.browserWindowSessionIntegration()],
23+
integrations: [Sentry.browserWindowSessionIntegration()],
2424
});
2525
```
2626

@@ -33,7 +33,7 @@ import * as Sentry from "@sentry/electron/main";
3333
Sentry.init({
3434
dsn: "___PUBLIC_DSN___",
3535
integrations: [
36-
new Sentry.browserWindowSessionIntegration({
36+
Sentry.browserWindowSessionIntegration({
3737
backgroundTimeoutSeconds: 120,
3838
}),
3939
],

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ import * as Sentry from "@sentry/electron/main";
3232
Sentry.init({
3333
dsn: "___PUBLIC_DSN___",
3434
integrations: [
35-
new Sentry.mainProcessSessionIntegration({ sendOnCreate: true }),
35+
Sentry.mainProcessSessionIntegration({ sendOnCreate: true }),
3636
],
3737
});
3838
```

docs/product/sentry-basics/integrate-frontend/initialize-sentry-sdk.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Sentry captures data by using a platform-specific SDK that you add to your appli
5454

5555
Sentry.init({
5656
dsn: "<your_DSN_key>",
57-
integrations: [new Sentry.browserTracingIntegration(), Sentry.replayIntegration()],
57+
integrations: [Sentry.browserTracingIntegration(), Sentry.replayIntegration()],
5858

5959
// Set tracesSampleRate to 1.0 to capture 100%
6060
// of transactions for performance monitoring.

platform-includes/performance/configure-sample-rate/javascript.electron.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Sentry.init({
1010

1111
// This enables automatic instrumentation (highly recommended), but is not
1212
// necessary for purely manual usage
13-
integrations: [new Sentry.browserTracingIntegration()],
13+
integrations: [Sentry.browserTracingIntegration()],
1414

1515
// We recommend adjusting this value in production, or using tracesSampler
1616
// for finer control

platform-includes/performance/enable-automatic-instrumentation/javascript.electron.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import * as Sentry from "@sentry/electron/renderer";
1010
Sentry.init({
1111
dsn: "___PUBLIC_DSN___",
1212

13-
integrations: [new Sentry.browserTracingIntegration()],
13+
integrations: [Sentry.browserTracingIntegration()],
1414

1515
// We recommend adjusting this value in production, or using tracesSampler
1616
// for finer control

platform-includes/profiling/automatic-instrumentation-setup/javascript.electron.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ Sentry.init({
77
dsn: "___PUBLIC_DSN___",
88
integrations: [
99
// Add browser profiling integration to the list of integrations
10-
new Sentry.browserTracingIntegration(),
11-
new Sentry.browserProfilingIntegration(),
10+
Sentry.browserTracingIntegration(),
11+
Sentry.browserProfilingIntegration(),
1212
],
1313

1414
// Set tracesSampleRate to 1.0 to capture 100%

0 commit comments

Comments
 (0)