How to use the raven-js.install function in raven-js

To help you get started, we’ve selected a few raven-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github getsentry / sentry-react-native / lib / RavenClient.js View on Github external
install() {
    // we have to remove the sampleRate if native client is available
    // otherwise we will sample twice
    if (Sentry.isNativeClientAvailable() && this.options.sampleRate !== undefined) {
      Raven._globalOptions.sampleRate = 1;
    }

    Raven.install();

    Raven.addPlugin(
      require('./raven-plugin'),
      {
        nativeClientAvailable: Sentry.isNativeClientAvailable(),
        handlePromiseRejection: this.options.handlePromiseRejection
      },
      data => {
        if (Sentry.options.internal) {
          data.dist = Sentry.options.internal.dist;
        }
      }
    );

    if (Sentry.isNativeClientAvailable()) {
      // We overwrite the default transport handler when the native
github anteriovieira / vue-raven / src / index.js View on Github external
}

  // Public DSN (without private key)
  if (!_options.public_dsn || !_options.public_dsn.length) {
    _options.public_dsn = _options.dsn.replace(/:\w+@/, '@')
  }

  // config raven
  Raven.config(_options.dsn, _options.config)

  if (!_options.disableAutoReport) {
    Raven.addPlugin(RavenVue, Vue)
  }

  // install Raven
  Raven.install()

  // add raven instance
  Vue.prototype.$raven = Raven
}