Sentry Browser Bundle

Bundled Sentry Browser with enabled those integrations:
- BrowserTracing
- BrowserApiErrors
- ExtraErrorData
- CaptureConsole
- ContextLines
- HttpClient
Version of this package will match versions of its main dependency:
@sentry/browser (all integrations are included in this package):
- BrowserTracing
- BrowserApiErrors
- ExtraErrorData
- CaptureConsole
- ContextLines
- HttpClient
In order to configure it, you need to pass the options object with those properties:
dsn (required) - Your Sentry DSN
env - Environment name (e.g., 'development', 'production')
release - Release version identifier
userId (optional) - User ID to associate with events. Add only if Sentry is not collecting it properly.
tracesSampleRate (optional) - Sample rate for performance traces (0.0 to 1.0). Defaults to 0.4.
How to use without bundlers
npm i @carisls/sentry-browser
- Export bundled file as a static resource (Express)
app.use('/third-party/sentry-browser', express.static(path.join(__dirname, 'node_modules/@carisls/sentry-browser/dist')));
- Reference it in HTML/PUG file
<script type="module">
import configureSentry from '/third-party/sentry-browser/bundle.min.js';
configureSentry({
dsn: '...',
env: 'development',
release: 'v10.0.4',
userId: 'peterp@gmail.com'
});
</script>
How to use with bundlers
If you want to use bundlers, you can use @sentry/browser module directly. All integrations are available from @sentry/browser (no need for @sentry/integrations).