1- import { RemixBrowser , useLocation , useMatches } from '@remix-run/react' ;
2- import * as Sentry from '@sentry/remix' ;
3- import { startTransition , StrictMode , useEffect } from 'react' ;
1+ import { RemixBrowser } from '@remix-run/react' ;
2+ import { startTransition , StrictMode } from 'react' ;
43import { hydrateRoot } from 'react-dom/client' ;
54import { I18nextProvider } from 'react-i18next' ;
65
76import { clientServices } from './services/init.client' ;
8- import { getClientEnv } from './utils/environment.client' ;
97
108async function hydrate ( ) {
119 const { i18nextClientService } = clientServices ;
@@ -32,35 +30,3 @@ if (window.requestIdleCallback) {
3230 // eslint-disable-next-line @typescript-eslint/no-misused-promises
3331 window . setTimeout ( hydrate , 1 ) ;
3432}
35-
36- Sentry . init ( {
37- dsn : getClientEnv ( 'SENTRY_DSN' ) ,
38- environment : getClientEnv ( 'SENTRY_ENVIRONMENT' ) ,
39- integrations : [
40- new Sentry . BrowserTracing ( {
41- routingInstrumentation : Sentry . remixRouterInstrumentation (
42- useEffect ,
43- useLocation ,
44- useMatches
45- ) ,
46- } ) ,
47- // Replay is only available in the client
48- new Sentry . Replay ( ) ,
49- ] ,
50-
51- // Set tracesSampleRate to 1.0 to capture 100%
52- // of transactions for performance monitoring.
53- // We recommend adjusting this value in production
54- tracesSampleRate : 1.0 ,
55-
56- // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled
57- tracePropagationTargets : [
58- getClientEnv ( 'MARBLE_APP_DOMAIN' ) ,
59- getClientEnv ( 'MARBLE_API_DOMAIN' ) ,
60- ] ,
61-
62- // Capture Replay for 10% of all sessions,
63- // plus for 100% of sessions with an error
64- replaysSessionSampleRate : 0.1 ,
65- replaysOnErrorSampleRate : 1.0 ,
66- } ) ;
0 commit comments