import * as Sentry from "@sentry/browser";
export const handleSentry = () => {
    Sentry.init({
        dsn: "http://afd94bb231f888a68a27e6b681e73cab@101.37.14.57:9002/3",
        environment: process.env.NODE_ENV,
        integrations: [
            new Sentry.BrowserTracing({
                // Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
                tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
            }),
            new Sentry.Replay({
                maskAllText: false,
                blockAllMedia: false,
            }),
        ],
        // Performance Monitoring
        tracesSampleRate: 1.0, //  Capture 100% of the transactions
        // Session Replay
        replaysSessionSampleRate: 0.1, // This sets the sample rate at 10%. You may want to change it to 100% while in development and then sample at a lower rate in production.
        replaysOnErrorSampleRate: 1.0, // If you're not already sampling the entire session, change the sample rate to 100% when sampling sessions where errors occur.
    });
    Sentry.configureScope((scope) => {
        scope.addAttachment({ filename: "userInfo.txt", data:localStorage.getItem('userInfo') });
    });
    Sentry.setUser({
        email: "foo@example.com",
        fullName: "Jane Doe",
    });

};
