How to use the raven.disableConsoleAlerts 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 nylas-mail-lives / nylas-mail / packages / client-app / src / error-logger-extensions / nylas-private-error-reporter.js View on Github external
_setupSentry() {
    // Initialize the Sentry connector
    if (!sentryDSN) {
      return;
    }
    Raven.disableConsoleAlerts();
    Raven.config(sentryDSN, {
      name: this.deviceHash,
      release: this.getVersion(),
    }).install();

    Raven.on('error', (e) => {
      console.log(e.reason);
      console.log(e.statusCode);
      return console.log(e.response);
    });
  }
github nylas-mail-lives / nylas-mail / packages / local-private / src / error-logger-extensions / nylas-private-error-reporter.js View on Github external
_setupSentry() {
    // Initialize the Sentry connector
    const sentryDSN = "https://0796ad36648a40a094128d6e0287eda4:0c329e562cc74e06a48488772dd0f578@sentry.io/134984"

    Raven.disableConsoleAlerts();
    Raven.config(sentryDSN, {
      name: this.deviceHash,
      release: this.getVersion(),
    }).install();

    Raven.on('error', (e) => {
      console.log(e.reason);
      console.log(e.statusCode);
      return console.log(e.response);
    });
  }
github argos-ci / argos / src / modules / crashReporter / server.js View on Github external
export function initializeCrashReporterServer() {
  if (process.env.NODE_ENV !== 'production') {
    // Prevent logging of useless information
    // https://github.com/getsentry/raven-node/blob/3f3d553cb02c7d69deeab4edaf928f739b17071f/docs/usage.rst#disable-console-alerts
    raven.disableConsoleAlerts()
  }

  initializeCrashReporter({
    DSN: config.get('sentry.serverDsn'),
    ravenConfig: {
      autoBreadcrumbs: true,
      release: config.get('releaseVersion'),
    },
  })

  // eslint-disable-next-line no-underscore-dangle
  global.__CRASH_REPORTER_LIB__ = raven
}
github Foundry376 / Mailspring / app / src / error-logger-extensions / raven-error-reporter.js View on Github external
_setupSentry() {
    Raven.disableConsoleAlerts();
    Raven.config(
      'https://18d04acdd03b4389a36ef7d1d39f8025:5cb2e99bd3634856bfb3711461201439@sentry.io/196829',
      {
        name: this.deviceHash,
        release: this.getVersion(),
      }
    ).install();

    // Just give us something random that we can use to tell how many users are impacted
    // by each bug. This is important because sometimes one user will hit an exception 1,000
    // times and skew the Sentry data.
    Raven.mergeContext({
      user: {
        id: this.deviceHash,
      },
    });
github probot / probot / src / plugins / sentry.ts View on Github external
export = (app: Application) => {
  // If sentry is configured, report all logged errors
  if (process.env.SENTRY_DSN) {
    app.log.debug(process.env.SENTRY_DSN, 'Errors will be reported to Sentry')
    Raven.disableConsoleAlerts()
    Raven.config(process.env.SENTRY_DSN, {
      autoBreadcrumbs: true
    }).install()

    app.log.target.addStream(sentryStream(Raven))
  }
}
github balena-io / balena-cli / lib / app-common.ts View on Github external
function setupRaven() {
	const Raven = require('raven');
	Raven.disableConsoleAlerts();
	Raven.config(require('./config').sentryDsn, {
		captureUnhandledRejections: true,
		autoBreadcrumbs: true,
		release: require('../package.json').version,
	}).install(function(_logged: any, error: Error) {
		console.error(error);
		return process.exit(1);
	});

	Raven.setContext({
		extra: {
			args: process.argv,
			node_version: process.version,
		},
	});
}
github Syncano / syncano-node / packages / cli / src / utils / raven.js View on Github external
export default () => {
  if (process.env.NODE_ENV !== 'test') {
    info('Disabling raven alerts')
    Raven.disableConsoleAlerts()
  }

  const CLI_SENTRY_DSN = 'https://ffed6f289ae7416f84a113aba08f35c3:d1b25e9121164692b0ef4c1de84cdf02@sentry.io/135248'

  const dataCallback = (data) => {
    debug('dataCallback')
    const newData = Object.assign({}, data)
    newData.user = {
      project: session.project ? session.project.instance : null,
      host: session.getHost()
    }
    return newData
  }

  const params = {
    release: pjson.version,