Skip to content

Commit 1ebaeae

Browse files
committed
toolbar: Fix link to MockFeatureFlagAdapter and nits
1 parent f56c5e2 commit 1ebaeae

File tree

1 file changed

+10
-14
lines changed

1 file changed

+10
-14
lines changed

docs/product/dev-toolbar/setup.mdx

Lines changed: 10 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ description: "Get started with Sentry's Dev Toolbar, bringing critical Sentry in
1212
## Set Up Your Web App
1313

1414
<Alert level="warning">
15-
[Enabling tracing](/platforms/javascript/tracing/) is a prerequisite to using the Developer Toolbar. Tracing is used to collect page-specific issues and feedback through transactions.
15+
[Enabling tracing](/platforms/javascript/tracing/) is a prerequisite to using the Dev Toolbar. Tracing is used to collect page-specific issues and feedback through transactions.
1616
</Alert>
1717

1818
You need to complete two steps to get the toolbar rendered on the page:
@@ -27,10 +27,10 @@ You need to complete two steps to get the toolbar rendered on the page:
2727
<html>
2828
<head>...</head>
2929
<body>
30-
30+
...
3131
<script src="https://browser.sentry-cdn.com/sentry-toolbar/latest/toolbar.min.js"></script>
3232
<script>
33-
window.SentryToolbar.init({ });
33+
window.SentryToolbar.init({ ... });
3434
</script>
3535
</body>
3636
</html>
@@ -39,26 +39,22 @@ You need to complete two steps to get the toolbar rendered on the page:
3939
### Unmounting The Toolbar
4040

4141
If you have called `SentryToolbar.init({...})` to render the toolbar, but now want to manually remove or unmount it from the page, you can call the cleanup function that is returned from `init()`. This will unmount all the injected HTML and CSS. Login credentials will not be removed, so you can re-insert the toolbar and still be authenticated.
42-
```html
43-
<script src="https://browser.sentry-cdn.com/sentry-toolbar/latest/toolbar.min.js"></script>
44-
<script>
45-
const unmountToolbar = window.SentryToolbar.init({ … });
46-
47-
// sometime later...
48-
unmountToolbar();
49-
</script>
42+
```javascript
43+
const unmountToolbar = window.SentryToolbar.init({ ... });
44+
45+
// sometime later...
46+
unmountToolbar();
5047
```
5148

5249
## Init Configuration Options
5350

5451
The following options can be passed into the `.init()` function.
5552

56-
At minimum, you should be calling `.init()` with these three options:
53+
At minimum, you should be calling `.init()` with these two options:
5754
```javascript
5855
window.SentryToolbar.init({
5956
organizationSlug: 'acme',
6057
projectIdOrSlug: 'website',
61-
environment: 'production'
6258
});
6359
```
6460
And you can include any additional options from this list:
@@ -115,7 +111,7 @@ interface FeatureFlagAdapter {
115111
}
116112
```
117113

118-
[MockFeatureFlagIntegration.tsx](https://github.com/getsentry/sentry-toolbar/blob/301c31d561a81e3fd8ffc9532aad3a60af685916/src/env/demo/MockFeatureFlagIntegration.tsx) is an example adapter to use as a reference.
114+
[MockFeatureFlagAdapter.tsx](https://github.com/getsentry/sentry-toolbar/blob/main/src/env/demo/MockFeatureFlagAdapter.tsx) is an example adapter to use as a reference.
119115

120116

121117
## Deploying To Dev, Staging, and Production Environments

0 commit comments

Comments
 (0)