npm

@carisls/sentry-browser

8.28.0 • Public • Published

Sentry Browser Bundle

NPM Version NPM Downloads Install Size

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

  1. 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: 'peterp@gmail.com'
  }), 
</script>

How to use with bundlers

If you want to use bundlers, you can use @sentry/browser and @sentry/integrations modules directly.

Package Sidebar

Install

npm i @carisls/sentry-browser

Weekly Downloads

40

Version

8.28.0

License

MIT

Unpacked Size

2.17 MB

Total Files

9

Last publish

Collaborators

  • mstrujic-caris
  • michaelortho