Skip to content

Commit 7030caa

Browse files
fix: Correct loader script sentence (#14228)
The doc says: ![image](https://github.com/user-attachments/assets/22500327-1662-4e19-9fff-29e1ee3f8cb5) But when you create a JavaScript project and check the settings, everything is actually turned off. We [recently changed the defaults so all options start disabled](getsentry/sentry#86395). Before, when they were all checked by default, the page would send a request on load to update the script loader configuration — but now it doesn’t. Basically, everything seems to be False (disabled) by default, so this PR updates the docs to reflect that.
1 parent d520cfa commit 7030caa

File tree

1 file changed

+9
-9
lines changed
  • docs/platforms/javascript/common/install

1 file changed

+9
-9
lines changed

docs/platforms/javascript/common/install/loader.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ To use the loader, go in the Sentry UI to **Settings > Projects > (select projec
5050
></script>
5151
```
5252

53-
By default, Tracing and Session Replay are enabled.
53+
By default, Tracing and Session Replay are disabled.
5454

5555
## Source Maps
5656

@@ -171,17 +171,17 @@ By default, the loader will make sure you can call these functions directly on `
171171
- `Sentry.showReportDialog()`
172172

173173
If you want to call any other method when using the Loader, you have to guard it with `Sentry.onLoad()`. Any callback given to `onLoad()` will be called either immediately (if the SDK is already loaded), or later once the SDK has been loaded:
174-
```html
174+
```html
175175
<script>
176176
window.sentryOnLoad = function () {
177177
Sentry.init({
178178
// ...
179179
});
180180
};
181181
</script>
182-
182+
183183
<script src="https://js.sentry-cdn.com/___PUBLIC_KEY___.min.js" crossorigin="anonymous"></script>
184-
184+
185185
<script>
186186
// Guard against window.Sentry not being available, e.g. due to Ad-blockers
187187
window.Sentry &&
@@ -203,10 +203,10 @@ If you want to understand the inner workings of the loader itself, you can read
203203
## Limitations of Tracing
204204

205205
Because the loader script injects the actual SDK asynchronously to keep your pageload performance high, the SDK's tracing functionality is only available once the SDK is loaded and initialized.
206-
This means that if you e.g. have `fetch` calls right at the beginning of your application, they might not be traced.
206+
This means that if you e.g. have `fetch` calls right at the beginning of your application, they might not be traced.
207207
If this is a critical issue for you, you have two options to ensure that all your `fetch` calls are traced:
208208

209-
- Initialize the SDK in `window.sentryOnLoad` as described in [Custom Configuration](#custom-configuration). Then make your `fetch` call in the `Sentry.onload` callback.
209+
- Initialize the SDK in `window.sentryOnLoad` as described in [Custom Configuration](#custom-configuration). Then make your `fetch` call in the `Sentry.onload` callback.
210210
<Expandable title="Example">
211211
```html
212212
<script>
@@ -216,9 +216,9 @@ If this is a critical issue for you, you have two options to ensure that all you
216216
});
217217
};
218218
</script>
219-
219+
220220
<script src="https://js.sentry-cdn.com/___PUBLIC_KEY___.min.js" crossorigin="anonymous"></script>
221-
221+
222222
<script>
223223
Sentry.onLoad(function () {
224224
fetch("/api/users");
@@ -230,7 +230,7 @@ If this is a critical issue for you, you have two options to ensure that all you
230230

231231
<Alert level="warning">
232232

233-
Please be aware that both of these options will add delay to your `fetch` calls or decrease your pageload performance. Ultimately, this is the trade-off between lazy and eagerly loading the Sentry SDK.
233+
Please be aware that both of these options will add delay to your `fetch` calls or decrease your pageload performance. Ultimately, this is the trade-off between lazy and eagerly loading the Sentry SDK.
234234

235235
</Alert>
236236

0 commit comments

Comments
 (0)