@carisls/sentry-browser
v8.28.0
Published
A bundled Sentry Browser front-end code
Downloads
133
Readme
Sentry Browser Bundle
Bundled Sentry Browser with enabled those integrations:
- BrowserTracing
- ExtraErrorData
- CaptureConsole
- HttpClient
Version of this package will match versions of its main dependencies:
@sentry/browser
:- BrowserTracing
@sentry/integrations
:- ExtraErrorData
- CaptureConsole
- ContextLines
- HttpClient
In order to configure it, you need to pass the options object with those properties:
dsn
env
release
userId
*
Add userId
only if Sentry is not collecting it properly.
How to use without bundlers
- Install the package
npm i @carisls/sentry-browser
2 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')));
3 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: '[email protected]'
}),
</script>
How to use with bundlers
If you want to use bundlers, you can use @sentry/browser
and @sentry/integrations
modules directly.