File tree Expand file tree Collapse file tree
dev-packages/e2e-tests/test-applications/lighthouse-react/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,6 +2,11 @@ import * as Sentry from '@sentry/react';
22import { createRoot } from 'react-dom/client' ;
33import App from './App' ;
44
5+ const sentryInitStart = performance . now ( ) ;
6+ performance . mark ( 'sentry-sdk-init-start' , {
7+ detail : { mode : import . meta. env . MODE ?? 'unknown_mode' } ,
8+ } ) ;
9+
510if ( import . meta. env . MODE === 'tracing-replay' ) {
611 Sentry . init ( {
712 dsn : import . meta. env . VITE_E2E_TEST_DSN as string | undefined ,
@@ -33,6 +38,16 @@ if (import.meta.env.MODE === 'tracing-replay') {
3338 // no DSN warning). We're measuring pure SDK-loading + tree-shaking cost.
3439 Sentry . init ( { enabled : false } ) ;
3540}
41+
42+ performance . measure ( 'sentry-sdk-init-duration' , {
43+ detail : { mode : import . meta. env . MODE ?? 'unknown_mode' } ,
44+ start : sentryInitStart ,
45+ end : performance . now ( ) ,
46+ } ) ;
47+ performance . mark ( 'sentry-sdk-init-end' , {
48+ detail : { mode : import . meta. env . MODE ?? 'unknown_mode' } ,
49+ } ) ;
50+
3651// 'no-sentry' mode: all branches above are statically dead, so Vite drops
3752// the @sentry /react import entirely from the bundle.
3853
You can’t perform that action at this time.
0 commit comments