How to use the raven-js.addPlugin 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 web-pal / chronos-timetracker / app / index.jsx View on Github external
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { AppContainer } from 'react-hot-loader';
import Raven from 'raven-js';
import { ipcRenderer } from 'electron';

import App from './containers/App';
import store from './store';

import './assets/stylesheets/main.less';

import pjson from '../package.json';

require('smoothscroll-polyfill').polyfill();

Raven.addPlugin(require('./raven-electron-plugin')); // eslint-disable-line
if (process.env.UPLOAD_SENTRY !== '0') {
  if (process.env.SENTRY_LINK) {
    Raven
      .config(process.env.SENTRY_LINK, {
        release: `${pjson.version}_${process.platform}`,
      })
      .install();
  }
}

window.onerror = (...argw) => {
  ipcRenderer.send('errorInWindow', argw);
};

render(
github anteriovieira / vue-raven / src / index.js View on Github external
// Generate DSN
  if (!_options.dsn || !_options.dsn.length) {
    _options.dsn = `${_options.protocol}://${_options.public_key}` +
      `:${_options.private_key}@${_options.host}${_options.path}${_options.project_id}`
  }

  // 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
}
github web-pal / DBGlass / app / index.jsx View on Github external
import { render } from 'react-dom';
import { AppContainer } from 'react-hot-loader';

import Raven from 'raven-js';
import { ipcRenderer as ipc } from 'electron';
import { useSentry, sentryUrl, sendQuitRequest } from 'config';

import Base from './components/Base/Base';
import store from './store';
import { appQuitRequest } from './actions/ui';

import pjson from './package.json';
import './app.global.css';


Raven.addPlugin(require('./raven-electron-plugin')); // eslint-disable-line
if (useSentry) {
  Raven
    .config(sentryUrl, {
      release: `${pjson.version}_${process.platform}`,
    })
    .install();
}

window.onerror = (...argw) => {
  ipc.send('errorInWindow', argw);
};

render(
  
    
  ,
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
      // client is available, because we want to send the event with native
      Raven.setTransport(transportOptions => {