설정 변경
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user