# Using npm $ npm install --save @sentry/react @sentry/tracing
config
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
Sentry.init({ dsn: 'http://cb4e9b434f004c53a51af8ab45346635@172.17.162.101:9100/2', integrations: [newIntegrations.BrowserTracing()],//性能监控配置 // beforeSend (event, hint) { // // Check if it is an exception, and if so, show the report dialog 错误弹窗 // if (event.exception) { // Sentry.showReportDialog({ eventId: event.event_id }); // } // return event; // }, debug: false,// 调试模式 attachStacktrace: false,//附上堆栈信息 tracesSampleRate: 1,// Be sure to lower this in production environment: 'development', // logLevel: 2, release: 'sentryTest-0.1.0' });