How to use the @sentry/integrations/esm/ember.Ember function in @sentry/integrations

To help you get started, we’ve selected a few @sentry/integrations 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 ilios / frontend / app / sentry.js View on Github external
function startSentry(config) {
  const captureErrors = isErrorCaptureEnabled(config);
  const isDevelopmentEnvironment = config.environment !== 'production';

  Sentry.init({
    ...config.sentry,
    integrations: [new Ember()],
    release: config.APP.version.match(versionRegExp)[0],
    beforeSend(event, hint) {
      const error = hint.originalException;

      // ignore aborted route transitions from the Ember.js router
      if (error && error.name === 'TransitionAborted') {
        return null;
      }

      //print everything to the console when not in production
      if (isDevelopmentEnvironment && error) {
        console.error(error);
      }
      if (!captureErrors) {
        return null;
      }