How to use the raven.install function in raven

To help you get started, we’ve selected a few raven 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 ember-cli-sentry / ember-cli-sentry / addon / services / raven.js View on Github external
// Keeping existing config values for includePaths, whitelistUrls, for compatibility.
      const ravenConfig = assign({
        environment,
        includePaths,
        whitelistUrls,
        release: this.get(serviceReleaseProperty) || config.APP.version
      }, ravenOptions);

      Raven.config(dsn, ravenConfig);
    } catch (e) {
      console.warn('Error during `sentry` initialization: ' + e);
      return;
    }

    Raven.install();

    const { globalErrorCatching = true } = config.sentry;

    if (globalErrorCatching === true) {
      this.enableGlobalErrorCatching();
    }
  },
github fruum / fruum / server / main.js View on Github external
function FruumServer(options, cli_cmd, ready) {
  logger.system('Starting Fruum');
  options = options || {};

  // start sentry
  if (options.sentry && options.sentry.dsn) {
    logger.system('Sentry is enabled');
    Raven.config(options.sentry.dsn).install();
    Raven.install(function() {
      process.exit(1);
    });
  } else {
    logger.system('Sentry is disabled');
  }

  logger.system('Creating build folder');
  mkdirp.sync(BUILD_FOLDER);

  // defaults
  options.static_root = path.resolve(
    __dirname + '/../' + (options.static_root || 'static')
  );
  options.static_prefix = options.static_prefix || '/static';
  options.port = options.port || 3000;
  options.storage_engine = options.storage_engine || 'base';
github argos-ci / argos / src / modules / crashReporter / common.js View on Github external
export function initializeCrashReporter(options) {
  const { DSN, ravenConfig } = options

  raven.config(production ? DSN : false, {
    environment: process.env.NODE_ENV, // Should always be production
    ...ravenConfig,
  })

  if (production) {
    raven.install()
  }
}
github argos-ci / argos / packages / argos-cli / src / setupRaven.js View on Github external
function setupRaven() {
  raven.config(noSentry ? false : DSN, {
    environment: 'production',
    autoBreadcrumbs: true,
    release: pkg.version,
  })

  if (!noSentry) {
    raven.install()
  }
}
github serverless / components / src / utils / telemetry / errorReporter.js View on Github external
async function errorReporter() {
  const trackingConfigFilePath = path.join('..', '..', 'tracking-config.json')

  if (await fileExists(trackingConfigFilePath)) {
    const trackingConfig = await readFile(trackingConfigFilePath)

    const { sentryDSN, environment } = trackingConfig

    raven.config(sentryDSN, {
      environment,
      autoBreadcrumbs: true,
      release: pkg.version
    })
    raven.disableConsoleAlerts()
    raven.install()

    return raven
  }

  return null
}