Skip to content

Commit

Permalink
Add sourcemapping for sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
dakotabenjamin committed Aug 21, 2023
1 parent 84f517e commit 91d7efb
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 69 deletions.
12 changes: 7 additions & 5 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@
"@mapbox/mapbox-gl-geocoder": "^5.0.1",
"@mapbox/mapbox-gl-language": "^0.10.1",
"@placemarkio/geo-viewport": "^1.0.1",
"@sentry/react": "^7.56.0",
"@sentry/tracing": "^7.56.0",
"@sentry/react": "^7.60.1",
"@sentry/tracing": "^7.60.1",
"@sentry/browser": "^7.60.1",
"@tmcw/togeojson": "^4.7.0",
"@turf/area": "^6.5.0",
"@turf/bbox": "^6.5.0",
Expand Down Expand Up @@ -85,12 +86,13 @@
"patch-rapid": "bash -c \"cp patch/rapid-imagery.min.json public/static/rapid/data/imagery.min.json\"",
"preparation": "bash -c \"if (test -a ../tasking-manager.env); then grep -hs ^ ../tasking-manager.env .env.expand > .env; else cp .env.expand .env; fi\"",
"start": "npm run preparation && npm run copy-static && npm run patch-id && npm run patch-rapid && react-scripts start",
"build": "npm run preparation && npm run update-static && npm run patch-id && npm run patch-rapid && react-scripts build",
"build": "npm run preparation && npm run update-static && npm run patch-id && npm run patch-rapid && react-scripts build && npm run sentry:sourcemaps",
"prettier": "prettier --write 'src/**/*.js'",
"lint": "eslint src",
"test": "npm run lint && react-scripts test --env=jsdom",
"coverage": "npm run test -- --coverage --watchAll=false",
"analyze": "source-map-explorer 'build/static/js/*.js'"
"analyze": "source-map-explorer 'build/static/js/*.js'",
"sentry:sourcemaps": "sentry-cli sourcemaps inject --org humanitarian-openstreetmap-tea --project taskingmanager-frontend ./build && sentry-cli sourcemaps upload --org humanitarian-openstreetmap-tea --project taskingmanager-frontend ./build"
},
"eslintConfig": {
"extends": "react-app"
Expand Down Expand Up @@ -129,4 +131,4 @@
"node_modules/@uiw/react-md-editor/"
]
}
}
}
16 changes: 15 additions & 1 deletion frontend/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,22 @@ if (SENTRY_FRONTEND_DSN) {
Sentry.init({
dsn: SENTRY_FRONTEND_DSN,
environment: ENVIRONMENT,
integrations: [new BrowserTracing()],
integrations: [
new BrowserTracing(),
new Sentry.Replay({
// Additional SDK configuration goes in here, for example:
maskAllText: true,
blockAllMedia: true,
}),
],
tracesSampleRate: 0.1,

// Session Replays integration
replaysSessionSampleRate: 1.0,
// If the entire session is not sampled, use the below sample rate to sample
// sessions when an error occurs.
replaysOnErrorSampleRate: 1.0,

});
}

Expand Down
131 changes: 68 additions & 63 deletions frontend/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2398,76 +2398,76 @@
estree-walker "^1.0.1"
picomatch "^2.2.2"

"@sentry-internal/tracing@7.56.0":
version "7.56.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.56.0.tgz#ba709258f2f0f3d8a36f9740403088b39212b843"
integrity sha512-OKI4Pz/O13gng8hT9rNc+gRV3+P7nnk1HnHlV8fgaQydS6DsRxoDL1sHa42tZGbh7K9jqNAP3TC6VjBOsr2tXA==
dependencies:
"@sentry/core" "7.56.0"
"@sentry/types" "7.56.0"
"@sentry/utils" "7.56.0"
tslib "^1.9.3"

"@sentry/browser@7.56.0":
version "7.56.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.56.0.tgz#6bf3ff21bc2e9b66a72ea0c7dcc3572fdeb3bd8f"
integrity sha512-qpyyw+NM/psbNAYMlTCCdWwxHHcogppEQ+Q40jGE4sKP2VRIjjyteJkUcaEMoGpbJXx9puzTWbpzqlQ8r15Now==
dependencies:
"@sentry-internal/tracing" "7.56.0"
"@sentry/core" "7.56.0"
"@sentry/replay" "7.56.0"
"@sentry/types" "7.56.0"
"@sentry/utils" "7.56.0"
tslib "^1.9.3"

