"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const Sentry = tslib_1.__importStar(require("@sentry/node"));
if (process.env.SENTRY_DSN) {
    Sentry.init({
        dsn: process.env.SENTRY_DSN,
        integrations: [],
        environment: process.env.ENVIRONMENT,
        release: process.env.GIT_SHA,
        // Performance Monitoring
        tracesSampleRate: 1, //  Capture 100% of the transactions
        // Set sampling rate for profiling - this is relative to tracesSampleRate
        profilesSampleRate: 1,
    });
    // process.on('uncaughtException', (error) => {
    //   Sentry.captureException(error)
    //   logger.error(`Uncaught Exception: ${error}`)
    // })
    // // Global error handling for unhandled promise rejections
    // process.on('unhandledRejection', (reason, promise) => {
    //   Sentry.captureException(reason)
    //   logger.error(`Unhandled Rejection at: ${promise}, reason: ${reason}`)
    // })
}
// eslint-disable-next-line unicorn/prefer-module
module.exports = Sentry;
//# sourceMappingURL=sentry.js.map