1
Fork 0

Install sentry error logging

This commit is contained in:
Jake Howard 2019-06-01 18:12:29 +01:00
parent 70612d24ca
commit f59c66c9f3
Signed by: jake
GPG key ID: 57AFB45680EDD477
6 changed files with 84 additions and 2 deletions

View file

@ -5,6 +5,7 @@
], ],
"globals": { "globals": {
"mermaid": true, "mermaid": true,
"$": true "$": true,
"process": true
} }
} }

View file

@ -36,6 +36,8 @@
{{ partial "script.html" "js/jquery.js" }} {{ partial "script.html" "js/jquery.js" }}
{{ partial "script.html" "js/sentry.js" }}
{{ if eq .Params.layout "flickr" }} {{ if eq .Params.layout "flickr" }}
{{ partial "script_async.html" "js/lightgallery.js" }} {{ partial "script_async.html" "js/lightgallery.js" }}
{{ end }} {{ end }}

74
package-lock.json generated
View file

@ -9,6 +9,63 @@
"resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.8.2.tgz", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.8.2.tgz",
"integrity": "sha512-E4fDUF4fbu9AxKpaQQqCN3XBnNzb/5e0Gvd9OaQsYkK574LVI57v/EqqPfIm/mC7jYbxaPNrhvT5AF+Yzwyizg==" "integrity": "sha512-E4fDUF4fbu9AxKpaQQqCN3XBnNzb/5e0Gvd9OaQsYkK574LVI57v/EqqPfIm/mC7jYbxaPNrhvT5AF+Yzwyizg=="
}, },
"@sentry/browser": {
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-5.4.0.tgz",
"integrity": "sha512-lsGJqryHXrnWRkdahnep0m+m65zyMJGCmB2T8pGS+SFcSXdx94TaK4PiPaCl6XUCT5ejuQUHoXsEBmK/3S6beA==",
"requires": {
"@sentry/core": "5.4.0",
"@sentry/types": "5.4.0",
"@sentry/utils": "5.4.0",
"tslib": "^1.9.3"
}
},
"@sentry/core": {
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.4.0.tgz",
"integrity": "sha512-luIJPftVnrW0ZKqs9W6YCpzKZVbOgQv8Ae7KB0Acsvqeoqjtx4zHHfVfu5VPkfhrOYN3NsM1IpApXtSdMiJCfg==",
"requires": {
"@sentry/hub": "5.4.0",
"@sentry/minimal": "5.4.0",
"@sentry/types": "5.4.0",
"@sentry/utils": "5.4.0",
"tslib": "^1.9.3"
}
},
"@sentry/hub": {
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-5.4.0.tgz",
"integrity": "sha512-X0iLNcouXcLWzuOJz2YjTn1E11b7pzcG98/iFTHW3AKPjnJNt92XRpjsDI2iT8+ODUDiFqaFmACSn2oZK80WGQ==",
"requires": {
"@sentry/types": "5.4.0",
"@sentry/utils": "5.4.0",
"tslib": "^1.9.3"
}
},
"@sentry/minimal": {
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.4.0.tgz",
"integrity": "sha512-MuOLavHHTXXWKyfTcwqpjhkdYlJDyOfjfcf+b/d38+8cs064rpNScxTZyYj2KKxNGcCqDgUsY175fNp/D1fyMw==",
"requires": {
"@sentry/hub": "5.4.0",
"@sentry/types": "5.4.0",
"tslib": "^1.9.3"
}
},
"@sentry/types": {
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.4.0.tgz",
"integrity": "sha512-R8IFM77rzp0ngR/XQFLsXUK2uE7jLf21MsU9mpUwLtxcJp8rs7I77HgzA5MEerdG9Sbxw5RaLq9wO7noHGfUmQ=="
},
"@sentry/utils": {
"version": "5.4.0",
"resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.4.0.tgz",
"integrity": "sha512-NlYMAyiI9iIItLDxJ17tLMtuu7261t93tcOGSMdDQZlmryR6ZAMenbCKTf5MrpA2iHfX84gyfmr67lh8uSHkPg==",
"requires": {
"@sentry/types": "5.4.0",
"tslib": "^1.9.3"
}
},
"JSONStream": { "JSONStream": {
"version": "1.3.5", "version": "1.3.5",
"resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz",
@ -1165,6 +1222,16 @@
"minimalistic-crypto-utils": "^1.0.0" "minimalistic-crypto-utils": "^1.0.0"
} }
}, },
"envify": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/envify/-/envify-4.1.0.tgz",
"integrity": "sha512-IKRVVoAYr4pIx4yIWNsz9mOsboxlNXiu7TNBnem/K/uTHdkyzXWDzHCK7UTolqBbgaBz0tQHsD3YNls0uIIjiw==",
"dev": true,
"requires": {
"esprima": "^4.0.0",
"through": "~2.3.4"
}
},
"es-abstract": { "es-abstract": {
"version": "1.13.0", "version": "1.13.0",
"resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz", "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.13.0.tgz",
@ -3428,7 +3495,7 @@
"dependencies": { "dependencies": {
"readable-stream": { "readable-stream": {
"version": "2.3.6", "version": "2.3.6",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", "resolved": "http://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz",
"integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==",
"dev": true, "dev": true,
"requires": { "requires": {
@ -3479,6 +3546,11 @@
"dev": true, "dev": true,
"optional": true "optional": true
}, },
"tslib": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz",
"integrity": "sha512-4krF8scpejhaOgqzBEcGM7yDIEfi0/8+8zDRZhNZZ2kjmHJ4hv3zCbQWxoJGz1iw5U0Jl0nma13xzHXcncMavQ=="
},
"tty-browserify": { "tty-browserify": {
"version": "0.0.1", "version": "0.0.1",
"resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz",

View file

@ -8,6 +8,7 @@
"author": "Jake Howard <git@theorangeone.net>", "author": "Jake Howard <git@theorangeone.net>",
"devDependencies": { "devDependencies": {
"browserify": "16.2.3", "browserify": "16.2.3",
"envify": "4.1.0",
"eslint-config-dabapps": "4.0.0", "eslint-config-dabapps": "4.0.0",
"markdown-spellcheck": "1.3.1", "markdown-spellcheck": "1.3.1",
"sass-lint": "1.13.1", "sass-lint": "1.13.1",
@ -15,6 +16,7 @@
}, },
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-free": "5.8.2", "@fortawesome/fontawesome-free": "5.8.2",
"@sentry/browser": "5.4.0",
"bootstrap": "4.3.1", "bootstrap": "4.3.1",
"clipboard": "2.0.4", "clipboard": "2.0.4",
"jquery": "3.4.1", "jquery": "3.4.1",

View file

@ -21,6 +21,8 @@ cp $BASEDIR/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js $STATIC_BUILD
cp $BASEDIR/node_modules/mermaid/dist/mermaid.min.js $STATIC_BUILD/js/mermaid.js cp $BASEDIR/node_modules/mermaid/dist/mermaid.min.js $STATIC_BUILD/js/mermaid.js
browserify $STATIC_SRC/js/index.js -o $STATIC_BUILD/js/app.js browserify $STATIC_SRC/js/index.js -o $STATIC_BUILD/js/app.js
browserify $STATIC_SRC/js/sentry.js -t envify -o $STATIC_BUILD/js/sentry.js
cp -r $STATIC_SRC/scss $STATIC_BUILD/scss cp -r $STATIC_SRC/scss $STATIC_BUILD/scss
hugo gen chromastyles --style=monokai > $STATIC_BUILD/css/highlight.css hugo gen chromastyles --style=monokai > $STATIC_BUILD/css/highlight.css

3
static/src/js/sentry.js Normal file
View file

@ -0,0 +1,3 @@
'use strict';
require('@sentry/browser').init({ dsn: process.env.SENTRY_DSN });