How to use the raven.generateEventId 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 globocom / functions / lib / domain / ErrorTracker.js View on Github external
function notifySentryGlobal(ctx) {
  if (!raven.dsn) {
    log.info('Does not have global sentry');
    return;
  }
  ctx.event_id = raven.generateEventId();
  raven.send(ctx, (publishErr) => {
    if (publishErr) {
      log.error('Failed to publish error into global sentry: %s', publishErr.message);
      return;
    }

    log.info('Published in global sentry');
  });
}