File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import React from "react" ;
22import { createRoot } from "react-dom/client" ;
33import App from "./App" ;
4- // import "./sentry";
4+ import * as Sentry from "@sentry/react" ;
5+
6+ try {
7+ await import ( "./sentry" ) ;
8+ } catch ( e ) {
9+ console . warn ( "Sentry failed to load:" , e ) ;
10+ }
511
612const container = document . getElementById ( "app" ) ;
713if ( ! container ) throw new Error ( "No root container found" ) ;
814
915const root = createRoot ( container ) ;
10- root . render ( < App /> ) ;
16+ root . render ( < App /> ) ;
17+
18+ Sentry . captureException ( new Error ( "Manual test event" ) ) ;
Original file line number Diff line number Diff line change 11import * as Sentry from "@sentry/react" ;
2- import { BrowserTracing } from "@sentry/tracing" ;
3- import { Replay } from "@sentry/replay" ;
42
53Sentry . init ( {
64 dsn : "https://de284553b9b4c7a3f7bcd9786eb802f2@o4509151884148736.ingest.us.sentry.io/4510040067735557" ,
7- release : "aiot@0.2" ,
8- environment : "production" ,
9- integrations :[
10- new BrowserTracing ( ) ,
11- new Replay ( ) ,
12- ] ,
5+ integrations : [
6+ Sentry . browserTracingIntegration ( ) ,
7+ Sentry . replayIntegration ( )
8+ ] ,
139 tracesSampleRate : 1.0 ,
1410 replaysSessionSampleRate : 0.1 ,
1511 replaysOnErrorSampleRate : 1.0 ,
16- enableLogs : true ,
17- } ) ;
12+ sendDefaultPii : true ,
13+ enableTracing : true
14+ } ) ;
15+
16+ // Optional: force a test error at startup
17+ // Sentry.captureException(new Error("Startup test error"));
You can’t perform that action at this time.
0 commit comments