How to use the logrocket.captureException function in logrocket

To help you get started, we’ve selected a few logrocket 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 jitsucom / jitsu / configurator / frontend / src / lib / services / analytics.ts View on Github external
private sendException(error: Error) {
    if (!this.isDev()) {
      console.log('Sending error to monitoring system');
      this.ensureLogRocketInitialized();
      if (this.appConfig.rawConfig.keys.logrocket) {
        LogRocket.captureException(error, {
          tags: {
            environment: window.location.host
          }
        });
      }
      this.track('error', getErrorPayload(error))
    }
  }
}

logrocket

JavaScript SDK for [LogRocket](https://logrocket.com/)

MIT
Latest version published 2 months ago

Package Health Score

68 / 100
Full package analysis