Skip to content

Commit

Permalink
Configure sentry
Browse files Browse the repository at this point in the history
  • Loading branch information
ljowen committed Aug 19, 2024
1 parent e5d7982 commit 60d1a51
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
9 changes: 8 additions & 1 deletion buildprocess/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ var configureWebpackForTerriaJS = require("terriajs/buildprocess/configureWebpac
var configureWebpackForPlugins = require("./configureWebpackForPlugins");
var MiniCssExtractPlugin = require("mini-css-extract-plugin");
var path = require("path");
const { sentryWebpackPlugin } = require("@sentry/webpack-plugin");

module.exports = function (devMode, hot) {
var config = {
Expand All @@ -18,7 +19,7 @@ module.exports = function (devMode, hot) {
sourcePrefix: "", // to avoid breaking multi-line string literals by inserting extra tabs.
globalObject: "(self || window)" // to avoid breaking in web worker (https:/webpack/webpack/issues/6642)
},
devtool: devMode ? "eval-cheap-module-source-map" : false,
devtool: "source-map",
module: {
rules: [
{
Expand Down Expand Up @@ -147,6 +148,12 @@ module.exports = function (devMode, hot) {
disable: hot,
ignoreOrder: true,
allChunks: true
}),
sentryWebpackPlugin({
authToken: process.env.SENTRY_AUTH_TOKEN,
org: "lawrence-at",
project: "terriamap-example",
telemetry: false
})
],
resolve: {
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"url": "http:/TerriaJS/TerriaMap"
},
"dependencies": {
"@sentry/react": "^8.22.0",
"@sentry/webpack-plugin": "^2.21.1",
"terriajs-server": "^4.0.0"
},
"config": {
Expand Down
3 changes: 3 additions & 0 deletions wwwroot/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@
},
"fallbackLanguage": "en"
},
"errorService": {
"provider": "sentry"
},
"searchBarConfig": {},
"searchProviders": [
{
Expand Down

0 comments on commit 60d1a51

Please sign in to comment.