Skip to content

Commit

Permalink
Merge pull request #249 from MindscapeHQ/remove-breadcrumbs-error-rep…
Browse files Browse the repository at this point in the history
…orting

Remove breadcrumbs error reporting
  • Loading branch information
UberMouse authored Sep 5, 2017
2 parents 471031a + 9e10d3b commit 7338180
Show file tree
Hide file tree
Showing 15 changed files with 53 additions and 85 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "raygun4js",
"version": "2.7.1",
"version": "2.7.2",
"homepage": "http://raygun.io",
"authors": [
"Mindscape <[email protected]>"
Expand Down
28 changes: 10 additions & 18 deletions dist/raygun.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raygun4js - v2.7.1 - 2017-07-21
/*! Raygun4js - v2.7.2 - 2017-08-15
* https://github.com/MindscapeHQ/raygun4js
* Copyright (c) 2017 MindscapeHQ; Licensed MIT */
(function(window, undefined) {
Expand Down Expand Up @@ -1668,7 +1668,7 @@ window.raygunUtilityFactory = function (window, Raygun) {
}
};

return function unhenance() {
return function unenhance() {
object[property] = existingFunction;
};
},
Expand Down Expand Up @@ -1769,14 +1769,12 @@ window.raygunBreadcrumbsFactory = function(window, Raygun) {
this.logXhrContents = false;
this.xhrIgnoredHosts = [].concat(this.DEFAULT_XHR_IGNORED_HOSTS);
this.breadcrumbs = [];
this.raygunInstance = {send: function() {}};
var self = this;
this.wrapWithHandler = function(method) {
return function() {
try {
return method.apply(this, arguments);
} catch (ex) {
self.raygunInstance.send(ex);
Raygun.Utilities.log(ex);
}
};
};
Expand All @@ -1787,6 +1785,7 @@ window.raygunBreadcrumbsFactory = function(window, Raygun) {
this.disableClicksTracking = function() {};

this.enableAutoBreadcrumbs();
this.wrapPrototypeWithHandlers();
};

Breadcrumbs.prototype.recordBreadcrumb = function(value, metadata) {
Expand Down Expand Up @@ -2174,10 +2173,7 @@ window.raygunBreadcrumbsFactory = function(window, Raygun) {
};


Breadcrumbs.prototype.setCrashReportingInstance = function(raygunInstance) {
raygunInstance.init('D8pC4YA3glwX5g4N/krb6Q==');
this.raygunInstance = raygunInstance;

Breadcrumbs.prototype.wrapPrototypeWithHandlers = function() {
var name, method;
for(name in Breadcrumbs.prototype) {
method = Breadcrumbs.prototype[name];
Expand All @@ -2192,7 +2188,7 @@ window.raygunBreadcrumbsFactory = function(window, Raygun) {

/*globals __DEV__, raygunUtilityFactory, raygunBreadcrumbsFactory */

var raygunFactory = function (window, $, forBreadcrumbs, undefined) {
var raygunFactory = function (window, $, undefined) {
var Raygun = {};
Raygun.Utilities = raygunUtilityFactory(window, Raygun);
Raygun.Breadcrumbs = raygunBreadcrumbsFactory(window, Raygun);
Expand Down Expand Up @@ -2259,8 +2255,8 @@ var raygunFactory = function (window, $, forBreadcrumbs, undefined) {
return Raygun;
},

constructNewRaygun: function (forBreadcrumbs) {
var rgInstance = raygunFactory(window, window.jQuery, forBreadcrumbs);
constructNewRaygun: function () {
var rgInstance = raygunFactory(window, window.jQuery);

return rgInstance;
},
Expand Down Expand Up @@ -2317,10 +2313,6 @@ var raygunFactory = function (window, $, forBreadcrumbs, undefined) {
}
}

if (!forBreadcrumbs) {
_breadcrumbs.setCrashReportingInstance(this.constructNewRaygun(true));
}

ensureUser();

return Raygun;
Expand Down Expand Up @@ -2959,7 +2951,7 @@ var raygunFactory = function (window, $, forBreadcrumbs, undefined) {
},
'Client': {
'Name': 'raygun-js',
'Version': '2.7.1'
'Version': '2.7.2'
},
'UserCustomData': finalCustomData,
'Tags': options.tags,
Expand Down Expand Up @@ -3116,7 +3108,7 @@ var raygunFactory = function (window, $, forBreadcrumbs, undefined) {
xhr.send(data);
}

if (!window.__raygunNoConflict && !forBreadcrumbs) {
if (!window.__raygunNoConflict) {
window.Raygun = Raygun;
}
TraceKit.setRaygun(Raygun);
Expand Down
6 changes: 3 additions & 3 deletions dist/raygun.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/raygun.min.js.map

Large diffs are not rendered by default.

28 changes: 10 additions & 18 deletions dist/raygun.umd.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raygun4js - v2.7.1 - 2017-07-21
/*! Raygun4js - v2.7.2 - 2017-08-15
* https://github.com/MindscapeHQ/raygun4js
* Copyright (c) 2017 MindscapeHQ; Licensed MIT */
// https://github.com/umdjs/umd/blob/master/templates/returnExportsGlobal.js
Expand Down Expand Up @@ -1703,7 +1703,7 @@ window.raygunUtilityFactory = function (window, Raygun) {
}
};

return function unhenance() {
return function unenhance() {
object[property] = existingFunction;
};
},
Expand Down Expand Up @@ -1804,14 +1804,12 @@ window.raygunBreadcrumbsFactory = function(window, Raygun) {
this.logXhrContents = false;
this.xhrIgnoredHosts = [].concat(this.DEFAULT_XHR_IGNORED_HOSTS);
this.breadcrumbs = [];
this.raygunInstance = {send: function() {}};
var self = this;
this.wrapWithHandler = function(method) {
return function() {
try {
return method.apply(this, arguments);
} catch (ex) {
self.raygunInstance.send(ex);
Raygun.Utilities.log(ex);
}
};
};
Expand All @@ -1822,6 +1820,7 @@ window.raygunBreadcrumbsFactory = function(window, Raygun) {
this.disableClicksTracking = function() {};

this.enableAutoBreadcrumbs();
this.wrapPrototypeWithHandlers();
};

Breadcrumbs.prototype.recordBreadcrumb = function(value, metadata) {
Expand Down Expand Up @@ -2209,10 +2208,7 @@ window.raygunBreadcrumbsFactory = function(window, Raygun) {
};


Breadcrumbs.prototype.setCrashReportingInstance = function(raygunInstance) {
raygunInstance.init('D8pC4YA3glwX5g4N/krb6Q==');
this.raygunInstance = raygunInstance;

Breadcrumbs.prototype.wrapPrototypeWithHandlers = function() {
var name, method;
for(name in Breadcrumbs.prototype) {
method = Breadcrumbs.prototype[name];
Expand All @@ -2227,7 +2223,7 @@ window.raygunBreadcrumbsFactory = function(window, Raygun) {

/*globals __DEV__, raygunUtilityFactory, raygunBreadcrumbsFactory */

var raygunFactory = function (window, $, forBreadcrumbs, undefined) {
var raygunFactory = function (window, $, undefined) {
var Raygun = {};
Raygun.Utilities = raygunUtilityFactory(window, Raygun);
Raygun.Breadcrumbs = raygunBreadcrumbsFactory(window, Raygun);
Expand Down Expand Up @@ -2294,8 +2290,8 @@ var raygunFactory = function (window, $, forBreadcrumbs, undefined) {
return Raygun;
},

constructNewRaygun: function (forBreadcrumbs) {
var rgInstance = raygunFactory(window, window.jQuery, forBreadcrumbs);
constructNewRaygun: function () {
var rgInstance = raygunFactory(window, window.jQuery);

return rgInstance;
},
Expand Down Expand Up @@ -2352,10 +2348,6 @@ var raygunFactory = function (window, $, forBreadcrumbs, undefined) {
}
}

if (!forBreadcrumbs) {
_breadcrumbs.setCrashReportingInstance(this.constructNewRaygun(true));
}

ensureUser();

return Raygun;
Expand Down Expand Up @@ -2994,7 +2986,7 @@ var raygunFactory = function (window, $, forBreadcrumbs, undefined) {
},
'Client': {
'Name': 'raygun-js',
'Version': '2.7.1'
'Version': '2.7.2'
},
'UserCustomData': finalCustomData,
'Tags': options.tags,
Expand Down Expand Up @@ -3151,7 +3143,7 @@ var raygunFactory = function (window, $, forBreadcrumbs, undefined) {
xhr.send(data);
}

if (!window.__raygunNoConflict && !forBreadcrumbs) {
if (!window.__raygunNoConflict) {
window.Raygun = Raygun;
}
TraceKit.setRaygun(Raygun);
Expand Down
6 changes: 3 additions & 3 deletions dist/raygun.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/raygun.umd.min.js.map

Large diffs are not rendered by default.

28 changes: 10 additions & 18 deletions dist/raygun.vanilla.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! Raygun4js - v2.7.1 - 2017-07-21
/*! Raygun4js - v2.7.2 - 2017-08-15
* https://github.com/MindscapeHQ/raygun4js
* Copyright (c) 2017 MindscapeHQ; Licensed MIT */
(function(window, undefined) {
Expand Down Expand Up @@ -1600,7 +1600,7 @@ window.raygunUtilityFactory = function (window, Raygun) {
}
};

return function unhenance() {
return function unenhance() {
object[property] = existingFunction;
};
},
Expand Down Expand Up @@ -1701,14 +1701,12 @@ window.raygunBreadcrumbsFactory = function(window, Raygun) {
this.logXhrContents = false;
this.xhrIgnoredHosts = [].concat(this.DEFAULT_XHR_IGNORED_HOSTS);
this.breadcrumbs = [];
this.raygunInstance = {send: function() {}};
var self = this;
this.wrapWithHandler = function(method) {
return function() {
try {
return method.apply(this, arguments);
} catch (ex) {
self.raygunInstance.send(ex);
Raygun.Utilities.log(ex);
}
};
};
Expand All @@ -1719,6 +1717,7 @@ window.raygunBreadcrumbsFactory = function(window, Raygun) {
this.disableClicksTracking = function() {};

this.enableAutoBreadcrumbs();
this.wrapPrototypeWithHandlers();
};

Breadcrumbs.prototype.recordBreadcrumb = function(value, metadata) {
Expand Down Expand Up @@ -2106,10 +2105,7 @@ window.raygunBreadcrumbsFactory = function(window, Raygun) {
};


Breadcrumbs.prototype.setCrashReportingInstance = function(raygunInstance) {
raygunInstance.init('D8pC4YA3glwX5g4N/krb6Q==');
this.raygunInstance = raygunInstance;

Breadcrumbs.prototype.wrapPrototypeWithHandlers = function() {
var name, method;
for(name in Breadcrumbs.prototype) {
method = Breadcrumbs.prototype[name];
Expand All @@ -2124,7 +2120,7 @@ window.raygunBreadcrumbsFactory = function(window, Raygun) {

/*globals __DEV__, raygunUtilityFactory, raygunBreadcrumbsFactory */

var raygunFactory = function (window, $, forBreadcrumbs, undefined) {
var raygunFactory = function (window, $, undefined) {
var Raygun = {};
Raygun.Utilities = raygunUtilityFactory(window, Raygun);
Raygun.Breadcrumbs = raygunBreadcrumbsFactory(window, Raygun);
Expand Down Expand Up @@ -2191,8 +2187,8 @@ var raygunFactory = function (window, $, forBreadcrumbs, undefined) {
return Raygun;
},

constructNewRaygun: function (forBreadcrumbs) {
var rgInstance = raygunFactory(window, window.jQuery, forBreadcrumbs);
constructNewRaygun: function () {
var rgInstance = raygunFactory(window, window.jQuery);

return rgInstance;
},
Expand Down Expand Up @@ -2249,10 +2245,6 @@ var raygunFactory = function (window, $, forBreadcrumbs, undefined) {
}
}

if (!forBreadcrumbs) {
_breadcrumbs.setCrashReportingInstance(this.constructNewRaygun(true));
}

ensureUser();

return Raygun;
Expand Down Expand Up @@ -2891,7 +2883,7 @@ var raygunFactory = function (window, $, forBreadcrumbs, undefined) {
},
'Client': {
'Name': 'raygun-js',
'Version': '2.7.1'
'Version': '2.7.2'
},
'UserCustomData': finalCustomData,
'Tags': options.tags,
Expand Down Expand Up @@ -3048,7 +3040,7 @@ var raygunFactory = function (window, $, forBreadcrumbs, undefined) {
xhr.send(data);
}

if (!window.__raygunNoConflict && !forBreadcrumbs) {
if (!window.__raygunNoConflict) {
window.Raygun = Raygun;
}
TraceKit.setRaygun(Raygun);
Expand Down
6 changes: 3 additions & 3 deletions dist/raygun.vanilla.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/raygun.vanilla.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"main": "dist/raygun.umd.js",
"title": "Raygun4js",
"description": "Raygun.io plugin for JavaScript",
"version": "2.7.1",
"version": "2.7.2",
"homepage": "https://github.com/MindscapeHQ/raygun4js",
"author": {
"name": "MindscapeHQ",
Expand Down
2 changes: 1 addition & 1 deletion raygun4js.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>raygun4js</id>
<version>2.7.1</version>
<version>2.7.2</version>
<title>Raygun4js</title>
<authors>Mindscape Limited</authors>
<owners>Mindscape Limited</owners>
Expand Down
10 changes: 3 additions & 7 deletions src/raygun.breadcrumbs.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,12 @@ window.raygunBreadcrumbsFactory = function(window, Raygun) {
this.logXhrContents = false;
this.xhrIgnoredHosts = [].concat(this.DEFAULT_XHR_IGNORED_HOSTS);
this.breadcrumbs = [];
this.raygunInstance = {send: function() {}};
var self = this;
this.wrapWithHandler = function(method) {
return function() {
try {
return method.apply(this, arguments);
} catch (ex) {
self.raygunInstance.send(ex);
Raygun.Utilities.log(ex);
}
};
};
Expand All @@ -51,6 +49,7 @@ window.raygunBreadcrumbsFactory = function(window, Raygun) {
this.disableClicksTracking = function() {};

this.enableAutoBreadcrumbs();
this.wrapPrototypeWithHandlers();
};

Breadcrumbs.prototype.recordBreadcrumb = function(value, metadata) {
Expand Down Expand Up @@ -438,10 +437,7 @@ window.raygunBreadcrumbsFactory = function(window, Raygun) {
};


Breadcrumbs.prototype.setCrashReportingInstance = function(raygunInstance) {
raygunInstance.init('D8pC4YA3glwX5g4N/krb6Q==');
this.raygunInstance = raygunInstance;

Breadcrumbs.prototype.wrapPrototypeWithHandlers = function() {
var name, method;
for(name in Breadcrumbs.prototype) {
method = Breadcrumbs.prototype[name];
Expand Down
Loading

0 comments on commit 7338180

Please sign in to comment.