How to use the epsagon.setError function in epsagon

To help you get started, we’ve selected a few epsagon 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 comicrelief / lambda-wrapper / src / Service / Logger.service.js View on Github external
error(error, message = '') {
    if (ravenIsAvailable && error instanceof Error) {
      Raven.captureException(error);
    }

    if (
      typeof process.env.EPSAGON_TOKEN === 'string'
      && process.env.EPSAGON_TOKEN !== 'undefined'
      && typeof process.env.EPSAGON_SERVICE_NAME === 'string'
      && process.env.EPSAGON_SERVICE_NAME !== 'undefined'
      && error instanceof Error
    ) {
      Epsagon.setError(error);
    }

    logger.log('error', message, { error });
    this.label('error', true);
    this.metric('error', 'error', true);
  }

epsagon

Epsagon Instrumentation for Node.js

MIT
Latest version published 2 years ago

Package Health Score

53 / 100
Full package analysis