"@sentry/core@7.56.0":
version "7.56.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.56.0.tgz#f4253e0d61f55444180a63e5278b62e57303f7cf"
integrity sha512-Nuyyfh09Yz27kPo74fXHlrdmZeK6zrlJVtxQ6LkwuoaTBcNcesNXVaOtr6gjvUGUmsfriVPP3Jero5LXufV7GQ==
dependencies:
"@sentry/types" "7.56.0"
"@sentry/utils" "7.56.0"
tslib "^1.9.3"

"@sentry/react@^7.56.0":
version "7.56.0"
resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.56.0.tgz#7e2e9363a76c7d67854bdb179142a2f7f910d476"
integrity sha512-dRnkZwspef5aEHV/eiLS/mhomFCXItylU8s78fzAn5QMTDGHmu5Pnhl5dxh/zbPUcdXqFA6GwJVucV4gzsNEJw==
dependencies:
"@sentry/browser" "7.56.0"
"@sentry/types" "7.56.0"
"@sentry/utils" "7.56.0"
"@sentry-internal/tracing@7.64.0":
version "7.64.0"
resolved "https://registry.yarnpkg.com/@sentry-internal/tracing/-/tracing-7.64.0.tgz#3e110473b8edf805b799cc91d6ee592830237bb4"
integrity sha512-1XE8W6ki7hHyBvX9hfirnGkKDBKNq3bDJyXS86E0bYVDl94nvbRM9BD9DHsCFetqYkVm1yDGEK+6aUVs4CztoQ==
dependencies:
"@sentry/core" "7.64.0"
"@sentry/types" "7.64.0"
"@sentry/utils" "7.64.0"
tslib "^2.4.1 || ^1.9.3"

"@sentry/browser@7.64.0", "@sentry/browser@^7.60.1":
version "7.64.0"
resolved "https://registry.yarnpkg.com/@sentry/browser/-/browser-7.64.0.tgz#76db08a5d32ffe7c5aa907f258e6c845ce7f10d7"
integrity sha512-lB2IWUkZavEDclxfLBp554dY10ZNIEvlDZUWWathW+Ws2wRb6PNLtuPUNu12R7Q7z0xpkOLrM1kRNN0OdldgKA==
dependencies:
"@sentry-internal/tracing" "7.64.0"
"@sentry/core" "7.64.0"
"@sentry/replay" "7.64.0"
"@sentry/types" "7.64.0"
"@sentry/utils" "7.64.0"
tslib "^2.4.1 || ^1.9.3"

"@sentry/core@7.64.0":
version "7.64.0"
resolved "https://registry.yarnpkg.com/@sentry/core/-/core-7.64.0.tgz#9d61cdc29ba299dedbdcbe01cfadf94bd0b7df48"
integrity sha512-IzmEyl5sNG7NyEFiyFHEHC+sizsZp9MEw1+RJRLX6U5RITvcsEgcajSkHQFafaBPzRrcxZMdm47Cwhl212LXcw==
dependencies:
"@sentry/types" "7.64.0"
"@sentry/utils" "7.64.0"
tslib "^2.4.1 || ^1.9.3"

"@sentry/react@^7.60.1":
version "7.64.0"
resolved "https://registry.yarnpkg.com/@sentry/react/-/react-7.64.0.tgz#edee24ac232990204e0fb43dd83994642d4b0f54"
integrity sha512-wOyJUQi7OoT1q+F/fVVv1fzbyO4OYbTu6m1DliLOGQPGEHPBsgPc722smPIExd1/rAMK/FxOuNN5oNhubH8nhg==
dependencies:
"@sentry/browser" "7.64.0"
"@sentry/types" "7.64.0"
"@sentry/utils" "7.64.0"
hoist-non-react-statics "^3.3.2"
tslib "^1.9.3"
tslib "^2.4.1 || ^1.9.3"

