How to use the @sentry/core.configureScope function in @sentry/core

To help you get started, we’ve selected a few @sentry/core 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 getsentry / sentry-javascript / packages / browser / src / integrations / dedupe.ts View on Github external
public install(): void {
    configureScope(scope => {
      scope.addEventProcessor(async (currentEvent: SentryEvent) => {
        // Juuust in case something goes wrong
        try {
          if (this.shouldDropEvent(currentEvent, this.previousEvent)) {
            return null;
          }
        } catch (_oO) {
          return (this.previousEvent = currentEvent);
        }

        return (this.previousEvent = currentEvent);
      });
    });
  }