How to use the raven-js.setDataCallback 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 hypothesis / client / src / sidebar / raven.js View on Github external
function angularModule(angular) {
  const prevCallback = Raven._globalOptions.dataCallback;
  angularPlugin(Raven, angular);

  // Hack: Ensure that both our data callback and the one provided by
  // the Angular plugin are run when submitting errors.
  //
  // The Angular plugin replaces any previously installed
  // data callback with its own which does not in turn call the
  // previously registered callback that we registered when calling
  // Raven.config().
  //
  // See https://github.com/getsentry/raven-js/issues/522
  const angularCallback = Raven._globalOptions.dataCallback;
  Raven.setDataCallback(function(data) {
    return angularCallback(prevCallback(data));
  });
  return angular.module('ngRaven');
}
github getsentry / sentry-react-native / lib / RavenClient.js View on Github external
setDataCallback(callback) {
    Raven.setDataCallback(callback);
  }
github opennode / waldur-homeport / app / scripts / components / core / sentry.js View on Github external
function attachSentry(ENV) {
  if (ENV.SENTRY_DSN) {
    Raven.config(ENV.SENTRY_DSN).install();
    Raven.setDataCallback(function(data, original) {
      _normalizeData(data);
      original && original(data);
    });
  }
}