-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(js-integrations): Add snippet for dynamic loading (#10804)
* docs(js-integrations): Add snippet for dynamic loading * clarify CDN * Apply suggestions from code review Co-authored-by: Liza Mock <liza.mock@sentry.io> --------- Co-authored-by: Liza Mock <liza.mock@sentry.io>
- Loading branch information
Showing
26 changed files
with
168 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...-includes/configuration/integrations/lazy-loading-replay/javascript.angular.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
```javascript {filename: main.ts} {3, 7-8} | ||
Sentry.init({ | ||
// Note, replayIntegration is NOT instantiated below: | ||
integrations: [], | ||
}); | ||
|
||
// Sometime later | ||
import("@sentry/angular").then(lazyLoadedSentry => { | ||
Sentry.addIntegration(lazyLoadedSentry.replayIntegration()); | ||
}); | ||
``` |
11 changes: 11 additions & 0 deletions
11
...rm-includes/configuration/integrations/lazy-loading-replay/javascript.astro.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
```javascript | ||
Sentry.init({ | ||
// Note, Replay is NOT instantiated below: | ||
integrations: [], | ||
}); | ||
|
||
// Sometime later | ||
import("@sentry/astro").then(lazyLoadedSentry => { | ||
Sentry.addIntegration(lazyLoadedSentry.replayIntegration()); | ||
}); | ||
``` |
11 changes: 11 additions & 0 deletions
11
...includes/configuration/integrations/lazy-loading-replay/javascript.electron.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
```javascript | ||
Sentry.init({ | ||
// Note, Replay is NOT instantiated below: | ||
integrations: [], | ||
}); | ||
|
||
// Sometime later | ||
import("@sentry/electron/renderer").then(lazyLoadedSentry => { | ||
Sentry.addIntegration(lazyLoadedSentry.replayIntegration()); | ||
}); | ||
``` |
11 changes: 11 additions & 0 deletions
11
...rm-includes/configuration/integrations/lazy-loading-replay/javascript.ember.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
```javascript | ||
Sentry.init({ | ||
// Note, Replay is NOT instantiated below: | ||
integrations: [], | ||
}); | ||
|
||
// Sometime later | ||
import("@sentry/ember").then(lazyLoadedSentry => { | ||
Sentry.addIntegration(lazyLoadedSentry.replayIntegration()); | ||
}); | ||
``` |
11 changes: 11 additions & 0 deletions
11
...m-includes/configuration/integrations/lazy-loading-replay/javascript.gatsby.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
```javascript | ||
Sentry.init({ | ||
// Note, Replay is NOT instantiated below: | ||
integrations: [], | ||
}); | ||
|
||
// Sometime later | ||
import("@sentry/gatsby").then(lazyLoadedSentry => { | ||
Sentry.addIntegration(lazyLoadedSentry.replayIntegration()); | ||
}); | ||
``` |
11 changes: 11 additions & 0 deletions
11
platform-includes/configuration/integrations/lazy-loading-replay/javascript.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
```javascript | ||
Sentry.init({ | ||
// Note, Replay is NOT instantiated below: | ||
integrations: [], | ||
}); | ||
|
||
// Sometime later | ||
import("@sentry/browser").then(lazyLoadedSentry => { | ||
Sentry.addIntegration(lazyLoadedSentry.replayIntegration()); | ||
}); | ||
``` |
11 changes: 11 additions & 0 deletions
11
...m-includes/configuration/integrations/lazy-loading-replay/javascript.nextjs.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
```javascript {filename:sentry.client.config.ts} | ||
Sentry.init({ | ||
// Note, Replay is NOT instantiated below: | ||
integrations: [], | ||
}); | ||
|
||
// Sometime later | ||
import("@sentry/nextjs").then(lazyLoadedSentry => { | ||
Sentry.addIntegration(lazyLoadedSentry.replayIntegration()); | ||
}); | ||
``` |
11 changes: 11 additions & 0 deletions
11
...rm-includes/configuration/integrations/lazy-loading-replay/javascript.react.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
```javascript | ||
Sentry.init({ | ||
// Note, Replay is NOT instantiated below: | ||
integrations: [], | ||
}); | ||
|
||
// Sometime later | ||
import("@sentry/react").then(lazyLoadedSentry => { | ||
Sentry.addIntegration(lazyLoadedSentry.replayIntegration()); | ||
}); | ||
``` |
11 changes: 11 additions & 0 deletions
11
...rm-includes/configuration/integrations/lazy-loading-replay/javascript.remix.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
```javascript | ||
Sentry.init({ | ||
// Note, Replay is NOT instantiated below: | ||
integrations: [], | ||
}); | ||
|
||
// Sometime later | ||
import("@sentry/remix").then(lazyLoadedSentry => { | ||
Sentry.addIntegration(lazyLoadedSentry.replayIntegration()); | ||
}); | ||
``` |
11 changes: 11 additions & 0 deletions
11
...rm-includes/configuration/integrations/lazy-loading-replay/javascript.solid.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
```javascript | ||
Sentry.init({ | ||
// Note, Replay is NOT instantiated below: | ||
integrations: [], | ||
}); | ||
|
||
// Sometime later | ||
import("@sentry/solid").then(lazyLoadedSentry => { | ||
Sentry.addIntegration(lazyLoadedSentry.replayIntegration()); | ||
}); | ||
``` |
11 changes: 11 additions & 0 deletions
11
...m-includes/configuration/integrations/lazy-loading-replay/javascript.svelte.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
```javascript | ||
Sentry.init({ | ||
// Note, Replay is NOT instantiated below: | ||
integrations: [], | ||
}); | ||
|
||
// Sometime later | ||
import("@sentry/svelte").then(lazyLoadedSentry => { | ||
Sentry.addIntegration(lazyLoadedSentry.replayIntegration()); | ||
}); | ||
``` |
11 changes: 11 additions & 0 deletions
11
...ncludes/configuration/integrations/lazy-loading-replay/javascript.sveltekit.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
```javascript | ||
Sentry.init({ | ||
// Note, Replay is NOT instantiated below: | ||
integrations: [], | ||
}); | ||
|
||
// Sometime later | ||
import("@sentry/sveltekit").then(lazyLoadedSentry => { | ||
Sentry.addIntegration(lazyLoadedSentry.replayIntegration()); | ||
}); | ||
``` |
11 changes: 11 additions & 0 deletions
11
...form-includes/configuration/integrations/lazy-loading-replay/javascript.vue.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
```javascript | ||
Sentry.init({ | ||
// Note, Replay is NOT instantiated below: | ||
integrations: [], | ||
}); | ||
|
||
// Sometime later | ||
import("@sentry/vue").then(lazyLoadedSentry => { | ||
Sentry.addIntegration(lazyLoadedSentry.replayIntegration()); | ||
}); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters