Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 10 additions & 14 deletions docs/product/dev-toolbar/setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: "Get started with Sentry's Dev Toolbar, bringing critical Sentry in
## Set Up Your Web App

<Alert level="warning">
[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.
[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.
</Alert>

You need to complete two steps to get the toolbar rendered on the page:
Expand All @@ -27,10 +27,10 @@ You need to complete two steps to get the toolbar rendered on the page:
<html>
<head>...</head>
<body>
...
<script src="https://browser.sentry-cdn.com/sentry-toolbar/latest/toolbar.min.js"></script>
<script>
window.SentryToolbar.init({ });
window.SentryToolbar.init({ ... });
</script>
</body>
</html>
Expand All @@ -39,26 +39,22 @@ You need to complete two steps to get the toolbar rendered on the page:
### Unmounting The Toolbar

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.
```html
<script src="https://browser.sentry-cdn.com/sentry-toolbar/latest/toolbar.min.js"></script>
<script>
const unmountToolbar = window.SentryToolbar.init({ … });

// sometime later...
unmountToolbar();
</script>
```javascript
const unmountToolbar = window.SentryToolbar.init({ ... });

// sometime later...
unmountToolbar();
```

## Init Configuration Options

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

At minimum, you should be calling `.init()` with these three options:
At minimum, you should be calling `.init()` with these two options:
```javascript
window.SentryToolbar.init({
organizationSlug: 'acme',
projectIdOrSlug: 'website',
environment: 'production'
});
```
And you can include any additional options from this list:
Expand Down Expand Up @@ -115,7 +111,7 @@ interface FeatureFlagAdapter {
}
```

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


## Deploying To Dev, Staging, and Production Environments
Expand Down
Loading