diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index b26b4cdc..98476b00 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -51,7 +51,6 @@ jobs: # be deployed to ECS. docker build \ --build-arg NPM_TOKEN=${{ secrets.NPM_TOKEN }} \ - --build-arg SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} \ -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG echo "::set-output name=image::$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b5a151ff..bb5c896c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -55,7 +55,6 @@ jobs: run: | DOCKER_BUILDKIT=1 docker build \ --build-arg NPM_TOKEN=$NPM_TOKEN \ - --build-arg SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} \ -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG . docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG diff --git a/.gitignore b/.gitignore index df373fd5..a881f667 100644 --- a/.gitignore +++ b/.gitignore @@ -27,5 +27,3 @@ generate-devel-token.json .idea/ generate-devel-token-* -# Sentry Config File -.sentryclirc diff --git a/Dockerfile b/Dockerfile index 17b652d8..ae82ebc3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,15 @@ -FROM node:18-alpine3.17 as base +FROM node:24-alpine as base COPY package.json ./ -COPY yarn.lock ./ -ARG SENTRY_AUTH_TOKEN -ARG NPM_TOKEN +COPY package-lock.json ./ +ARG NPM_TOKEN RUN echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc -RUN ["yarn", "install", "--frozen-lockfile", "--ignore-scripts"] +RUN ["npm", "ci", "--ignore-scripts"] RUN rm -f .npmrc COPY . . -RUN ["yarn", "build"] -RUN ["yarn", "sentry:sourcemaps"] +RUN ["npm", "run", "build"] FROM alpine:3.14 as web diff --git a/package-lock.json b/package-lock.json index 8b76f087..265368f9 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,8 +16,6 @@ "@craco/craco": "^7.1.0", "@craftjs/core": "^0.2.0-beta.5", "@reduxjs/toolkit": "^1.8.3", - "@sentry/cli": "^2.23.0", - "@sentry/react": "^7.84.0", "@silevis/reactgrid": "^4.0.4", "analytics": "^0.8.1", "comuni-province-regioni": "^0.4.3", @@ -4568,316 +4566,6 @@ "integrity": "sha512-TvZbIpeKqGQQ7X0zSCvPH9riMSFQFSggnfBjFZ1mEoILW+UuXCKwOoPcgjMwiUtRqFZ8jWhPJc4um14vC6I4ag==", "license": "MIT" }, - "node_modules/@sentry-internal/feedback": { - "version": "7.120.4", - "resolved": "https://registry.npmjs.org/@sentry-internal/feedback/-/feedback-7.120.4.tgz", - "integrity": "sha512-eSwgvTdrh03zYYaI6UVOjI9p4VmKg6+c2+CBQfRZX++6wwnCVsNv7XF7WUIpVGBAkJ0N2oapjQmCzJKGKBRWQg==", - "license": "MIT", - "dependencies": { - "@sentry/core": "7.120.4", - "@sentry/types": "7.120.4", - "@sentry/utils": "7.120.4" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@sentry-internal/replay-canvas": { - "version": "7.120.4", - "resolved": "https://registry.npmjs.org/@sentry-internal/replay-canvas/-/replay-canvas-7.120.4.tgz", - "integrity": "sha512-2+W4CgUL1VzrPjArbTid4WhKh7HH21vREVilZdvffQPVwOEpgNTPAb69loQuTlhJVveh9hWTj2nE5UXLbLP+AA==", - "license": "MIT", - "dependencies": { - "@sentry/core": "7.120.4", - "@sentry/replay": "7.120.4", - "@sentry/types": "7.120.4", - "@sentry/utils": "7.120.4" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@sentry-internal/tracing": { - "version": "7.120.4", - "resolved": "https://registry.npmjs.org/@sentry-internal/tracing/-/tracing-7.120.4.tgz", - "integrity": "sha512-Fz5+4XCg3akeoFK+K7g+d7HqGMjmnLoY2eJlpONJmaeT9pXY7yfUyXKZMmMajdE2LxxKJgQ2YKvSCaGVamTjHw==", - "license": "MIT", - "dependencies": { - "@sentry/core": "7.120.4", - "@sentry/types": "7.120.4", - "@sentry/utils": "7.120.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/browser": { - "version": "7.120.4", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-7.120.4.tgz", - "integrity": "sha512-ymlNtIPG6HAKzM/JXpWVGCzCNufZNADfy+O/olZuVJW5Be1DtOFyRnBvz0LeKbmxJbXb2lX/XMhuen6PXPdoQw==", - "license": "MIT", - "dependencies": { - "@sentry-internal/feedback": "7.120.4", - "@sentry-internal/replay-canvas": "7.120.4", - "@sentry-internal/tracing": "7.120.4", - "@sentry/core": "7.120.4", - "@sentry/integrations": "7.120.4", - "@sentry/replay": "7.120.4", - "@sentry/types": "7.120.4", - "@sentry/utils": "7.120.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/cli": { - "version": "2.58.5", - "resolved": "https://registry.npmjs.org/@sentry/cli/-/cli-2.58.5.tgz", - "integrity": "sha512-tavJ7yGUZV+z3Ct2/ZB6mg339i08sAk6HDkgqmSRuQEu2iLS5sl9HIvuXfM6xjv8fwlgFOSy++WNABNAcGHUbg==", - "hasInstallScript": true, - "license": "FSL-1.1-MIT", - "dependencies": { - "https-proxy-agent": "^5.0.0", - "node-fetch": "^2.6.7", - "progress": "^2.0.3", - "proxy-from-env": "^1.1.0", - "which": "^2.0.2" - }, - "bin": { - "sentry-cli": "bin/sentry-cli" - }, - "engines": { - "node": ">= 10" - }, - "optionalDependencies": { - "@sentry/cli-darwin": "2.58.5", - "@sentry/cli-linux-arm": "2.58.5", - "@sentry/cli-linux-arm64": "2.58.5", - "@sentry/cli-linux-i686": "2.58.5", - "@sentry/cli-linux-x64": "2.58.5", - "@sentry/cli-win32-arm64": "2.58.5", - "@sentry/cli-win32-i686": "2.58.5", - "@sentry/cli-win32-x64": "2.58.5" - } - }, - "node_modules/@sentry/cli-darwin": { - "version": "2.58.5", - "resolved": "https://registry.npmjs.org/@sentry/cli-darwin/-/cli-darwin-2.58.5.tgz", - "integrity": "sha512-lYrNzenZFJftfwSya7gwrHGxtE+Kob/e1sr9lmHMFOd4utDlmq0XFDllmdZAMf21fxcPRI1GL28ejZ3bId01fQ==", - "license": "FSL-1.1-MIT", - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@sentry/cli-linux-arm": { - "version": "2.58.5", - "resolved": "https://registry.npmjs.org/@sentry/cli-linux-arm/-/cli-linux-arm-2.58.5.tgz", - "integrity": "sha512-KtHweSIomYL4WVDrBrYSYJricKAAzxUgX86kc6OnlikbyOhoK6Fy8Vs6vwd52P6dvWPjgrMpUYjW2M5pYXQDUw==", - "cpu": [ - "arm" - ], - "license": "FSL-1.1-MIT", - "optional": true, - "os": [ - "linux", - "freebsd", - "android" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@sentry/cli-linux-arm64": { - "version": "2.58.5", - "resolved": "https://registry.npmjs.org/@sentry/cli-linux-arm64/-/cli-linux-arm64-2.58.5.tgz", - "integrity": "sha512-/4gywFeBqRB6tR/iGMRAJ3HRqY6Z7Yp4l8ZCbl0TDLAfHNxu7schEw4tSnm2/Hh9eNMiOVy4z58uzAWlZXAYBQ==", - "cpu": [ - "arm64" - ], - "license": "FSL-1.1-MIT", - "optional": true, - "os": [ - "linux", - "freebsd", - "android" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@sentry/cli-linux-i686": { - "version": "2.58.5", - "resolved": "https://registry.npmjs.org/@sentry/cli-linux-i686/-/cli-linux-i686-2.58.5.tgz", - "integrity": "sha512-G7261dkmyxqlMdyvyP06b+RTIVzp1gZNgglj5UksxSouSUqRd/46W/2pQeOMPhloDYo9yLtCN2YFb3Mw4aUsWw==", - "cpu": [ - "x86", - "ia32" - ], - "license": "FSL-1.1-MIT", - "optional": true, - "os": [ - "linux", - "freebsd", - "android" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@sentry/cli-linux-x64": { - "version": "2.58.5", - "resolved": "https://registry.npmjs.org/@sentry/cli-linux-x64/-/cli-linux-x64-2.58.5.tgz", - "integrity": "sha512-rP04494RSmt86xChkQ+ecBNRYSPbyXc4u0IA7R7N1pSLCyO74e5w5Al+LnAq35cMfVbZgz5Sm0iGLjyiUu4I1g==", - "cpu": [ - "x64" - ], - "license": "FSL-1.1-MIT", - "optional": true, - "os": [ - "linux", - "freebsd", - "android" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@sentry/cli-win32-arm64": { - "version": "2.58.5", - "resolved": "https://registry.npmjs.org/@sentry/cli-win32-arm64/-/cli-win32-arm64-2.58.5.tgz", - "integrity": "sha512-AOJ2nCXlQL1KBaCzv38m3i2VmSHNurUpm7xVKd6yAHX+ZoVBI8VT0EgvwmtJR2TY2N2hNCC7UrgRmdUsQ152bA==", - "cpu": [ - "arm64" - ], - "license": "FSL-1.1-MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@sentry/cli-win32-i686": { - "version": "2.58.5", - "resolved": "https://registry.npmjs.org/@sentry/cli-win32-i686/-/cli-win32-i686-2.58.5.tgz", - "integrity": "sha512-EsuboLSOnlrN7MMPJ1eFvfMDm+BnzOaSWl8eYhNo8W/BIrmNgpRUdBwnWn9Q2UOjJj5ZopukmsiMYtU/D7ml9g==", - "cpu": [ - "x86", - "ia32" - ], - "license": "FSL-1.1-MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@sentry/cli-win32-x64": { - "version": "2.58.5", - "resolved": "https://registry.npmjs.org/@sentry/cli-win32-x64/-/cli-win32-x64-2.58.5.tgz", - "integrity": "sha512-IZf+XIMiQwj+5NzqbOQfywlOitmCV424Vtf9c+ep61AaVScUFD1TSrQbOcJJv5xGxhlxNOMNgMeZhdexdzrKZg==", - "cpu": [ - "x64" - ], - "license": "FSL-1.1-MIT", - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">=10" - } - }, - "node_modules/@sentry/core": { - "version": "7.120.4", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-7.120.4.tgz", - "integrity": "sha512-TXu3Q5kKiq8db9OXGkWyXUbIxMMuttB5vJ031yolOl5T/B69JRyAoKuojLBjRv1XX583gS1rSSoX8YXX7ATFGA==", - "license": "MIT", - "dependencies": { - "@sentry/types": "7.120.4", - "@sentry/utils": "7.120.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/integrations": { - "version": "7.120.4", - "resolved": "https://registry.npmjs.org/@sentry/integrations/-/integrations-7.120.4.tgz", - "integrity": "sha512-kkBTLk053XlhDCg7OkBQTIMF4puqFibeRO3E3YiVc4PGLnocXMaVpOSCkMqAc1k1kZ09UgGi8DxfQhnFEjUkpA==", - "license": "MIT", - "dependencies": { - "@sentry/core": "7.120.4", - "@sentry/types": "7.120.4", - "@sentry/utils": "7.120.4", - "localforage": "^1.8.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/react": { - "version": "7.120.4", - "resolved": "https://registry.npmjs.org/@sentry/react/-/react-7.120.4.tgz", - "integrity": "sha512-Pj1MSezEncE+5riuwsk8peMncuz5HR72Yr1/RdZhMZvUxoxAR/tkwD3aPcK6ddQJTagd2TGwhdr9SHuDLtONew==", - "license": "MIT", - "dependencies": { - "@sentry/browser": "7.120.4", - "@sentry/core": "7.120.4", - "@sentry/types": "7.120.4", - "@sentry/utils": "7.120.4", - "hoist-non-react-statics": "^3.3.2" - }, - "engines": { - "node": ">=8" - }, - "peerDependencies": { - "react": "15.x || 16.x || 17.x || 18.x" - } - }, - "node_modules/@sentry/replay": { - "version": "7.120.4", - "resolved": "https://registry.npmjs.org/@sentry/replay/-/replay-7.120.4.tgz", - "integrity": "sha512-FW8sPenNFfnO/K7sncsSTX4rIVak9j7VUiLIagJrcqZIC7d1dInFNjy8CdVJUlyz3Y3TOgIl3L3+ZpjfyMnaZg==", - "license": "MIT", - "dependencies": { - "@sentry-internal/tracing": "7.120.4", - "@sentry/core": "7.120.4", - "@sentry/types": "7.120.4", - "@sentry/utils": "7.120.4" - }, - "engines": { - "node": ">=12" - } - }, - "node_modules/@sentry/types": { - "version": "7.120.4", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-7.120.4.tgz", - "integrity": "sha512-cUq2hSSe6/qrU6oZsEP4InMI5VVdD86aypE+ENrQ6eZEVLTCYm1w6XhW1NvIu3UuWh7gZec4a9J7AFpYxki88Q==", - "license": "MIT", - "engines": { - "node": ">=8" - } - }, - "node_modules/@sentry/utils": { - "version": "7.120.4", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-7.120.4.tgz", - "integrity": "sha512-zCKpyDIWKHwtervNK2ZlaK8mMV7gVUijAgFeJStH+CU/imcdquizV3pFLlSQYRswG+Lbyd6CT/LGRh3IbtkCFw==", - "license": "MIT", - "dependencies": { - "@sentry/types": "7.120.4" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@silevis/reactgrid": { "version": "4.1.17", "resolved": "https://registry.npmjs.org/@silevis/reactgrid/-/reactgrid-4.1.17.tgz", @@ -12517,12 +12205,6 @@ "node": ">=16.x" } }, - "node_modules/immediate": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/immediate/-/immediate-3.0.6.tgz", - "integrity": "sha512-XXOFtyqDjNDAQxVfYxuF7g9Il/IbWmmlQg2MYKOH8ExIT1qg6xc4zyS3HaEEATgs1btfzxq15ciUiY7gjSXRGQ==", - "license": "MIT" - }, "node_modules/immer": { "version": "9.0.21", "resolved": "https://registry.npmjs.org/immer/-/immer-9.0.21.tgz", @@ -14842,15 +14524,6 @@ "node": ">= 0.8.0" } }, - "node_modules/lie": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lie/-/lie-3.1.1.tgz", - "integrity": "sha512-RiNhHysUjhrDQntfYSfY4MU24coXXdEOgw9WGcKHNeEwffDYbF//u87M1EWaMGzuFoSbqW0C9C6lEEhDOAswfw==", - "license": "MIT", - "dependencies": { - "immediate": "~3.0.5" - } - }, "node_modules/lilconfig": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/lilconfig/-/lilconfig-2.1.0.tgz", @@ -14908,15 +14581,6 @@ "node": ">=8.9.0" } }, - "node_modules/localforage": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/localforage/-/localforage-1.10.0.tgz", - "integrity": "sha512-14/H1aX7hzBBmmh7sGPd+AOMkkIrHM3Z1PAyGgZigA1H1p5O5ANnMyWzvpAETtG68/dC4pC0ncy3+PPGzXZHPg==", - "license": "Apache-2.0", - "dependencies": { - "lie": "3.1.1" - } - }, "node_modules/locate-path": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", @@ -17765,15 +17429,6 @@ "dev": true, "license": "MIT" }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "license": "MIT", - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/promise": { "version": "7.3.1", "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", @@ -18034,6 +17689,7 @@ "version": "1.1.0", "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true, "license": "MIT" }, "node_modules/psl": { diff --git a/package.json b/package.json index d88bb60a..7953f741 100644 --- a/package.json +++ b/package.json @@ -12,8 +12,6 @@ "@craco/craco": "^7.1.0", "@craftjs/core": "^0.2.0-beta.5", "@reduxjs/toolkit": "^1.8.3", - "@sentry/cli": "^2.23.0", - "@sentry/react": "^7.84.0", "@silevis/reactgrid": "^4.0.4", "analytics": "^0.8.1", "comuni-province-regioni": "^0.4.3", @@ -75,8 +73,7 @@ "prettier": "npx prettier --write 'src/**/*.{js,jsx,ts,tsx,json,css,scss,md}'", "translate": "i18next-scanner", "generate-api": ". ./.env.development; API_URL=$REACT_APP_API_URL/reference/ npx @rtk-query/codegen-openapi src/services/tryberApi/config.ts", - "generate-fixtures": ". ./.env.development; API_URL=$REACT_APP_API_URL/reference/; npx @appquality/fixture-generator -u $API_URL && npx prettier --write 'tests/api/**/*.json'", - "sentry:sourcemaps": "sentry-cli sourcemaps inject --org appquality-srl --project tryber-backoffice ./build && sentry-cli sourcemaps upload --org appquality-srl --project tryber-backoffice ./build" + "generate-fixtures": ". ./.env.development; API_URL=$REACT_APP_API_URL/reference/; npx @appquality/fixture-generator -u $API_URL && npx prettier --write 'tests/api/**/*.json'" }, "browserslist": { "production": [ diff --git a/src/App.tsx b/src/App.tsx index 6cfed2f6..1434e2bf 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,6 +1,5 @@ import "./App.css"; -import * as Sentry from "@sentry/react"; import { createBrowserHistory } from "history"; import { Provider } from "react-redux"; import { BrowserRouter, Route, Router, Switch } from "react-router-dom"; @@ -13,7 +12,6 @@ import EditPreselectionForm from "src/pages/preselectionForms/edit"; import NewPreselectionForm from "src/pages/preselectionForms/new"; import { setupStore } from "src/store"; import { PageTemplate } from "./features/PageTemplate"; -import SentryWrapper from "./features/SentryWrapper"; import AgreementsList from "./pages/agreements/list"; import SingleAgreementNew from "./pages/agreements/new"; import SingleAgreementEdit from "./pages/agreements/view-edit"; @@ -27,91 +25,79 @@ import CampaignPreselectionList from "./pages/preselectionForms"; import Prospect from "./pages/Prospect"; import UxDashboard from "./pages/UxDashboard"; -const SentryRoute = Sentry.withSentryRouting(Route); const history = createBrowserHistory(); function App() { return ( - - - - - - - - - - - - - - - - - - - - - - - ( - TestUnguess - )} - /> - - - - - - - + + + + + + + + + + + + + + + + + + + + + + ( + TestUnguess + )} + /> + + + + + + ); } diff --git a/src/features/PageTemplate.tsx b/src/features/PageTemplate.tsx index a62e286e..67f4282d 100644 --- a/src/features/PageTemplate.tsx +++ b/src/features/PageTemplate.tsx @@ -2,7 +2,6 @@ import { aqBootstrapTheme, GlobalStyle, } from "@appquality/appquality-design-system"; -import * as Sentry from "@sentry/react"; import React from "react"; import TagManager from "react-gtm-module"; import { useGetUsersMeQuery } from "src/services/tryberApi"; @@ -31,13 +30,6 @@ export const PageTemplate = ({ event: "ApiLoaded", }, }); - Sentry.setUser({ - id: user?.id ?? 0, - email: user?.email ?? "unknown", - username: user?.username ?? "unknown", - wp_user_id: user?.wp_user_id ?? 0, - role: user?.role ?? "unknown", - }); if (error) { if ("status" in error && error.status === 403) { return ( diff --git a/src/features/SentryWrapper.tsx b/src/features/SentryWrapper.tsx deleted file mode 100644 index 7220587a..00000000 --- a/src/features/SentryWrapper.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import * as Sentry from "@sentry/react"; -import isStagingEnvironment from "./isStagingEnvironment"; -import { RouterHistory } from "@sentry/react/types/reactrouter"; - -const SentryWrapper = ({ - children, - history, -}: { - children: React.ReactNode; - history: RouterHistory; -}) => { - if (process.env.NODE_ENV !== "test") { - Sentry.init({ - dsn: "https://4ab6d9977b0cc2ac430e8bf49522e512@o1087982.ingest.sentry.io/4506320026664960", - integrations: [ - new Sentry.BrowserTracing({ - routingInstrumentation: Sentry.reactRouterV5Instrumentation(history), - }), - ], - environment: react_env.REACT_APP_ENVIRONMENT, - // trace all staging and locale traces and 70% of production traces - tracesSampleRate: isStagingEnvironment() ? 1.0 : 0.7, - // Set `tracePropagationTargets` to control for which URLs distributed tracing should be enabled - tracePropagationTargets: [ - "localhost", - /^https:\/\/dev\.tryber\.me\/api/, - /^https:\/\/tryber\.me\/api/, - ], - release: react_env.REACT_APP_VERSION, - // Capture Replay for 10% of all sessions, - // plus for 100% of sessions with an error - // do not capture for staging and locale - replaysSessionSampleRate: isStagingEnvironment() ? 0.0 : 0.1, - replaysOnErrorSampleRate: isStagingEnvironment() ? 0.0 : 1.0, - }); - } - - return <>{children}; -}; - -export default SentryWrapper; diff --git a/src/features/isStagingEnvironment.tsx b/src/features/isStagingEnvironment.tsx deleted file mode 100644 index db6658a2..00000000 --- a/src/features/isStagingEnvironment.tsx +++ /dev/null @@ -1,5 +0,0 @@ -const isStagingEnvironment = () => { - return react_env.REACT_APP_ENVIRONMENT !== "production"; -}; - -export default isStagingEnvironment;