Add raven-js/Sentry support
This commit is contained in:
parent
3fe4e1844a
commit
07314271b4
3
app.js
3
app.js
|
@ -145,7 +145,8 @@ function clientOptionsHandler(compilers, fileSources) {
|
|||
compileOptions: compilerProps("options"),
|
||||
supportsBinary: !!compilerProps("supportsBinary"),
|
||||
postProcess: compilerProps("postProcess"),
|
||||
sources: sources
|
||||
sources: sources,
|
||||
raven: gccProps('ravenUrl', '')
|
||||
};
|
||||
var text = JSON.stringify(options);
|
||||
return function getClientOptions(req, res) {
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
"selectize": "^0.12.2",
|
||||
"eventEmitter": "^5.1.0",
|
||||
"lz-string": "^1.4.4",
|
||||
"clipboard": "^1.5.12"
|
||||
"clipboard": "^1.5.12",
|
||||
"raven-js": "^3.7.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,3 +8,4 @@ cacheMb=50
|
|||
clientGoogleAnalyticsEnabled=true
|
||||
proxyRetries=300
|
||||
proxyRetryMs=500
|
||||
ravenUrl=https://4574a044b9f8442f86c2ce14490255f1@sentry.io/102028
|
|
@ -1,2 +1,3 @@
|
|||
language=C++
|
||||
clientURLShortener=google
|
||||
ravenUrl=https://4574a044b9f8442f86c2ce14490255f1@sentry.io/102028
|
||||
|
|
|
@ -26,6 +26,11 @@
|
|||
define(function (require, exports) {
|
||||
"use strict";
|
||||
var options = require('options');
|
||||
var Raven = require('raven-js');
|
||||
|
||||
if (options.raven) {
|
||||
Raven.config(options.raven).install();
|
||||
}
|
||||
|
||||
if (options.googleAnalyticsEnabled) {
|
||||
(function (i, s, o, g, r, a, m) {
|
||||
|
|
|
@ -34,7 +34,8 @@ require.config({
|
|||
microplugin: 'ext/microplugin/src/microplugin',
|
||||
events: 'ext/eventEmitter/EventEmitter',
|
||||
lzstring: 'ext/lz-string/libs/lz-string',
|
||||
clipboard: 'ext/clipboard/dist/clipboard'
|
||||
clipboard: 'ext/clipboard/dist/clipboard',
|
||||
'raven-js': 'ext/raven-js/dist/raven'
|
||||
},
|
||||
packages: [{
|
||||
name: "codemirror",
|
||||
|
@ -61,6 +62,7 @@ define(function (require) {
|
|||
var clipboard = require('clipboard');
|
||||
var Hub = require('hub');
|
||||
var shortenURL = require('urlshorten-google');
|
||||
var Raven = require('raven-js');
|
||||
|
||||
analytics.initialise();
|
||||
sharing.initialise();
|
||||
|
@ -95,7 +97,7 @@ define(function (require) {
|
|||
try {
|
||||
layout = new GoldenLayout(config, root);
|
||||
} catch (e) {
|
||||
console.log("Caught " + e + " during layout; using default layout");
|
||||
Raven.captureException(e);
|
||||
layout = new GoldenLayout(defaultConfig, root);
|
||||
}
|
||||
layout.on('stateChanged', function () {
|
||||
|
@ -155,7 +157,7 @@ define(function (require) {
|
|||
}
|
||||
|
||||
initPopover($("#get-full-link"), function (done) {
|
||||
done(permalink)
|
||||
done(permalink);
|
||||
});
|
||||
initPopover($("#get-short-link"), function (done) {
|
||||
shortenURL(permalink(), done);
|
||||
|
|
Loading…
Reference in New Issue