How to use the @sentry/browser.setExtra function in @sentry/browser

To help you get started, we’ve selected a few @sentry/browser 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 loomnetwork / dashboard / src / store / gateway / reactions.ts View on Github external
async (mapping) => {
      log(mapping)
      if (mapping === null) {
        log("null mapping")
        // todo destroy anything that needs to be disposed of
        return
      } else if (mapping.to.isEmpty()) {
        await gatewayModule.checkRelentlessUser(mapping.from.local.toString().toLowerCase())
      } else if (mapping.to!.isEmpty() === false) {

        Sentry.setExtra(mapping.from.chainId, mapping.from.local.toString())
        Sentry.setExtra(mapping.to.chainId, mapping.to.local.toString())

        await setPlasmaAccount(mapping)
        await initializeGateways(mapping, store.state.gateway.multisig)

        const ethereumGateways = EthereumGateways.service()

        // Listen to approval & deposit events
        listenToDepositApproval(
          ethereumModule.state.address,
          ethereumGateways.loomGateway,
          ethereumModule.getERC20("LOOM")!,
        )

        listenToDeposit(
          ethereumModule.state.address,
github hypothesis / client / src / sidebar / util / sentry.js View on Github external
});
        }
      } catch (e) {
        // If something went wrong serializing the data, just ignore it.
      }

      return event;
    },
  });

  // In the sidebar application, it is often useful to know the URL which the
  // client was loaded into. This information is usually available in an iframe
  // via `document.referrer`. More information about the document is available
  // later when frames where the "annotator" code has loaded have connected to
  // the sidebar via `postMessage` RPC messages.
  Sentry.setExtra('document_url', document.referrer);
}
github opennode / waldur-homeport / src / core / sentry.js View on Github external
return function(exception, cause) {
    if (ENV.SENTRY_DSN) {
      if (cause) {
        Sentry.setExtra('cause', cause);
      }
      Sentry.captureException(exception);
    }
    $log.warn(exception, cause);
  };
}