How to use the @sentry/node.flush function in @sentry/node

To help you get started, we’ve selected a few @sentry/node 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 HAECHI-LABS / henesis-cli / src / common / base.ts View on Github external
dsn: 'https://27ff620b68bf4da39b40f5d491e16fd8@sentry.io/1779992',
    });
    Sentry.configureScope(scope => {
      scope.setUser({ id: this._getUserId() });
      if (this._clientInfo) {
        scope.setTags({
          OS: String(this._clientInfo[1]),
          'Node Version': String(this._clientInfo[2]),
          'CPU Count': String(this._clientInfo[3]),
          RAM: String(this._clientInfo[4]),
          'CLI Version': String(this._clientInfo[5]),
        });
      }
    });
    Sentry.captureException(error);
    await Sentry.flush();
  }
github strapi / strapi / packages / strapi-generate-new / lib / utils / usage.js View on Github external
async function captureError(message) {
  try {
    sentry.captureMessage(message, 'error');
    await sentry.flush();
  } catch (err) {
    /** ignore errors*/
    return Promise.resolve();
  }
}
github strapi / strapi / packages / strapi-generate-new / lib / utils / usage.js View on Github external
async function captureException(error) {
  try {
    sentry.captureException(error);
    await sentry.flush();
  } catch (err) {
    /** ignore errors*/
    return Promise.resolve();
  }
}