diff --git a/.env.development b/.env.development index e579a09..ce7ff55 100644 --- a/.env.development +++ b/.env.development @@ -1,7 +1,6 @@ VITE_APP_ENV=development -# VITE_APP_AUTH_PROXY_HOST='http://3.35.79.250:8090' -# VITE_APP_API_PROXY_HOST='http://3.35.79.250:8080' -VITE_APP_AUTH_PROXY_HOST='http://auth.nicepay.co.kr' -VITE_APP_API_PROXY_HOST='http://rest.nicepay.co.kr' +VITE_APP_AUTH_PROXY_HOST='http://3.35.79.250:8090' +VITE_APP_API_PROXY_HOST='http://3.35.79.250:8080' +#VITE_APP_AUTH_PROXY_HOST='http://auth.nicepay.co.kr' +#VITE_APP_API_PROXY_HOST='http://rest.nicepay.co.kr' GENERATE_SOURCEMAP=false -SENTRY_AUTH_TOKEN=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 \ No newline at end of file diff --git a/.env.production b/.env.production index 5d01b34..838edd0 100644 --- a/.env.production +++ b/.env.production @@ -5,5 +5,4 @@ VITE_APP_ENV=production # VITE_APP_API_PROXY_HOST='http://3.35.79.250:8080' VITE_APP_AUTH_PROXY_HOST='https://auth.nicepay.co.kr' VITE_APP_API_PROXY_HOST='https://rest.nicepay.co.kr' -GENERATE_SOURCEMAP=false -SENTRY_AUTH_TOKEN=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 \ No newline at end of file +GENERATE_SOURCEMAP=false \ No newline at end of file diff --git a/src/app/index.tsx b/src/app/index.tsx index 61b12da..188ffa4 100644 --- a/src/app/index.tsx +++ b/src/app/index.tsx @@ -3,13 +3,11 @@ import React from 'react'; import ReactDOM from 'react-dom/client'; import { App } from './app'; import { initAxios } from '@/shared/configs/axios'; -import { initSentry } from '@/shared/configs/sentry'; import { AppProvider } from './providers/app-provider'; // import appBridge from '@/shared/lib/appBridge'; const initApp = async () => { initAxios(); - initSentry(); // appBridge.sendMessage('login') }; diff --git a/src/shared/configs/sentry/index.tsx b/src/shared/configs/sentry/index.tsx index 3a82d22..af79b10 100644 --- a/src/shared/configs/sentry/index.tsx +++ b/src/shared/configs/sentry/index.tsx @@ -1,61 +1,20 @@ -/* eslint-disable react-refresh/only-export-components */ import * as Sentry from '@sentry/react'; import { OverlayProvider } from 'overlay-kit'; -import React, { lazy } from 'react'; +import { lazy } from 'react'; import { - createRoutesFromChildren, - matchRoutes, Navigate, Route, - Routes, - useLocation, - useNavigationType, + Routes } from 'react-router'; import { createBrowserRouter } from 'react-router-dom'; - import { AppChildren } from '@/app/app-children'; import { GlobalAPIErrorBoundary } from '@/widgets/error-boundaries'; import { NotFoundError } from '@/widgets/fallbacks'; import { ProtectedRoute } from '@/widgets/protected-route'; -import { PullToRefreshRoute } from '@/widgets/pull-to-refresh/pull-to-refresh-route'; import { SubLayout } from '@/widgets/sub-layout'; -import { IS_PROD } from '@/shared/constants/environment'; import { ROUTE_NAMES } from '@/shared/constants/route-names'; import { toCamelCase } from '@/shared/lib/to-camel-case'; -export const initSentry = () => { - if (IS_PROD) { - Sentry.init({ - environment: import.meta.env.VITE_APP_ENV, - dsn: 'https://ddd8755ce025f753e8521af5b1034a93@o4507569039867904.ingest.us.sentry.io/4507569041244160', - integrations: [ - Sentry.browserTracingIntegration(), - Sentry.browserProfilingIntegration(), - Sentry.replayIntegration(), - Sentry.reactRouterV6BrowserTracingIntegration({ - useEffect: React.useEffect, - useLocation, - useNavigationType, - createRoutesFromChildren, - matchRoutes, - }), - ], - normalizeDepth: 6, - // Performance Monitoring - tracesSampleRate: 1.0, // Capture 100% of the transactions - // Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled - tracePropagationTargets: [ - 'http://3.35.79.250:8090' - ], - // 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. - - profilesSampleRate: 1.0, - }); - } -}; - const sentryCreateBrowserRouter = Sentry.wrapCreateBrowserRouterV6(createBrowserRouter); const modules = import.meta.glob('~/pages/**/*.tsx'); diff --git a/vite.config.build.mjs b/vite.config.build.mjs index cb4f79f..7e57893 100644 --- a/vite.config.build.mjs +++ b/vite.config.build.mjs @@ -1,7 +1,5 @@ import baseConfig from './vite.config.mjs'; import { defineConfig } from 'vite'; -import { sentryVitePlugin } from '@sentry/vite-plugin'; - const rollupExternalModules = { tests: (id) => /.*\.test\.(ts|tsx)$/.test(id) || /.*\.spec\.(ts|tsx)$/.test(id), }; @@ -29,23 +27,6 @@ export default ({ mode }) => { }, plugins: [ ...base.plugins, - sentryVitePlugin({ - org: 'medea-cc', - project: 'javascript-react', - authToken: process.env.SENTRY_AUTH_TOKEN, - sourcemaps: { - filesToDeleteAfterUpload: '**/*.js.map', - }, - bundleSizeOptimizations: { - excludeDebugStatement: true, - // Only relvant if you added `browserTracingIntegration` - excludePerformanceMonitoring: true, - // Only relevant if you added `replatIntegration` - excludeReplayIframe: true, - excludeReplayShadowDom: true, - excludeReplayWorker: true, - }, - }), ], }); }; \ No newline at end of file diff --git a/vite.config.mjs b/vite.config.mjs index 0ef6753..84e9de8 100644 --- a/vite.config.mjs +++ b/vite.config.mjs @@ -34,26 +34,6 @@ export default ({ mode }) => { }, }), ]; - - if (mode === 'production') { - plugins.push( - sentryVitePlugin({ - org: 'media-cc', - project: 'javascript-react', - authToken: process.env.SENTRY_AUTH_TOKEN, - bundleSizeOptimizations: { - excludeDebugStatements: true, - // Only relevant if you added `browserTracingIntegration` - excludePerformanceMonitoring: true, - // Only relevant if you added `replayIntegration` - excludeReplayIframe: true, - excludeReplayShadowDom: true, - excludeReplayWorker: true, - }, - disable: false, - }), - ); - } return defineConfig({ build: {