@sentry/integrations
Advanced tools
Comparing version 5.10.0-beta.1 to 5.10.0-beta.2
@@ -253,7 +253,9 @@ (function (__window) { | ||
} | ||
// `${window.location.href}` will be used a temp transaction name | ||
TransactionActivity.startIdleTransaction("" + window.location.href, { | ||
op: 'pageload', | ||
sampled: true, | ||
}); | ||
if (global$2.location && global$2.location.href) { | ||
// `${global.location.href}` will be used a temp transaction name | ||
TransactionActivity.startIdleTransaction(global$2.location.href, { | ||
op: 'pageload', | ||
sampled: true, | ||
}); | ||
} | ||
}; | ||
@@ -267,2 +269,6 @@ /** | ||
} | ||
// This happens only in test cases where the integration isn't initalized properly | ||
if (!TransactionActivity.options || isNaN(TransactionActivity.options.tracesSampleRate)) { | ||
return false; | ||
} | ||
TransactionActivity._enabled = Math.random() > TransactionActivity.options.tracesSampleRate ? false : true; | ||
@@ -269,0 +275,0 @@ return TransactionActivity._enabled; |
@@ -1,2 +0,2 @@ | ||
!function(t){var n={};Object.defineProperty(n,"__esModule",{value:!0});var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,n)};var r=function(){return(r=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var o in n=arguments[e])Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o]);return t}).apply(this,arguments)},o=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){return t.__proto__=n,t}:function(t,n){for(var e in n)t.hasOwnProperty(e)||(t[e]=n[e]);return t});!function(t){function n(n){var e=this.constructor,r=t.call(this,n)||this;return r.message=n,r.name=e.prototype.constructor.name,o(r,e.prototype),r}(function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)})(n,t)}(Error);var i={};function a(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:i}function c(t){var n=a();if(!("console"in n))return t();var e=n.console,r={};["debug","info","warn","error","log","assert"].forEach(function(t){t in n.console&&e[t].__sentry__&&(r[t]=e[t].__sentry_wrapped__,e[t]=e[t].__sentry_original__)});var o=t();return Object.keys(r).forEach(function(t){e[t]=r[t]}),o}var s=a(),_="Sentry Logger ",u=function(){function t(){this._enabled=!1}return t.prototype.disable=function(){this._enabled=!1},t.prototype.enable=function(){this._enabled=!0},t.prototype.log=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this._enabled&&c(function(){s.console.log(_+"[Log]: "+t.join(" "))})},t.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this._enabled&&c(function(){s.console.warn(_+"[Warn]: "+t.join(" "))})},t.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this._enabled&&c(function(){s.console.error(_+"[Error]: "+t.join(" "))})},t}();s.__SENTRY__=s.__SENTRY__||{};var p;s.__SENTRY__.logger||(s.__SENTRY__.logger=new u);!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(p||(p={}));var f=a(),l=function(){function t(n){this._options=n,this.name=t.id;var e={idleTimeout:500,onLocationChange:function(){return f.location.href},patchHistory:!0,startTransactionOnLocationChange:!0,tracesSampleRate:1};t.options=r({},e,n)}return t.prototype.setupOnce=function(n,e){t._getCurrentHub=e,t._isEnabled()&&t.startIdleTransaction(""+window.location.href,{op:"pageload",sampled:!0})},t._isEnabled=function(){return void 0!==t._enabled?t._enabled:(t._enabled=!(Math.random()>t.options.tracesSampleRate),t._enabled)},t.startIdleTransaction=function(n,e){if(t._isEnabled()){var o=t._activeTransaction;o&&o.finish();var i=t._getCurrentHub;if(i){var a=i();if(a){var c=a.startSpan(r({},e,{transaction:n}),!0);t._activeTransaction=c,a.configureScope(function(t){t.setSpan(c)});var s=t.pushActivity("idleTransactionStarted");return setTimeout(function(){t.popActivity(s)},t.options&&t.options.idleTimeout||100),c}}}},t.updateTransactionName=function(n){var e=t._activeTransaction;e&&(e.transaction=n)},t.finishIdleTransaction=function(){var n=t._activeTransaction;n&&n.finish(!0)},t.pushActivity=function(n,e){if(!t._isEnabled())return 0;var r=t._getCurrentHub;if(e&&r){var o=r();o&&(t._activities[t._currentIndex]={name:n,span:o.startSpan(e)})}else t._activities[t._currentIndex]={name:n};return t._currentIndex++},t.popActivity=function(n){if(t._isEnabled()){var e=t._activities[n];e&&(e.span&&e.span.finish(),delete t._activities[n]);var r=Object.keys(t._activities).length;if(clearTimeout(t._debounce),0===r){var o=t.options&&t.options.idleTimeout;t._debounce=setTimeout(function(){t.finishIdleTransaction()},o)}}},t.id="TransactionActivity",t._currentIndex=0,t._activities={},t._debounce=0,t}();var d=[{callback:function(t){l.options.startTransactionOnLocationChange&&l.startIdleTransaction(f.location.href,{op:"navigation",sampled:!0})},type:"history"},{callback:function(t){if(t.requestComplete&&t.xhr.__sentry_xhr_activity_id__)l.popActivity(t.xhr.__sentry_xhr_activity_id__);else if(!t.xhr.__sentry_own_request__){var n=t.xhr.__sentry_xhr__;t.xhr.__sentry_xhr_activity_id__=l.pushActivity("xhr",{data:{request_data:n.data},description:n.method+" "+n.url,op:"http"})}},type:"xhr"}];for(var v in n.TransactionActivity=l,n.TransactionActivityHandlers=d,t.Sentry=t.Sentry||{},t.Sentry.Integrations=t.Sentry.Integrations||{},n)Object.prototype.hasOwnProperty.call(n,v)&&(t.Sentry.Integrations[v]=n[v])}(window); | ||
!function(t){var n={};Object.defineProperty(n,"__esModule",{value:!0});var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)n.hasOwnProperty(e)&&(t[e]=n[e])})(t,n)};var o=function(){return(o=Object.assign||function(t){for(var n,e=1,o=arguments.length;e<o;e++)for(var r in n=arguments[e])Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r]);return t}).apply(this,arguments)},r=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,n){return t.__proto__=n,t}:function(t,n){for(var e in n)t.hasOwnProperty(e)||(t[e]=n[e]);return t});!function(t){function n(n){var e=this.constructor,o=t.call(this,n)||this;return o.message=n,o.name=e.prototype.constructor.name,r(o,e.prototype),o}(function(t,n){function o(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)})(n,t)}(Error);var i={};function a(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:i}function c(t){var n=a();if(!("console"in n))return t();var e=n.console,o={};["debug","info","warn","error","log","assert"].forEach(function(t){t in n.console&&e[t].__sentry__&&(o[t]=e[t].__sentry_wrapped__,e[t]=e[t].__sentry_original__)});var r=t();return Object.keys(o).forEach(function(t){e[t]=o[t]}),r}var s=a(),_="Sentry Logger ",u=function(){function t(){this._enabled=!1}return t.prototype.disable=function(){this._enabled=!1},t.prototype.enable=function(){this._enabled=!0},t.prototype.log=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this._enabled&&c(function(){s.console.log(_+"[Log]: "+t.join(" "))})},t.prototype.warn=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this._enabled&&c(function(){s.console.warn(_+"[Warn]: "+t.join(" "))})},t.prototype.error=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this._enabled&&c(function(){s.console.error(_+"[Error]: "+t.join(" "))})},t}();s.__SENTRY__=s.__SENTRY__||{};var p;s.__SENTRY__.logger||(s.__SENTRY__.logger=new u);!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(p||(p={}));var f=a(),l=function(){function t(n){this._options=n,this.name=t.id;var e={idleTimeout:500,onLocationChange:function(){return f.location.href},patchHistory:!0,startTransactionOnLocationChange:!0,tracesSampleRate:1};t.options=o({},e,n)}return t.prototype.setupOnce=function(n,e){t._getCurrentHub=e,t._isEnabled()&&f.location&&f.location.href&&t.startIdleTransaction(f.location.href,{op:"pageload",sampled:!0})},t._isEnabled=function(){return void 0!==t._enabled?t._enabled:!(!t.options||isNaN(t.options.tracesSampleRate))&&(t._enabled=!(Math.random()>t.options.tracesSampleRate),t._enabled)},t.startIdleTransaction=function(n,e){if(t._isEnabled()){var r=t._activeTransaction;r&&r.finish();var i=t._getCurrentHub;if(i){var a=i();if(a){var c=a.startSpan(o({},e,{transaction:n}),!0);t._activeTransaction=c,a.configureScope(function(t){t.setSpan(c)});var s=t.pushActivity("idleTransactionStarted");return setTimeout(function(){t.popActivity(s)},t.options&&t.options.idleTimeout||100),c}}}},t.updateTransactionName=function(n){var e=t._activeTransaction;e&&(e.transaction=n)},t.finishIdleTransaction=function(){var n=t._activeTransaction;n&&n.finish(!0)},t.pushActivity=function(n,e){if(!t._isEnabled())return 0;var o=t._getCurrentHub;if(e&&o){var r=o();r&&(t._activities[t._currentIndex]={name:n,span:r.startSpan(e)})}else t._activities[t._currentIndex]={name:n};return t._currentIndex++},t.popActivity=function(n){if(t._isEnabled()){var e=t._activities[n];e&&(e.span&&e.span.finish(),delete t._activities[n]);var o=Object.keys(t._activities).length;if(clearTimeout(t._debounce),0===o){var r=t.options&&t.options.idleTimeout;t._debounce=setTimeout(function(){t.finishIdleTransaction()},r)}}},t.id="TransactionActivity",t._currentIndex=0,t._activities={},t._debounce=0,t}();var d=[{callback:function(t){l.options.startTransactionOnLocationChange&&l.startIdleTransaction(f.location.href,{op:"navigation",sampled:!0})},type:"history"},{callback:function(t){if(t.requestComplete&&t.xhr.__sentry_xhr_activity_id__)l.popActivity(t.xhr.__sentry_xhr_activity_id__);else if(!t.xhr.__sentry_own_request__){var n=t.xhr.__sentry_xhr__;t.xhr.__sentry_xhr_activity_id__=l.pushActivity("xhr",{data:{request_data:n.data},description:n.method+" "+n.url,op:"http"})}},type:"xhr"}];for(var v in n.TransactionActivity=l,n.TransactionActivityHandlers=d,t.Sentry=t.Sentry||{},t.Sentry.Integrations=t.Sentry.Integrations||{},n)Object.prototype.hasOwnProperty.call(n,v)&&(t.Sentry.Integrations[v]=n[v])}(window); | ||
//# sourceMappingURL=transactionactivity.min.js.map |
@@ -33,7 +33,9 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
} | ||
// `${window.location.href}` will be used a temp transaction name | ||
TransactionActivity.startIdleTransaction("" + window.location.href, { | ||
op: 'pageload', | ||
sampled: true, | ||
}); | ||
if (global.location && global.location.href) { | ||
// `${global.location.href}` will be used a temp transaction name | ||
TransactionActivity.startIdleTransaction(global.location.href, { | ||
op: 'pageload', | ||
sampled: true, | ||
}); | ||
} | ||
}; | ||
@@ -47,2 +49,6 @@ /** | ||
} | ||
// This happens only in test cases where the integration isn't initalized properly | ||
if (!TransactionActivity.options || isNaN(TransactionActivity.options.tracesSampleRate)) { | ||
return false; | ||
} | ||
TransactionActivity._enabled = Math.random() > TransactionActivity.options.tracesSampleRate ? false : true; | ||
@@ -49,0 +55,0 @@ return TransactionActivity._enabled; |
@@ -32,7 +32,9 @@ import * as tslib_1 from "tslib"; | ||
} | ||
// `${window.location.href}` will be used a temp transaction name | ||
TransactionActivity.startIdleTransaction("" + window.location.href, { | ||
op: 'pageload', | ||
sampled: true, | ||
}); | ||
if (global.location && global.location.href) { | ||
// `${global.location.href}` will be used a temp transaction name | ||
TransactionActivity.startIdleTransaction(global.location.href, { | ||
op: 'pageload', | ||
sampled: true, | ||
}); | ||
} | ||
}; | ||
@@ -46,2 +48,6 @@ /** | ||
} | ||
// This happens only in test cases where the integration isn't initalized properly | ||
if (!TransactionActivity.options || isNaN(TransactionActivity.options.tracesSampleRate)) { | ||
return false; | ||
} | ||
TransactionActivity._enabled = Math.random() > TransactionActivity.options.tracesSampleRate ? false : true; | ||
@@ -48,0 +54,0 @@ return TransactionActivity._enabled; |
{ | ||
"name": "@sentry/integrations", | ||
"version": "5.10.0-beta.1", | ||
"version": "5.10.0-beta.2", | ||
"description": "Pluggable integrations that can be used to enchance JS SDKs", | ||
@@ -19,4 +19,4 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/types": "5.10.0-beta.1", | ||
"@sentry/utils": "5.10.0-beta.1", | ||
"@sentry/types": "5.10.0-beta.2", | ||
"@sentry/utils": "5.10.0-beta.2", | ||
"tslib": "^1.9.3" | ||
@@ -23,0 +23,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1465632
9246
+ Added@sentry/types@5.10.0-beta.2(transitive)
+ Added@sentry/utils@5.10.0-beta.2(transitive)
- Removed@sentry/types@5.10.0-beta.1(transitive)
- Removed@sentry/utils@5.10.0-beta.1(transitive)
Updated@sentry/types@5.10.0-beta.2
Updated@sentry/utils@5.10.0-beta.2