legacy.js 781 B

1234567891011121314151617181920212223242526272829
  1. Object.defineProperty(exports, '__esModule', { value: true });
  2. const core = require('@sentry/core');
  3. const index = require('./index.js');
  4. // TODO (v8): Remove this entire file and the `enableAnrDetection` export
  5. /**
  6. * @deprecated Use the `Anr` integration instead.
  7. *
  8. * ```ts
  9. * import * as Sentry from '@sentry/node';
  10. *
  11. * Sentry.init({
  12. * dsn: '__DSN__',
  13. * integrations: [new Sentry.Integrations.Anr({ captureStackTrace: true })],
  14. * });
  15. * ```
  16. */
  17. function enableAnrDetection(options) {
  18. const client = core.getClient() ;
  19. // eslint-disable-next-line deprecation/deprecation
  20. const integration = new index.Anr(options);
  21. integration.setup(client);
  22. return Promise.resolve();
  23. }
  24. exports.enableAnrDetection = enableAnrDetection;
  25. //# sourceMappingURL=legacy.js.map