@sentry/integrations
Advanced tools
Comparing version 5.7.1 to 5.8.0-beta.0
@@ -401,25 +401,4 @@ (function (__window) { | ||
} | ||
if (this._options.autoStartOnDomReady !== false) { | ||
getGlobalObject().addEventListener('DOMContentLoaded', function () { | ||
Tracing.startTrace(getCurrentHub(), getGlobalObject().location.href); | ||
}); | ||
getGlobalObject().document.onreadystatechange = function () { | ||
if (document.readyState === 'complete') { | ||
Tracing.startTrace(getCurrentHub(), getGlobalObject().location.href); | ||
} | ||
}; | ||
} | ||
}; | ||
/** | ||
* Starts a new trace | ||
* @param hub The hub to start the trace on | ||
* @param transaction Optional transaction | ||
*/ | ||
Tracing.startTrace = function (hub, transaction) { | ||
hub.configureScope(function (scope) { | ||
scope.startSpan(); | ||
scope.setTransaction(transaction); | ||
}); | ||
}; | ||
/** | ||
* JSDoc | ||
@@ -463,2 +442,7 @@ */ | ||
}); | ||
if (isMatchingPattern(url_1, 'sentry_key')) { | ||
// If sentry_key is in the url, it's an internal store request to sentry | ||
// we do not want to add the trace header to store requests | ||
isWhitelisted = false; | ||
} | ||
if (isWhitelisted && this.setRequestHeader) { | ||
@@ -490,23 +474,29 @@ Object.keys(headers_1).forEach(function (key) { | ||
// @ts-ignore | ||
var self = getCurrentHub().getIntegration(Tracing); | ||
var hub = getCurrentHub(); | ||
var self = hub.getIntegration(Tracing); | ||
if (self && self._options.tracingOrigins) { | ||
var url_2 = args[0]; | ||
var options = (args[1] = args[1] || {}); | ||
var whiteListed_1 = false; | ||
var isWhitelisted_1 = false; | ||
self._options.tracingOrigins.forEach(function (whiteListUrl) { | ||
if (!whiteListed_1) { | ||
whiteListed_1 = isMatchingPattern(url_2, whiteListUrl); | ||
if (!isWhitelisted_1) { | ||
isWhitelisted_1 = isMatchingPattern(url_2, whiteListUrl); | ||
} | ||
}); | ||
if (whiteListed_1) { | ||
if (isMatchingPattern(url_2, 'sentry_key')) { | ||
// If sentry_key is in the url, it's an internal store request to sentry | ||
// we do not want to add the trace header to store requests | ||
isWhitelisted_1 = false; | ||
} | ||
if (isWhitelisted_1) { | ||
if (options.headers) { | ||
if (Array.isArray(options.headers)) { | ||
options.headers = __spread(options.headers, Object.entries(getCurrentHub().traceHeaders())); | ||
options.headers = __spread(options.headers, Object.entries(hub.traceHeaders())); | ||
} | ||
else { | ||
options.headers = __assign({}, options.headers, getCurrentHub().traceHeaders()); | ||
options.headers = __assign({}, options.headers, hub.traceHeaders()); | ||
} | ||
} | ||
else { | ||
options.headers = getCurrentHub().traceHeaders(); | ||
options.headers = hub.traceHeaders(); | ||
} | ||
@@ -513,0 +503,0 @@ } |
@@ -1,2 +0,2 @@ | ||
!function(t){var e={};Object.defineProperty(e,"__esModule",{value:!0});var n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};var r=function(){return(r=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var o in e=arguments[n])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)};function o(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,o,i=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(t){o={error:t}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}var i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,e){return t.__proto__=e,t}:function(t,e){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n]);return t});!function(t){function e(e){var n=this.constructor,r=t.call(this,e)||this;return r.message=e,r.name=n.prototype.constructor.name,i(r,n.prototype),r}(function(t,e){function r(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)})(e,t)}(Error);var a={};function c(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:a}function s(t){var e=c();if(!("console"in e))return t();var n=e.console,r={};["debug","info","warn","error","log","assert"].forEach(function(t){t in e.console&&n[t].__sentry__&&(r[t]=n[t].__sentry_wrapped__,n[t]=n[t].__sentry_original__)});var o=t();return Object.keys(r).forEach(function(t){n[t]=r[t]}),o}var f=c(),u="Sentry Logger ",p=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=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&s(function(){f.console.log(u+"[Log]: "+t.join(" "))})},t.prototype.warn=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&s(function(){f.console.warn(u+"[Warn]: "+t.join(" "))})},t.prototype.error=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this._enabled&&s(function(){f.console.error(u+"[Error]: "+t.join(" "))})},t}();f.__SENTRY__=f.__SENTRY__||{};var l,_=f.__SENTRY__.logger||(f.__SENTRY__.logger=new p);function h(t,e){return n=e,"[object RegExp]"===Object.prototype.toString.call(n)?e.test(t):"string"==typeof e&&-1!==t.indexOf(e);var n}function d(t,e,n){if(e in t){var r=t[e],o=n(r);if("function"==typeof o)try{o.prototype=o.prototype||{},Object.defineProperties(o,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:r},__sentry_wrapped__:{enumerable:!1,value:o}})}catch(t){}t[e]=o}}function y(){if(!function(){if(!("fetch"in c()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}())return!1;var t=function(t){return-1!==t.toString().indexOf("native")},e=c(),n=null,r=e.document;if(r){var o=r.createElement("iframe");o.hidden=!0;try{r.head.appendChild(o),o.contentWindow&&o.contentWindow.fetch&&(n=t(o.contentWindow.fetch)),r.head.removeChild(o)}catch(t){_.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}}return null===n&&(n=t(e.fetch)),n}!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(l||(l={}));var g=function(){function t(e){if(void 0===e&&(e={}),this._options=e,this.name=t.id,!Array.isArray(e.tracingOrigins)||0===e.tracingOrigins.length){var n=["localhost",/^\//];_.warn("Sentry: You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace."),_.warn("Sentry: We added a reasonable default for you: "+n),e.tracingOrigins=n}}return t.prototype.setupOnce=function(e,n){!1!==this._options.traceXHR&&this._traceXHR(n),!1!==this._options.traceFetch&&this._traceFetch(n),!1!==this._options.autoStartOnDomReady&&(c().addEventListener("DOMContentLoaded",function(){t.startTrace(n(),c().location.href)}),c().document.onreadystatechange=function(){"complete"===document.readyState&&t.startTrace(n(),c().location.href)})},t.startTrace=function(t,e){t.configureScope(function(t){t.startSpan(),t.setTransaction(e)})},t.prototype._traceXHR=function(e){if("XMLHttpRequest"in c()){var n=XMLHttpRequest.prototype;d(n,"open",function(n){return function(){for(var r=[],o=0;o<arguments.length;o++)r[o]=arguments[o];var i=e().getIntegration(t);return i&&(i._xhrUrl=r[1]),n.apply(this,r)}}),d(n,"send",function(n){return function(){for(var r=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var a=e().getIntegration(t);if(a&&a._xhrUrl&&a._options.tracingOrigins){var c=a._xhrUrl,s=e().traceHeaders();a._options.tracingOrigins.some(function(t){return h(c,t)})&&this.setRequestHeader&&Object.keys(s).forEach(function(t){r.setRequestHeader(t,s[t])})}return n.apply(this,o)}})}},t.prototype._traceFetch=function(e){y()&&d(c(),"fetch",function(n){return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=e().getIntegration(t);if(s&&s._options.tracingOrigins){var f=i[0],u=i[1]=i[1]||{},p=!1;s._options.tracingOrigins.forEach(function(t){p||(p=h(f,t))}),p&&(u.headers?Array.isArray(u.headers)?u.headers=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(o(arguments[e]));return t}(u.headers,Object.entries(e().traceHeaders())):u.headers=r({},u.headers,e().traceHeaders()):u.headers=e().traceHeaders())}return n.apply(c(),i)}})},t.id="Tracing",t}();for(var v in e.Tracing=g,t.Sentry=t.Sentry||{},t.Sentry.Integrations=t.Sentry.Integrations||{},e)Object.prototype.hasOwnProperty.call(e,v)&&(t.Sentry.Integrations[v]=e[v])}(window); | ||
!function(t){var r={};Object.defineProperty(r,"__esModule",{value:!0});var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var e in r)r.hasOwnProperty(e)&&(t[e]=r[e])})(t,r)};var n=function(){return(n=Object.assign||function(t){for(var r,e=1,n=arguments.length;e<n;e++)for(var o in r=arguments[e])Object.prototype.hasOwnProperty.call(r,o)&&(t[o]=r[o]);return t}).apply(this,arguments)};function o(t,r){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var n,o,i=e.call(t),a=[];try{for(;(void 0===r||r-- >0)&&!(n=i.next()).done;)a.push(n.value)}catch(t){o={error:t}}finally{try{n&&!n.done&&(e=i.return)&&e.call(i)}finally{if(o)throw o.error}}return a}var i=Object.setPrototypeOf||({__proto__:[]}instanceof Array?function(t,r){return t.__proto__=r,t}:function(t,r){for(var e in r)t.hasOwnProperty(e)||(t[e]=r[e]);return t});!function(t){function r(r){var e=this.constructor,n=t.call(this,r)||this;return n.message=r,n.name=e.prototype.constructor.name,i(n,e.prototype),n}(function(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)})(r,t)}(Error);var a={};function c(){return"[object process]"===Object.prototype.toString.call("undefined"!=typeof process?process:0)?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:a}function s(t){var r=c();if(!("console"in r))return t();var e=r.console,n={};["debug","info","warn","error","log","assert"].forEach(function(t){t in r.console&&e[t].__sentry__&&(n[t]=e[t].__sentry_wrapped__,e[t]=e[t].__sentry_original__)});var o=t();return Object.keys(n).forEach(function(t){e[t]=n[t]}),o}var f=c(),u="Sentry Logger ",p=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=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this._enabled&&s(function(){f.console.log(u+"[Log]: "+t.join(" "))})},t.prototype.warn=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this._enabled&&s(function(){f.console.warn(u+"[Warn]: "+t.join(" "))})},t.prototype.error=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];this._enabled&&s(function(){f.console.error(u+"[Error]: "+t.join(" "))})},t}();f.__SENTRY__=f.__SENTRY__||{};var l,_=f.__SENTRY__.logger||(f.__SENTRY__.logger=new p);function y(t,r){return e=r,"[object RegExp]"===Object.prototype.toString.call(e)?r.test(t):"string"==typeof r&&-1!==t.indexOf(r);var e}function h(t,r,e){if(r in t){var n=t[r],o=e(n);if("function"==typeof o)try{o.prototype=o.prototype||{},Object.defineProperties(o,{__sentry__:{enumerable:!1,value:!0},__sentry_original__:{enumerable:!1,value:n},__sentry_wrapped__:{enumerable:!1,value:o}})}catch(t){}t[r]=o}}function d(){if(!function(){if(!("fetch"in c()))return!1;try{return new Headers,new Request(""),new Response,!0}catch(t){return!1}}())return!1;var t=function(t){return-1!==t.toString().indexOf("native")},r=c(),e=null,n=r.document;if(n){var o=n.createElement("iframe");o.hidden=!0;try{n.head.appendChild(o),o.contentWindow&&o.contentWindow.fetch&&(e=t(o.contentWindow.fetch)),n.head.removeChild(o)}catch(t){_.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ",t)}}return null===e&&(e=t(r.fetch)),e}!function(t){t.PENDING="PENDING",t.RESOLVED="RESOLVED",t.REJECTED="REJECTED"}(l||(l={}));var g=function(){function t(r){if(void 0===r&&(r={}),this._options=r,this.name=t.id,!Array.isArray(r.tracingOrigins)||0===r.tracingOrigins.length){var e=["localhost",/^\//];_.warn("Sentry: You need to define `tracingOrigins` in the options. Set an array of urls or patterns to trace."),_.warn("Sentry: We added a reasonable default for you: "+e),r.tracingOrigins=e}}return t.prototype.setupOnce=function(t,r){!1!==this._options.traceXHR&&this._traceXHR(r),!1!==this._options.traceFetch&&this._traceFetch(r)},t.prototype._traceXHR=function(r){if("XMLHttpRequest"in c()){var e=XMLHttpRequest.prototype;h(e,"open",function(e){return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];var i=r().getIntegration(t);return i&&(i._xhrUrl=n[1]),e.apply(this,n)}}),h(e,"send",function(e){return function(){for(var n=this,o=[],i=0;i<arguments.length;i++)o[i]=arguments[i];var a=r().getIntegration(t);if(a&&a._xhrUrl&&a._options.tracingOrigins){var c=a._xhrUrl,s=r().traceHeaders(),f=a._options.tracingOrigins.some(function(t){return y(c,t)});y(c,"sentry_key")&&(f=!1),f&&this.setRequestHeader&&Object.keys(s).forEach(function(t){n.setRequestHeader(t,s[t])})}return e.apply(this,o)}})}},t.prototype._traceFetch=function(r){d()&&h(c(),"fetch",function(e){return function(){for(var i=[],a=0;a<arguments.length;a++)i[a]=arguments[a];var s=r(),f=s.getIntegration(t);if(f&&f._options.tracingOrigins){var u=i[0],p=i[1]=i[1]||{},l=!1;f._options.tracingOrigins.forEach(function(t){l||(l=y(u,t))}),y(u,"sentry_key")&&(l=!1),l&&(p.headers?Array.isArray(p.headers)?p.headers=function(){for(var t=[],r=0;r<arguments.length;r++)t=t.concat(o(arguments[r]));return t}(p.headers,Object.entries(s.traceHeaders())):p.headers=n({},p.headers,s.traceHeaders()):p.headers=s.traceHeaders())}return e.apply(c(),i)}})},t.id="Tracing",t}();for(var v in r.Tracing=g,t.Sentry=t.Sentry||{},t.Sentry.Integrations=t.Sentry.Integrations||{},r)Object.prototype.hasOwnProperty.call(r,v)&&(t.Sentry.Integrations[v]=r[v])}(window); | ||
//# sourceMappingURL=tracing.min.js.map |
@@ -6,2 +6,3 @@ export { Angular } from './angular'; | ||
export { Ember } from './ember'; | ||
export { Express } from './express'; | ||
export { ExtraErrorData } from './extraerrordata'; | ||
@@ -8,0 +9,0 @@ export { ReportingObserver } from './reportingobserver'; |
@@ -12,2 +12,4 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.Ember = ember_1.Ember; | ||
var express_1 = require("./express"); | ||
exports.Express = express_1.Express; | ||
var extraerrordata_1 = require("./extraerrordata"); | ||
@@ -14,0 +16,0 @@ exports.ExtraErrorData = extraerrordata_1.ExtraErrorData; |
@@ -7,3 +7,2 @@ import { EventProcessor, Hub, Integration } from '@sentry/types'; | ||
traceXHR?: boolean; | ||
autoStartOnDomReady?: boolean; | ||
} | ||
@@ -39,8 +38,2 @@ /** | ||
/** | ||
* Starts a new trace | ||
* @param hub The hub to start the trace on | ||
* @param transaction Optional transaction | ||
*/ | ||
static startTrace(hub: Hub, transaction?: string): void; | ||
/** | ||
* JSDoc | ||
@@ -47,0 +40,0 @@ */ |
@@ -37,25 +37,4 @@ Object.defineProperty(exports, "__esModule", { value: true }); | ||
} | ||
if (this._options.autoStartOnDomReady !== false) { | ||
utils_1.getGlobalObject().addEventListener('DOMContentLoaded', function () { | ||
Tracing.startTrace(getCurrentHub(), utils_1.getGlobalObject().location.href); | ||
}); | ||
utils_1.getGlobalObject().document.onreadystatechange = function () { | ||
if (document.readyState === 'complete') { | ||
Tracing.startTrace(getCurrentHub(), utils_1.getGlobalObject().location.href); | ||
} | ||
}; | ||
} | ||
}; | ||
/** | ||
* Starts a new trace | ||
* @param hub The hub to start the trace on | ||
* @param transaction Optional transaction | ||
*/ | ||
Tracing.startTrace = function (hub, transaction) { | ||
hub.configureScope(function (scope) { | ||
scope.startSpan(); | ||
scope.setTransaction(transaction); | ||
}); | ||
}; | ||
/** | ||
* JSDoc | ||
@@ -99,2 +78,7 @@ */ | ||
}); | ||
if (utils_1.isMatchingPattern(url_1, 'sentry_key')) { | ||
// If sentry_key is in the url, it's an internal store request to sentry | ||
// we do not want to add the trace header to store requests | ||
isWhitelisted = false; | ||
} | ||
if (isWhitelisted && this.setRequestHeader) { | ||
@@ -126,23 +110,29 @@ Object.keys(headers_1).forEach(function (key) { | ||
// @ts-ignore | ||
var self = getCurrentHub().getIntegration(Tracing); | ||
var hub = getCurrentHub(); | ||
var self = hub.getIntegration(Tracing); | ||
if (self && self._options.tracingOrigins) { | ||
var url_2 = args[0]; | ||
var options = (args[1] = args[1] || {}); | ||
var whiteListed_1 = false; | ||
var isWhitelisted_1 = false; | ||
self._options.tracingOrigins.forEach(function (whiteListUrl) { | ||
if (!whiteListed_1) { | ||
whiteListed_1 = utils_1.isMatchingPattern(url_2, whiteListUrl); | ||
if (!isWhitelisted_1) { | ||
isWhitelisted_1 = utils_1.isMatchingPattern(url_2, whiteListUrl); | ||
} | ||
}); | ||
if (whiteListed_1) { | ||
if (utils_1.isMatchingPattern(url_2, 'sentry_key')) { | ||
// If sentry_key is in the url, it's an internal store request to sentry | ||
// we do not want to add the trace header to store requests | ||
isWhitelisted_1 = false; | ||
} | ||
if (isWhitelisted_1) { | ||
if (options.headers) { | ||
if (Array.isArray(options.headers)) { | ||
options.headers = tslib_1.__spread(options.headers, Object.entries(getCurrentHub().traceHeaders())); | ||
options.headers = tslib_1.__spread(options.headers, Object.entries(hub.traceHeaders())); | ||
} | ||
else { | ||
options.headers = tslib_1.__assign({}, options.headers, getCurrentHub().traceHeaders()); | ||
options.headers = tslib_1.__assign({}, options.headers, hub.traceHeaders()); | ||
} | ||
} | ||
else { | ||
options.headers = getCurrentHub().traceHeaders(); | ||
options.headers = hub.traceHeaders(); | ||
} | ||
@@ -149,0 +139,0 @@ } |
@@ -6,2 +6,3 @@ export { Angular } from './angular'; | ||
export { Ember } from './ember'; | ||
export { Express } from './express'; | ||
export { ExtraErrorData } from './extraerrordata'; | ||
@@ -8,0 +9,0 @@ export { ReportingObserver } from './reportingobserver'; |
@@ -6,2 +6,3 @@ export { Angular } from './angular'; | ||
export { Ember } from './ember'; | ||
export { Express } from './express'; | ||
export { ExtraErrorData } from './extraerrordata'; | ||
@@ -8,0 +9,0 @@ export { ReportingObserver } from './reportingobserver'; |
@@ -7,3 +7,2 @@ import { EventProcessor, Hub, Integration } from '@sentry/types'; | ||
traceXHR?: boolean; | ||
autoStartOnDomReady?: boolean; | ||
} | ||
@@ -39,8 +38,2 @@ /** | ||
/** | ||
* Starts a new trace | ||
* @param hub The hub to start the trace on | ||
* @param transaction Optional transaction | ||
*/ | ||
static startTrace(hub: Hub, transaction?: string): void; | ||
/** | ||
* JSDoc | ||
@@ -47,0 +40,0 @@ */ |
@@ -36,25 +36,4 @@ import * as tslib_1 from "tslib"; | ||
} | ||
if (this._options.autoStartOnDomReady !== false) { | ||
getGlobalObject().addEventListener('DOMContentLoaded', function () { | ||
Tracing.startTrace(getCurrentHub(), getGlobalObject().location.href); | ||
}); | ||
getGlobalObject().document.onreadystatechange = function () { | ||
if (document.readyState === 'complete') { | ||
Tracing.startTrace(getCurrentHub(), getGlobalObject().location.href); | ||
} | ||
}; | ||
} | ||
}; | ||
/** | ||
* Starts a new trace | ||
* @param hub The hub to start the trace on | ||
* @param transaction Optional transaction | ||
*/ | ||
Tracing.startTrace = function (hub, transaction) { | ||
hub.configureScope(function (scope) { | ||
scope.startSpan(); | ||
scope.setTransaction(transaction); | ||
}); | ||
}; | ||
/** | ||
* JSDoc | ||
@@ -98,2 +77,7 @@ */ | ||
}); | ||
if (isMatchingPattern(url_1, 'sentry_key')) { | ||
// If sentry_key is in the url, it's an internal store request to sentry | ||
// we do not want to add the trace header to store requests | ||
isWhitelisted = false; | ||
} | ||
if (isWhitelisted && this.setRequestHeader) { | ||
@@ -125,23 +109,29 @@ Object.keys(headers_1).forEach(function (key) { | ||
// @ts-ignore | ||
var self = getCurrentHub().getIntegration(Tracing); | ||
var hub = getCurrentHub(); | ||
var self = hub.getIntegration(Tracing); | ||
if (self && self._options.tracingOrigins) { | ||
var url_2 = args[0]; | ||
var options = (args[1] = args[1] || {}); | ||
var whiteListed_1 = false; | ||
var isWhitelisted_1 = false; | ||
self._options.tracingOrigins.forEach(function (whiteListUrl) { | ||
if (!whiteListed_1) { | ||
whiteListed_1 = isMatchingPattern(url_2, whiteListUrl); | ||
if (!isWhitelisted_1) { | ||
isWhitelisted_1 = isMatchingPattern(url_2, whiteListUrl); | ||
} | ||
}); | ||
if (whiteListed_1) { | ||
if (isMatchingPattern(url_2, 'sentry_key')) { | ||
// If sentry_key is in the url, it's an internal store request to sentry | ||
// we do not want to add the trace header to store requests | ||
isWhitelisted_1 = false; | ||
} | ||
if (isWhitelisted_1) { | ||
if (options.headers) { | ||
if (Array.isArray(options.headers)) { | ||
options.headers = tslib_1.__spread(options.headers, Object.entries(getCurrentHub().traceHeaders())); | ||
options.headers = tslib_1.__spread(options.headers, Object.entries(hub.traceHeaders())); | ||
} | ||
else { | ||
options.headers = tslib_1.__assign({}, options.headers, getCurrentHub().traceHeaders()); | ||
options.headers = tslib_1.__assign({}, options.headers, hub.traceHeaders()); | ||
} | ||
} | ||
else { | ||
options.headers = getCurrentHub().traceHeaders(); | ||
options.headers = hub.traceHeaders(); | ||
} | ||
@@ -148,0 +138,0 @@ } |
{ | ||
"name": "@sentry/integrations", | ||
"version": "5.7.1", | ||
"version": "5.8.0-beta.0", | ||
"description": "Pluggable integrations that can be used to enchance JS SDKs", | ||
@@ -19,7 +19,8 @@ "repository": "git://github.com/getsentry/sentry-javascript.git", | ||
"dependencies": { | ||
"@sentry/types": "5.7.1", | ||
"@sentry/utils": "5.7.1", | ||
"@sentry/types": "5.8.0-beta.0", | ||
"@sentry/utils": "5.8.0-beta.0", | ||
"tslib": "^1.9.3" | ||
}, | ||
"devDependencies": { | ||
"@types/express": "^4.17.1", | ||
"chai": "^4.1.2", | ||
@@ -26,0 +27,0 @@ "jest": "^24.7.1", |
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
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
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
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
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
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
1282068
139
7988
14
2
+ Added@sentry/types@5.8.0-beta.0(transitive)
+ Added@sentry/utils@5.8.0-beta.0(transitive)
- Removed@sentry/types@5.7.1(transitive)
- Removed@sentry/utils@5.7.1(transitive)
Updated@sentry/types@5.8.0-beta.0
Updated@sentry/utils@5.8.0-beta.0