bifocal/node_modules/@sentry/node/esm/integrations/anr/legacy.js

28 lines
689 B
JavaScript

import { getClient } from '@sentry/core';
import { Anr } from './index.js';
// TODO (v8): Remove this entire file and the `enableAnrDetection` export
/**
* @deprecated Use the `Anr` integration instead.
*
* ```ts
* import * as Sentry from '@sentry/node';
*
* Sentry.init({
* dsn: '__DSN__',
* integrations: [new Sentry.Integrations.Anr({ captureStackTrace: true })],
* });
* ```
*/
function enableAnrDetection(options) {
const client = getClient() ;
// eslint-disable-next-line deprecation/deprecation
const integration = new Anr(options);
integration.setup(client);
return Promise.resolve();
}
export { enableAnrDetection };
//# sourceMappingURL=legacy.js.map