diff --git a/api/app.py b/api/app.py index a11e0e4..67c7842 100644 --- a/api/app.py +++ b/api/app.py @@ -110,6 +110,7 @@ def create_app(testing: Optional[bool] = False) -> Flask: "style-src": ["'self'", "'unsafe-inline'", "https://fonts.googleapis.com"], "font-src": ["'self'", "https://fonts.gstatic.com"], "connect-src": ["'self'", "*.ingest.sentry.io"], + "worker-src": ["'self'", "blob:"], # Required for Sentry Session Replay "frame-ancestors": ["'none'"], } diff --git a/package-lock.json b/package-lock.json index afd2a9e..b4586b5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,39 +9,39 @@ "version": "1.0.0", "dependencies": { "@mui/base": "^5.0.0-beta.28", - "@mui/icons-material": "*", - "@mui/lab": "*", - "@mui/material": "*", - "@mui/styled-engine-sc": "*", + "@mui/icons-material": "latest", + "@mui/lab": "latest", + "@mui/material": "latest", + "@mui/styled-engine-sc": "latest", "@mui/x-data-grid": "^6.18.4", - "@mui/x-date-pickers": "*", - "@sentry/react": "*", - "@tanstack/react-query": "*", - "@testing-library/jest-dom": "*", - "@testing-library/react": "*", - "@testing-library/user-event": "*", - "dayjs": "*", - "env-cmd": "*", - "react": "*", - "react-dom": "*", - "react-hook-form": "*", - "react-hook-form-mui": "*", - "react-router-dom": "*", - "styled-components": "*" + "@mui/x-date-pickers": "latest", + "@sentry/react": "latest", + "@tanstack/react-query": "latest", + "@testing-library/jest-dom": "latest", + "@testing-library/react": "latest", + "@testing-library/user-event": "latest", + "dayjs": "latest", + "env-cmd": "latest", + "react": "latest", + "react-dom": "latest", + "react-hook-form": "latest", + "react-hook-form-mui": "latest", + "react-router-dom": "latest", + "styled-components": "latest" }, "devDependencies": { - "@craco/craco": "*", - "@sentry/cli": "*", - "@types/node": "*", - "@types/react": "*", - "@types/react-dom": "*", - "@types/styled-components": "*", + "@craco/craco": "latest", + "@sentry/cli": "latest", + "@types/node": "latest", + "@types/react": "latest", + "@types/react-dom": "latest", + "@types/styled-components": "latest", "husky": "^8.0.3", "lint-staged": "^15.2.10", "prettier": "^3.2.5", "react-app-alias": "^2.2.2", - "react-scripts": "*", - "typescript": "*" + "react-scripts": "latest", + "typescript": "latest" } }, "node_modules/@adobe/css-tools": { @@ -4393,61 +4393,75 @@ "integrity": "sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg==", "dev": true }, + "node_modules/@sentry-internal/browser-utils": { + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.34.0.tgz", + "integrity": "sha512-4AcYOzPzD1tL5eSRQ/GpKv5enquZf4dMVUez99/Bh3va8qiJrNP55AcM7UzZ7WZLTqKygIYruJTU5Zu2SpEAPQ==", + "dependencies": { + "@sentry/core": "8.34.0", + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0" + }, + "engines": { + "node": ">=14.18" + } + }, "node_modules/@sentry-internal/feedback": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-7.109.0.tgz", - "integrity": "sha512-EL7N++poxvJP9rYvh6vSu24tsKkOveNCcCj4IM7+irWPjsuD2GLYYlhp/A/Mtt9l7iqO4plvtiQU5HGk7smcTQ==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.34.0.tgz", + "integrity": "sha512-aYSM2KPUs0FLPxxbJCFSwCYG70VMzlT04xepD1Y/tTlPPOja/02tSv2tyOdZbv8Uw7xslZs3/8Lhj74oYcTBxw==", "dependencies": { - "@sentry/core": "7.109.0", - "@sentry/types": "7.109.0", - "@sentry/utils": "7.109.0" + "@sentry/core": "8.34.0", + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0" }, "engines": { - "node": ">=12" + "node": ">=14.18" } }, - "node_modules/@sentry-internal/replay-canvas": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-7.109.0.tgz", - "integrity": "sha512-Lh/K60kmloR6lkPUcQP0iamw7B/MdEUEx/ImAx4tUSMrLj+IoUEcq/ECgnnVyQkJq59+8nPEKrVLt7x6PUPEjw==", + "node_modules/@sentry-internal/replay": { + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.34.0.tgz", + "integrity": "sha512-EoMh9NYljNewZK1quY23YILgtNdGgrkzJ9TPsj6jXUG0LZ0Q7N7eFWd0xOEDBvFxrmI3cSXF1i4d1sBb+eyKRw==", "dependencies": { - "@sentry/core": "7.109.0", - "@sentry/replay": "7.109.0", - "@sentry/types": "7.109.0", - "@sentry/utils": "7.109.0" + "@sentry-internal/browser-utils": "8.34.0", + "@sentry/core": "8.34.0", + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0" }, "engines": { - "node": ">=12" + "node": ">=14.18" } }, - "node_modules/@sentry-internal/tracing": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.109.0.tgz", - "integrity": "sha512-PzK/joC5tCuh2R/PRh+7dp+uuZl7pTsBIjPhVZHMTtb9+ls65WkdZJ1/uKXPouyz8NOo9Xok7aEvEo9seongyw==", + "node_modules/@sentry-internal/replay-canvas": { + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.34.0.tgz", + "integrity": "sha512-x8KhZcCDpbKHqFOykYXiamX6x0LRxv6N1OJHoH+XCrMtiDBZr4Yo30d/MaS6rjmKGMtSRij30v+Uq+YWIgxUrg==", "dependencies": { - "@sentry/core": "7.109.0", - "@sentry/types": "7.109.0", - "@sentry/utils": "7.109.0" + "@sentry-internal/replay": "8.34.0", + "@sentry/core": "8.34.0", + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0" }, "engines": { - "node": ">=8" + "node": ">=14.18" } }, "node_modules/@sentry/browser": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.109.0.tgz", - "integrity": "sha512-yx+OFG+Ab9qUDDgV9ZDv8M9O9Mqr0fjKta/LMlWALYLjzkMvxsPlRPFj7oMBlHqOTVLDeg7lFYmsA8wyWQ8Z8g==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.34.0.tgz", + "integrity": "sha512-3HHG2NXxzHq1lVmDy2uRjYjGNf9NsJsTPlOC70vbQdOb+S49EdH/XMPy+J3ruIoyv6Cu0LwvA6bMOM6rHZOgNQ==", "dependencies": { - "@sentry-internal/feedback": "7.109.0", - "@sentry-internal/replay-canvas": "7.109.0", - "@sentry-internal/tracing": "7.109.0", - "@sentry/core": "7.109.0", - "@sentry/replay": "7.109.0", - "@sentry/types": "7.109.0", - "@sentry/utils": "7.109.0" + "@sentry-internal/browser-utils": "8.34.0", + "@sentry-internal/feedback": "8.34.0", + "@sentry-internal/replay": "8.34.0", + "@sentry-internal/replay-canvas": "8.34.0", + "@sentry/core": "8.34.0", + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0" }, "engines": { - "node": ">=8" + "node": ">=14.18" } }, "node_modules/@sentry/cli": { @@ -4595,66 +4609,52 @@ } }, "node_modules/@sentry/core": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.109.0.tgz", - "integrity": "sha512-xwD4U0IlvvlE/x/g/W1I8b4Cfb16SsCMmiEuBf6XxvAa3OfWBxKoqLifb3GyrbxMC4LbIIZCN/SvLlnGJPgszA==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.34.0.tgz", + "integrity": "sha512-adrXCTK/zsg5pJ67lgtZqdqHvyx6etMjQW3P82NgWdj83c8fb+zH+K79Z47pD4zQjX0ou2Ws5nwwi4wJbz4bfA==", "dependencies": { - "@sentry/types": "7.109.0", - "@sentry/utils": "7.109.0" + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0" }, "engines": { - "node": ">=8" + "node": ">=14.18" } }, "node_modules/@sentry/react": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry/react/-/react-7.109.0.tgz", - "integrity": "sha512-KqXoDh6LVhNO+FLdM5LiTGpuorFvjoBPQ4nPGIVbjeMY/KZIau3kFxR142EvCApxmD69yvS5EhMnEqlNdaQPGw==", - "dependencies": { - "@sentry/browser": "7.109.0", - "@sentry/core": "7.109.0", - "@sentry/types": "7.109.0", - "@sentry/utils": "7.109.0", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry/react/-/react-8.34.0.tgz", + "integrity": "sha512-gIgzhj7h67C+Sdq2ul4fOSK142Gf0uV99bqHRdtIiUlXw9yjzZQY5TKTtzbOaevn7qBJ0xrRKtIRUbOBMl0clw==", + "dependencies": { + "@sentry/browser": "8.34.0", + "@sentry/core": "8.34.0", + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0", "hoist-non-react-statics": "^3.3.2" }, "engines": { - "node": ">=8" + "node": ">=14.18" }, "peerDependencies": { - "react": "15.x || 16.x || 17.x || 18.x" - } - }, - "node_modules/@sentry/replay": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.109.0.tgz", - "integrity": "sha512-hCDjbTNO7ErW/XsaBXlyHFsUhneyBUdTec1Swf98TFEfVqNsTs6q338aUcaR8dGRLbLrJ9YU9D1qKq++v5h2CA==", - "dependencies": { - "@sentry-internal/tracing": "7.109.0", - "@sentry/core": "7.109.0", - "@sentry/types": "7.109.0", - "@sentry/utils": "7.109.0" - }, - "engines": { - "node": ">=12" + "react": "^16.14.0 || 17.x || 18.x || 19.x" } }, "node_modules/@sentry/types": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.109.0.tgz", - "integrity": "sha512-egCBnDv3YpVFoNzRLdP0soVrxVLCQ+rovREKJ1sw3rA2/MFH9WJ+DZZexsX89yeAFzy1IFsCp7/dEqudusml6g==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.34.0.tgz", + "integrity": "sha512-zLRc60CzohGCo6zNsNeQ9JF3SiEeRE4aDCP9fDDdIVCOKovS+mn1rtSip0qd0Vp2fidOu0+2yY0ALCz1A3PJSQ==", "engines": { - "node": ">=8" + "node": ">=14.18" } }, "node_modules/@sentry/utils": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.109.0.tgz", - "integrity": "sha512-3RjxMOLMBwZ5VSiH84+o/3NY2An4Zldjz0EbfEQNRY9yffRiCPJSQiCJID8EoylCFOh/PAhPimBhqbtWJxX6iw==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.34.0.tgz", + "integrity": "sha512-W1KoRlFUjprlh3t86DZPFxLfM6mzjRzshVfMY7vRlJFymBelJsnJ3A1lPeBZM9nCraOSiw6GtOWu6k5BAkiGIg==", "dependencies": { - "@sentry/types": "7.109.0" + "@sentry/types": "8.34.0" }, "engines": { - "node": ">=8" + "node": ">=14.18" } }, "node_modules/@sinclair/typebox": { @@ -25238,49 +25238,60 @@ "integrity": "sha512-sXo/qW2/pAcmT43VoRKOJbDOfV3cYpq3szSVfIThQXNt+E4DfKj361vaAt3c88U5tPUxzEswam7GW48PJqtKAg==", "dev": true }, + "@sentry-internal/browser-utils": { + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/browser-utils/-/browser-utils-8.34.0.tgz", + "integrity": "sha512-4AcYOzPzD1tL5eSRQ/GpKv5enquZf4dMVUez99/Bh3va8qiJrNP55AcM7UzZ7WZLTqKygIYruJTU5Zu2SpEAPQ==", + "requires": { + "@sentry/core": "8.34.0", + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0" + } + }, "@sentry-internal/feedback": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-7.109.0.tgz", - "integrity": "sha512-EL7N++poxvJP9rYvh6vSu24tsKkOveNCcCj4IM7+irWPjsuD2GLYYlhp/A/Mtt9l7iqO4plvtiQU5HGk7smcTQ==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-8.34.0.tgz", + "integrity": "sha512-aYSM2KPUs0FLPxxbJCFSwCYG70VMzlT04xepD1Y/tTlPPOja/02tSv2tyOdZbv8Uw7xslZs3/8Lhj74oYcTBxw==", "requires": { - "@sentry/core": "7.109.0", - "@sentry/types": "7.109.0", - "@sentry/utils": "7.109.0" + "@sentry/core": "8.34.0", + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0" } }, - "@sentry-internal/replay-canvas": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-7.109.0.tgz", - "integrity": "sha512-Lh/K60kmloR6lkPUcQP0iamw7B/MdEUEx/ImAx4tUSMrLj+IoUEcq/ECgnnVyQkJq59+8nPEKrVLt7x6PUPEjw==", + "@sentry-internal/replay": { + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay/-/replay-8.34.0.tgz", + "integrity": "sha512-EoMh9NYljNewZK1quY23YILgtNdGgrkzJ9TPsj6jXUG0LZ0Q7N7eFWd0xOEDBvFxrmI3cSXF1i4d1sBb+eyKRw==", "requires": { - "@sentry/core": "7.109.0", - "@sentry/replay": "7.109.0", - "@sentry/types": "7.109.0", - "@sentry/utils": "7.109.0" + "@sentry-internal/browser-utils": "8.34.0", + "@sentry/core": "8.34.0", + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0" } }, - "@sentry-internal/tracing": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.109.0.tgz", - "integrity": "sha512-PzK/joC5tCuh2R/PRh+7dp+uuZl7pTsBIjPhVZHMTtb9+ls65WkdZJ1/uKXPouyz8NOo9Xok7aEvEo9seongyw==", + "@sentry-internal/replay-canvas": { + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-8.34.0.tgz", + "integrity": "sha512-x8KhZcCDpbKHqFOykYXiamX6x0LRxv6N1OJHoH+XCrMtiDBZr4Yo30d/MaS6rjmKGMtSRij30v+Uq+YWIgxUrg==", "requires": { - "@sentry/core": "7.109.0", - "@sentry/types": "7.109.0", - "@sentry/utils": "7.109.0" + "@sentry-internal/replay": "8.34.0", + "@sentry/core": "8.34.0", + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0" } }, "@sentry/browser": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.109.0.tgz", - "integrity": "sha512-yx+OFG+Ab9qUDDgV9ZDv8M9O9Mqr0fjKta/LMlWALYLjzkMvxsPlRPFj7oMBlHqOTVLDeg7lFYmsA8wyWQ8Z8g==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-8.34.0.tgz", + "integrity": "sha512-3HHG2NXxzHq1lVmDy2uRjYjGNf9NsJsTPlOC70vbQdOb+S49EdH/XMPy+J3ruIoyv6Cu0LwvA6bMOM6rHZOgNQ==", "requires": { - "@sentry-internal/feedback": "7.109.0", - "@sentry-internal/replay-canvas": "7.109.0", - "@sentry-internal/tracing": "7.109.0", - "@sentry/core": "7.109.0", - "@sentry/replay": "7.109.0", - "@sentry/types": "7.109.0", - "@sentry/utils": "7.109.0" + "@sentry-internal/browser-utils": "8.34.0", + "@sentry-internal/feedback": "8.34.0", + "@sentry-internal/replay": "8.34.0", + "@sentry-internal/replay-canvas": "8.34.0", + "@sentry/core": "8.34.0", + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0" } }, "@sentry/cli": { @@ -25353,48 +25364,37 @@ "optional": true }, "@sentry/core": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.109.0.tgz", - "integrity": "sha512-xwD4U0IlvvlE/x/g/W1I8b4Cfb16SsCMmiEuBf6XxvAa3OfWBxKoqLifb3GyrbxMC4LbIIZCN/SvLlnGJPgszA==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-8.34.0.tgz", + "integrity": "sha512-adrXCTK/zsg5pJ67lgtZqdqHvyx6etMjQW3P82NgWdj83c8fb+zH+K79Z47pD4zQjX0ou2Ws5nwwi4wJbz4bfA==", "requires": { - "@sentry/types": "7.109.0", - "@sentry/utils": "7.109.0" + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0" } }, "@sentry/react": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry/react/-/react-7.109.0.tgz", - "integrity": "sha512-KqXoDh6LVhNO+FLdM5LiTGpuorFvjoBPQ4nPGIVbjeMY/KZIau3kFxR142EvCApxmD69yvS5EhMnEqlNdaQPGw==", - "requires": { - "@sentry/browser": "7.109.0", - "@sentry/core": "7.109.0", - "@sentry/types": "7.109.0", - "@sentry/utils": "7.109.0", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry/react/-/react-8.34.0.tgz", + "integrity": "sha512-gIgzhj7h67C+Sdq2ul4fOSK142Gf0uV99bqHRdtIiUlXw9yjzZQY5TKTtzbOaevn7qBJ0xrRKtIRUbOBMl0clw==", + "requires": { + "@sentry/browser": "8.34.0", + "@sentry/core": "8.34.0", + "@sentry/types": "8.34.0", + "@sentry/utils": "8.34.0", "hoist-non-react-statics": "^3.3.2" } }, - "@sentry/replay": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.109.0.tgz", - "integrity": "sha512-hCDjbTNO7ErW/XsaBXlyHFsUhneyBUdTec1Swf98TFEfVqNsTs6q338aUcaR8dGRLbLrJ9YU9D1qKq++v5h2CA==", - "requires": { - "@sentry-internal/tracing": "7.109.0", - "@sentry/core": "7.109.0", - "@sentry/types": "7.109.0", - "@sentry/utils": "7.109.0" - } - }, "@sentry/types": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.109.0.tgz", - "integrity": "sha512-egCBnDv3YpVFoNzRLdP0soVrxVLCQ+rovREKJ1sw3rA2/MFH9WJ+DZZexsX89yeAFzy1IFsCp7/dEqudusml6g==" + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-8.34.0.tgz", + "integrity": "sha512-zLRc60CzohGCo6zNsNeQ9JF3SiEeRE4aDCP9fDDdIVCOKovS+mn1rtSip0qd0Vp2fidOu0+2yY0ALCz1A3PJSQ==" }, "@sentry/utils": { - "version": "7.109.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.109.0.tgz", - "integrity": "sha512-3RjxMOLMBwZ5VSiH84+o/3NY2An4Zldjz0EbfEQNRY9yffRiCPJSQiCJID8EoylCFOh/PAhPimBhqbtWJxX6iw==", + "version": "8.34.0", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-8.34.0.tgz", + "integrity": "sha512-W1KoRlFUjprlh3t86DZPFxLfM6mzjRzshVfMY7vRlJFymBelJsnJ3A1lPeBZM9nCraOSiw6GtOWu6k5BAkiGIg==", "requires": { - "@sentry/types": "7.109.0" + "@sentry/types": "8.34.0" } }, "@sinclair/typebox": { diff --git a/src/App.tsx b/src/App.tsx index e8df44e..6ae7ef7 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,5 +1,6 @@ import * as React from 'react'; import {Link as RouterLink, Route, Routes} from 'react-router-dom'; +import * as Sentry from '@sentry/react'; import {styled} from '@mui/material/styles'; import Link from '@mui/material/Link'; @@ -94,6 +95,8 @@ function Dashboard() { setOpen(!open); }; + const SentryRoutes = Sentry.withSentryReactRouterV6Routing(Routes); + return ( @@ -161,7 +164,7 @@ function Dashboard() { }}> - + } /> } /> } /> @@ -181,7 +184,7 @@ function Dashboard() { } /> } /> } /> - + diff --git a/src/index.tsx b/src/index.tsx index 74cb5fa..b0f027e 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -7,6 +7,13 @@ import CssBaseline from '@mui/material/CssBaseline'; import {AdapterDayjs} from '@mui/x-date-pickers/AdapterDayjs'; import {LocalizationProvider} from '@mui/x-date-pickers'; import * as Sentry from '@sentry/react'; +import { + createBrowserRouter, + createRoutesFromChildren, + matchRoutes, + useLocation, + useNavigationType, +} from 'react-router-dom'; import App from './App'; import Error from './pages/Error'; @@ -62,8 +69,19 @@ if (['production', 'staging'].includes(process.env.NODE_ENV)) { Sentry.init({ dsn: 'https://user@example.ingest.sentry.io/1234567', release: process.env.REACT_APP_SENTRY_RELEASE, - integrations: [new Sentry.BrowserTracing()], - tracesSampleRate: 1.0, + integrations: [ + Sentry.reactRouterV6BrowserTracingIntegration({ + useEffect: React.useEffect, + useLocation, + useNavigationType, + createRoutesFromChildren, + matchRoutes, + }), + Sentry.replayIntegration(), + ], + tracesSampleRate: 0.1, + replaysSessionSampleRate: 0, + replaysOnErrorSampleRate: 1.0, tunnel: '/api/bugs/sentry', }); }