"@sentry/replay@7.56.0":
version "7.56.0"
resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.56.0.tgz#8a49dcb45e9ea83bf905cec0d9b42fed4b8085bd"
integrity sha512-bvjiJK1+SM/paLapuL+nEJ8CIF1bJqi0nnFyxUIi2L5L6yb2uMwfyT3IQ+kz0cXJsLdb3HN4WMphVjyiU9pFdg==
"@sentry/replay@7.64.0":
version "7.64.0"
resolved "https://registry.yarnpkg.com/@sentry/replay/-/replay-7.64.0.tgz#bdf09b0c4712f9dc6b24b3ebefa55a4ac76708e6"
integrity sha512-alaMCZDZhaAVmEyiUnszZnvfdbiZx5MmtMTGrlDd7tYq3K5OA9prdLqqlmfIJYBfYtXF3lD0iZFphOZQD+4CIw==
dependencies:
"@sentry/core" "7.56.0"
"@sentry/types" "7.56.0"
"@sentry/utils" "7.56.0"
"@sentry/core" "7.64.0"
"@sentry/types" "7.64.0"
"@sentry/utils" "7.64.0"

"@sentry/tracing@^7.56.0":
version "7.56.0"
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.56.0.tgz#f119c2b04c06718fa3a0d00b2781c56005e9dd80"
integrity sha512-Qy7lJdC2YBk9T8JFt4da7xHB3pTZH6yUiIwo5edmSBv2cY6MQ0QZgLzsjJurjf47+/WecVYYKdye9q4twsBlDA==
"@sentry/tracing@^7.60.1":
version "7.64.0"
resolved "https://registry.yarnpkg.com/@sentry/tracing/-/tracing-7.64.0.tgz#994a779d6c8b810b98784b33eb6defd014303913"
integrity sha512-Php0XnnJolfxkFdgLlgwgRz3bgHmu/7gDRQaGQHJeDgCCjrmNHI+sHi8zmkWCWSO0Z1mi111n2ZUr9B9YLPBTg==
dependencies:
"@sentry-internal/tracing" "7.56.0"
"@sentry-internal/tracing" "7.64.0"

"@sentry/types@7.56.0":
version "7.56.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.56.0.tgz#9042a099cf9e8816d081886d24b88082a5d9f87a"
integrity sha512-5WjhVOQm75ItOytOx2jTx+5yw8/qJ316+g1Di8dS9+kgIi1zniqdMcX00C2yYe3FMUgFB49PegCUYulm9Evapw==
"@sentry/types@7.64.0":
version "7.64.0"
resolved "https://registry.yarnpkg.com/@sentry/types/-/types-7.64.0.tgz#21fc545ea05c3c8c4c3e518583eca1a8c5429506"
integrity sha512-LqjQprWXjUFRmzIlUjyA+KL+38elgIYmAeoDrdyNVh8MK5IC1W2Lh1Q87b4yOiZeMiIhIVNBd7Ecoh2rodGrGA==

"@sentry/utils@7.56.0":
version "7.56.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.56.0.tgz#e60e4935d17b2197584abf6ce61b522ad055352c"
integrity sha512-wgeX7bufxc//TjjSIE+gCMm8hVId7Jzvc+f441bYrWnNZBuzPIDW2BummCcPrKzSYe5GeYZDTZGV8YZGMLGBjw==
"@sentry/utils@7.64.0":
version "7.64.0"
resolved "https://registry.yarnpkg.com/@sentry/utils/-/utils-7.64.0.tgz#6fe3ce9a56d3433ed32119f914907361a54cc184"
integrity sha512-HRlM1INzK66Gt+F4vCItiwGKAng4gqzCR4C5marsL3qv6SrKH98dQnCGYgXluSWaaa56h97FRQu7TxCk6jkSvQ==
dependencies:
"@sentry/types" "7.56.0"
tslib "^1.9.3"
"@sentry/types" "7.64.0"
tslib "^2.4.1 || ^1.9.3"

"@sindresorhus/is@^4.0.0":
version "4.6.0"
Expand Down Expand Up @@ -14835,7 +14835,7 @@ tsconfig-paths@^3.14.1:
minimist "^1.2.6"
strip-bom "^3.0.0"

tslib@^1.8.1, tslib@^1.9.3:
tslib@^1.8.1:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
Expand All @@ -14850,6 +14850,11 @@ tslib@^2.1.0, tslib@^2.4.0:
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.3.tgz#24944ba2d990940e6e982c4bea147aba80209913"
integrity sha512-mSxlJJwl3BMEQCUNnxXBU9jP4JBktcEGhURcPR6VQVlnP0FdDEsIaz0C35dXNGLyRfrATNofF0F5p2KPxQgB+w==

"tslib@^2.4.1 || ^1.9.3":
version "2.6.2"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae"
integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==

tsutils@^3.17.1, tsutils@^3.21.0:
version "3.21.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623"
Expand Down

0 comments on commit 91d7efb

Please sign in to comment.