Bladeren bron

Merge branch 'master' into xudh

zhejiushizhuce 2 jaren geleden
bovenliggende
commit
4093803a11
2 gewijzigde bestanden met toevoegingen van 20 en 15 verwijderingen
  1. 1 1
      package.json
  2. 19 14
      src/index.js

+ 1 - 1
package.json

@@ -28,7 +28,7 @@
     "@mui/styled-engine-sc": "^5.11.0",
     "@react-spring/web": "^9.7.1",
     "@reduxjs/toolkit": "^1.9.7",
-    "@sentry/react": "^7.110.1",
+    "@sentry/react": "^8.26.0",
     "@tanstack/react-table": "^8.7.9",
     "axios": "^1.6.7",
     "classnames": "^2.3.2",

+ 19 - 14
src/index.js

@@ -10,20 +10,25 @@ import {Provider} from 'react-redux';
 import store from './app/store';
 import * as Sentry from "@sentry/react";
 global.dispatch=store.dispatch;
-// Sentry.init({
-//     dsn: "https://4686ef0d926e140fb482e63efcde1cdf@o4507102375641088.ingest.us.sentry.io/4507102380687360",
-//     integrations: [
-//         Sentry.browserTracingIntegration(),
-//         Sentry.replayIntegration(),
-//     ],
-//     // Performance Monitoring
-//     tracesSampleRate: 1.0, //  Capture 100% of the transactions
-//     // Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
-//     tracePropagationTargets: ["localhost", /^https:\/\/yourserver\.io\/api/],
-//     // 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.
-// });
+Sentry.init({
+    dsn: "https://4686ef0d926e140fb482e63efcde1cdf@o4507102375641088.ingest.us.sentry.io/4507102380687360",
+    integrations: [
+        Sentry.browserTracingIntegration(),
+        Sentry.feedbackIntegration({
+            // Additional SDK configuration goes in here, for example:
+            colorScheme: "dark",
+            autoInject:false,
+            isEmailRequired: true,
+        }),
+    ],
+    // Performance Monitoring
+    tracesSampleRate: 1.0, //  Capture 100% of the transactions
+    // Set 'tracePropagationTargets' to control for which URLs distributed tracing should be enabled
+    tracePropagationTargets: ["localhost","*", /^https:\/\/yourserver\.io\/api/],
+    // 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.
+});
 
 const root = ReactDOM.createRoot(document.getElementById('root'));
 root.render(