@sentry/node 8.1.0 → 8.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/cjs/integrations/anr/index.js +1 -1
  2. package/cjs/integrations/anr/index.js.map +1 -1
  3. package/cjs/integrations/http.js +2 -6
  4. package/cjs/integrations/http.js.map +1 -1
  5. package/cjs/integrations/local-variables/local-variables-async.js +1 -1
  6. package/cjs/integrations/tracing/nest.js.map +1 -1
  7. package/cjs/integrations/tracing/redis.js +70 -2
  8. package/cjs/integrations/tracing/redis.js.map +1 -1
  9. package/cjs/sdk/init.js +14 -1
  10. package/cjs/sdk/init.js.map +1 -1
  11. package/esm/integrations/anr/index.js +1 -1
  12. package/esm/integrations/anr/index.js.map +1 -1
  13. package/esm/integrations/anr/worker-script.js +2 -2
  14. package/esm/integrations/http.js +3 -7
  15. package/esm/integrations/http.js.map +1 -1
  16. package/esm/integrations/local-variables/local-variables-async.js +1 -1
  17. package/esm/integrations/local-variables/worker-script.js +1 -1
  18. package/esm/integrations/tracing/nest.js.map +1 -1
  19. package/esm/integrations/tracing/redis.js +68 -3
  20. package/esm/integrations/tracing/redis.js.map +1 -1
  21. package/esm/sdk/init.js +14 -1
  22. package/esm/sdk/init.js.map +1 -1
  23. package/package.json +5 -5
  24. package/types/integrations/http.d.ts.map +1 -1
  25. package/types/integrations/tracing/nest.d.ts +2 -2
  26. package/types/integrations/tracing/nest.d.ts.map +1 -1
  27. package/types/integrations/tracing/redis.d.ts +5 -1
  28. package/types/integrations/tracing/redis.d.ts.map +1 -1
  29. package/types/sdk/init.d.ts.map +1 -1
  30. package/types-ts3.8/integrations/tracing/nest.d.ts +2 -2
  31. package/types-ts3.8/integrations/tracing/redis.d.ts +5 -1
@@ -1,2 +1,2 @@
1
- /*! @sentry/node 8.1.0 (d31d7a0) | https://github.com/getsentry/sentry-javascript */
2
- import{Session as t}from"inspector";import{parentPort as e,workerData as n}from"worker_threads";import{posix as r,sep as o}from"path";import*as s from"node:http";import*as i from"node:https";import{Readable as c}from"stream";import{createGzip as u}from"zlib";import*as a from"net";import*as f from"tls";import*as h from"http";const p=Object.prototype.toString;function l(t,e){return p.call(t)===`[object ${e}]`}function d(t){return l(t,"Object")}function m(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function g(t,e){try{return t instanceof e}catch(t){return!1}}const y=globalThis;function b(t,e,n){const r=n||y,o=r.__SENTRY__=r.__SENTRY__||{};return o[t]||(o[t]=e())}const v=y,_=80;function w(t,e){const n=t,r=[];let o,s,i,c,u;if(!n||!n.tagName)return"";if(v.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const a=e&&e.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(a&&a.length)a.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else if(n.id&&r.push(`#${n.id}`),o=n.className,o&&l(o,"String"))for(s=o.split(/\s+/),u=0;u<s.length;u++)r.push(`.${s[u]}`);const f=["aria-label","type","name","title","alt"];for(u=0;u<f.length;u++)i=f[u],c=n.getAttribute(i),c&&r.push(`[${i}="${c}"]`);return r.join("")}const S="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,$=["debug","info","warn","error","log","assert","trace"],E={};function x(t){if(!("console"in y))return t();const e=y.console,n={},r=Object.keys(E);r.forEach((t=>{const r=E[t];n[t]=e[t],e[t]=r}));try{return t()}finally{r.forEach((t=>{e[t]=n[t]}))}}const N=function(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return S?$.forEach((n=>{e[n]=(...e)=>{t&&x((()=>{y.console[n](`Sentry Logger [${n}]:`,...e)}))}})):$.forEach((t=>{e[t]=()=>{}})),e}();function k(t,e=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:c,publicKey:u}=t;return`${c}://${u}${e&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${i}`}class C extends Error{constructor(t,e="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=e}}function D(t){if(function(t){switch(p.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return g(t,Error)}}(t))return{message:t.message,name:t.name,stack:t.stack,...O(t)};if(e=t,"undefined"!=typeof Event&&g(e,Event)){const e={type:t.type,target:T(t.target),currentTarget:T(t.currentTarget),...O(t)};return"undefined"!=typeof CustomEvent&&g(t,CustomEvent)&&(e.detail=t.detail),e}return t;var e}function T(t){try{return e=t,"undefined"!=typeof Element&&g(e,Element)?function(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,o=[];let s=0,i=0;const c=" > ",u=c.length;let a;const f=Array.isArray(e)?e:e.keyAttrs,h=!Array.isArray(e)&&e.maxStringLength||_;for(;n&&s++<r&&(a=w(n,f),!("html"===a||s>1&&i+o.length*u+a.length>=h));)o.push(a),i+=a.length,n=n.parentNode;return o.reverse().join(c)}catch(t){return"<unknown>"}}(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}var e}function O(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function j(t){return R(t,new Map)}function R(t,e){if(function(t){if(!d(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||"Object"===e}catch(t){return!0}}(t)){const n=e.get(t);if(void 0!==n)return n;const r={};e.set(t,r);for(const n of Object.keys(t))void 0!==t[n]&&(r[n]=R(t[n],e));return r}if(Array.isArray(t)){const n=e.get(t);if(void 0!==n)return n;const r=[];return e.set(t,r),t.forEach((t=>{r.push(R(t,e))})),r}return t}const A=50,I="?",P=/captureMessage|captureException/;const U="<anonymous>";function M(){const t=y,e=t.crypto||t.msCrypto;let n=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{const t=new Uint8Array(1);return e.getRandomValues(t),t[0]})}catch(t){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(15&n())>>t/4).toString(16)))}function L(t,e=100,n=1/0){try{return B("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function B(t,e,n=1/0,r=1/0,o=function(){const t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t<e.length;t++)if(e[t]===n)return!0;return e.push(n),!1},function(n){if(t)e.delete(n);else for(let t=0;t<e.length;t++)if(e[t]===n){e.splice(t,1);break}}]}()){const[s,i]=o;if(null==e||["number","boolean","string"].includes(typeof e)&&!Number.isNaN(e))return e;const c=function(t,e){try{if("domain"===t&&e&&"object"==typeof e&&e.t)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&e===global)return"[Global]";if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if("object"==typeof(n=e)&&null!==n&&(n.__isVue||n.o))return"[VueViewModel]";if(function(t){return d(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}(e))return"[SyntheticEvent]";if("number"==typeof e&&e!=e)return"[NaN]";if("function"==typeof e)return`[Function: ${function(t){try{return t&&"function"==typeof t&&t.name||U}catch(t){return U}}(e)}]`;if("symbol"==typeof e)return`[${String(e)}]`;if("bigint"==typeof e)return`[BigInt: ${String(e)}]`;const r=function(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}(e);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(t){return`**non-serializable** (${t})`}var n}(t,e);if(!c.startsWith("[object "))return c;if(e.__sentry_skip_normalization__)return e;const u="number"==typeof e.__sentry_override_normalization_depth__?e.__sentry_override_normalization_depth__:n;if(0===u)return c.replace("object ","");if(s(e))return"[Circular ~]";const a=e;if(a&&"function"==typeof a.toJSON)try{return B("",a.toJSON(),u-1,r,o)}catch(t){}const f=Array.isArray(e)?[]:{};let h=0;const p=D(e);for(const t in p){if(!Object.prototype.hasOwnProperty.call(p,t))continue;if(h>=r){f[t]="[MaxProperties ~]";break}const e=p[t];f[t]=B(t,e,u-1,r,o),h++}return i(e),f}function G(t,e){const n=e.replace(/\\/g,"/").replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");let r=t;try{r=decodeURI(t)}catch(t){}return r.replace(/\\/g,"/").replace(/webpack:\/?/g,"").replace(new RegExp(`(file://)?/*${n}/*`,"ig"),"app:///")}const J=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function z(t){const e=function(t){const e=t.length>1024?`<truncated>${t.slice(-1024)}`:t,n=J.exec(e);return n?n.slice(1):[]}(t),n=e[0];let r=e[1];return n||r?(r&&(r=r.slice(0,r.length-1)),n+r):"."}var H;function W(t){return new Y((e=>{e(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(H||(H={}));class Y{constructor(t){Y.prototype.__init.call(this),Y.prototype.__init2.call(this),Y.prototype.__init3.call(this),Y.prototype.__init4.call(this),this.i=H.PENDING,this.u=[];try{t(this.h,this.p)}catch(t){this.p(t)}}then(t,e){return new Y(((n,r)=>{this.u.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this.l()}))}catch(t){return this.then((t=>t),t)}finally(t){return new Y(((e,n)=>{let r,o;return this.then((e=>{o=!1,r=e,t&&t()}),(e=>{o=!0,r=e,t&&t()})).then((()=>{o?n(r):e(r)}))}))}__init(){this.h=t=>{this.m(H.RESOLVED,t)}}__init2(){this.p=t=>{this.m(H.REJECTED,t)}}__init3(){this.m=(t,e)=>{this.i===H.PENDING&&(m(e)?e.then(this.h,this.p):(this.i=t,this.v=e,this.l()))}}__init4(){this.l=()=>{if(this.i===H.PENDING)return;const t=this.u.slice();this.u=[],t.forEach((t=>{t[0]||(this.i===H.RESOLVED&&t[1](this.v),this.i===H.REJECTED&&t[2](this.v),t[0]=!0)}))}}}function q(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]}return{$:e,add:function(r){if(!(void 0===t||e.length<t))return o=new C("Not adding Promise because buffer limit was reached."),new Y(((t,e)=>{e(o)}));var o;const s=r();return-1===e.indexOf(s)&&e.push(s),s.then((()=>n(s))).then(null,(()=>n(s).then(null,(()=>{})))),s},drain:function(t){return new Y(((n,r)=>{let o=e.length;if(!o)return n(!0);const s=setTimeout((()=>{t&&t>0&&n(!1)}),t);e.forEach((t=>{W(t).then((()=>{--o||(clearTimeout(s),n(!0))}),r)}))}))}}}function F(t,e=!1){return!(e||t&&!t.startsWith("/")&&!t.match(/^[A-Z]:/)&&!t.startsWith(".")&&!t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&void 0!==t&&!t.includes("node_modules/")}const K=1e3;function V(){return Date.now()/K}const Z=function(){const{performance:t}=y;if(!t||!t.now)return V;const e=Date.now()-t.now(),n=null==t.timeOrigin?e:t.timeOrigin;return()=>(n+t.now())/K}();function Q(t,e=[]){return[t,e]}function X(t,e){const n=t[1];for(const t of n){if(e(t,t[0].type))return!0}return!1}function tt(t){return y.__SENTRY__&&y.__SENTRY__.encodePolyfill?y.__SENTRY__.encodePolyfill(t):(new TextEncoder).encode(t)}function et(t){const[e,n]=t;let r=JSON.stringify(e);function o(t){"string"==typeof r?r="string"==typeof t?r+t:[tt(r),t]:r.push("string"==typeof t?tt(t):t)}for(const t of n){const[e,n]=t;if(o(`\n${JSON.stringify(e)}\n`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let t;try{t=JSON.stringify(n)}catch(e){t=JSON.stringify(L(n))}o(t)}}return"string"==typeof r?r:function(t){const e=t.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(r)}(()=>{const{performance:t}=y;if(!t||!t.now)return;const e=36e5,n=t.now(),r=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,s=o<e,i=t.timing&&t.timing.navigationStart,c="number"==typeof i?Math.abs(i+n-r):e;(s||c<e)&&(o<=c&&t.timeOrigin)})();const nt={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function rt(t){return nt[t]}function ot(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}const st=6e4;function it(t,{statusCode:e,headers:n},r=Date.now()){const o={...t},s=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(s)for(const t of s.trim().split(",")){const[e,n,,,s]=t.split(":",5),i=parseInt(e,10),c=1e3*(isNaN(i)?60:i);if(n)for(const t of n.split(";"))"metric_bucket"===t&&s&&!s.split(";").includes("custom")||(o[t]=r+c);else o.all=r+c}else i?o.all=r+function(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?st:r-e}(i,r):429===e&&(o.all=r+6e4);return o}const ct="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function ut(){return at(y),y}function at(t){return t.__SENTRY__||(t.__SENTRY__={extensions:{}}),t.__SENTRY__}function ft(t){const e=Z(),n={sid:M(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return j({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&ht(n,t),n}function ht(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Z(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:M()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}const pt="_sentrySpan";function lt(t,e){e?function(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch(n){S&&N.log(`Failed to add non-enumerable property "${e}" to object`,t)}}(t,pt,e):delete t[pt]}function dt(t){return t[pt]}class mt{constructor(){this._=!1,this.S=[],this.N=[],this.k=[],this.C=[],this.D={},this.T={},this.O={},this.j={},this.R={},this.A=gt()}clone(){const t=new mt;return t.k=[...this.k],t.T={...this.T},t.O={...this.O},t.j={...this.j},t.D=this.D,t.I=this.I,t.P=this.P,t.U=this.U,t.M=this.M,t.N=[...this.N],t.L=this.L,t.C=[...this.C],t.R={...this.R},t.A={...this.A},t.B=this.B,t.G=this.G,lt(t,dt(this)),t}setClient(t){this.B=t}setLastEventId(t){this.G=t}getClient(){return this.B}lastEventId(){return this.G}addScopeListener(t){this.S.push(t)}addEventProcessor(t){return this.N.push(t),this}setUser(t){return this.D=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.P&&ht(this.P,{user:t}),this.J(),this}getUser(){return this.D}getRequestSession(){return this.L}setRequestSession(t){return this.L=t,this}setTags(t){return this.T={...this.T,...t},this.J(),this}setTag(t,e){return this.T={...this.T,[t]:e},this.J(),this}setExtras(t){return this.O={...this.O,...t},this.J(),this}setExtra(t,e){return this.O={...this.O,[t]:e},this.J(),this}setFingerprint(t){return this.M=t,this.J(),this}setLevel(t){return this.I=t,this.J(),this}setTransactionName(t){return this.U=t,this.J(),this}setContext(t,e){return null===e?delete this.j[t]:this.j[t]=e,this.J(),this}setSession(t){return t?this.P=t:delete this.P,this.J(),this}getSession(){return this.P}update(t){if(!t)return this;const e="function"==typeof t?t(this):t,[n,r]=e instanceof mt?[e.getScopeData(),e.getRequestSession()]:d(e)?[t,t.requestSession]:[],{tags:o,extra:s,user:i,contexts:c,level:u,fingerprint:a=[],propagationContext:f}=n||{};return this.T={...this.T,...o},this.O={...this.O,...s},this.j={...this.j,...c},i&&Object.keys(i).length&&(this.D=i),u&&(this.I=u),a.length&&(this.M=a),f&&(this.A=f),r&&(this.L=r),this}clear(){return this.k=[],this.T={},this.O={},this.D={},this.j={},this.I=void 0,this.U=void 0,this.M=void 0,this.L=void 0,this.P=void 0,lt(this,void 0),this.C=[],this.A=gt(),this.J(),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:V(),...t},o=this.k;return o.push(r),this.k=o.length>n?o.slice(-n):o,this.J(),this}getLastBreadcrumb(){return this.k[this.k.length-1]}clearBreadcrumbs(){return this.k=[],this.J(),this}addAttachment(t){return this.C.push(t),this}clearAttachments(){return this.C=[],this}getScopeData(){return{breadcrumbs:this.k,attachments:this.C,contexts:this.j,tags:this.T,extra:this.O,user:this.D,level:this.I,fingerprint:this.M||[],eventProcessors:this.N,propagationContext:this.A,sdkProcessingMetadata:this.R,transactionName:this.U,span:dt(this)}}setSDKProcessingMetadata(t){return this.R={...this.R,...t},this}setPropagationContext(t){return this.A=t,this}getPropagationContext(){return this.A}captureException(t,e){const n=e&&e.event_id?e.event_id:M();if(!this.B)return N.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this.B.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},this),n}captureMessage(t,e,n){const r=n&&n.event_id?n.event_id:M();if(!this.B)return N.warn("No client configured on scope - will not capture message!"),r;const o=new Error(t);return this.B.captureMessage(t,e,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:M();return this.B?(this.B.captureEvent(t,{...e,event_id:n},this),n):(N.warn("No client configured on scope - will not capture event!"),n)}J(){this._||(this._=!0,this.S.forEach((t=>{t(this)})),this._=!1)}}function gt(){return{traceId:M(),spanId:M().substring(16)}}function yt(){return $t(ut()).getCurrentScope().getClient()}class bt{constructor(t,e){let n,r;n=t||new mt,r=e||new mt,this.H=[{scope:n}],this.W=r}withScope(t){const e=this.Y();let n;try{n=t(e)}catch(t){throw this.q(),t}return m(n)?n.then((t=>(this.q(),t)),(t=>{throw this.q(),t})):(this.q(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.W}getStack(){return this.H}getStackTop(){return this.H[this.H.length-1]}Y(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}q(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}}function vt(){const t=at(ut());return t.hub||(t.hub=new bt(b("defaultCurrentScope",(()=>new mt)),b("defaultIsolationScope",(()=>new mt)))),t.hub}function _t(t){return vt().withScope(t)}function wt(t,e){const n=vt();return n.withScope((()=>(n.getStackTop().scope=t,e(t))))}function St(t){return vt().withScope((()=>t(vt().getIsolationScope())))}function $t(t){const e=at(t);return e.acs?e.acs:{withIsolationScope:St,withScope:_t,withSetScope:wt,withSetIsolationScope:(t,e)=>St(e),getCurrentScope:()=>vt().getScope(),getIsolationScope:()=>vt().getIsolationScope()}}const Et="sentry.source",xt="sentry.sample_rate",Nt="sentry.op",kt="sentry.origin",Ct=0,Dt=1,Tt="production",Ot="_frozenDsc";function jt(t){const e=yt();if(!e)return{};const n=function(t,e){const n=e.getOptions(),{publicKey:r}=e.getDsn()||{},o=j({environment:n.environment||Tt,release:n.release,public_key:r,trace_id:t});return e.emit("createDsc",o),o}(Ut(t).trace_id||"",e),r=Bt(t);if(!r)return n;const o=r[Ot];if(o)return o;const s=Ut(r),i=s.data||{},c=i[xt];null!=c&&(n.sample_rate=`${c}`);const u=i[Et];return u&&"url"!==u&&(n.transaction=s.description),n.sampled=String(function(t){const{traceFlags:e}=t.spanContext();return e===Rt}(r)),e.emit("createDsc",n),n}const Rt=1;function At(t){const{spanId:e,traceId:n}=t.spanContext(),{parent_span_id:r}=Ut(t);return j({parent_span_id:r,span_id:e,trace_id:n})}function It(t){return"number"==typeof t?Pt(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Pt(t.getTime()):Z()}function Pt(t){return t>9999999999?t/1e3:t}function Ut(t){if(function(t){return"function"==typeof t.getSpanJSON}(t))return t.getSpanJSON();try{const{spanId:e,traceId:n}=t.spanContext();if(function(t){const e=t;return!!(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status)}(t)){const{attributes:r,startTime:o,name:s,endTime:i,parentSpanId:c,status:u}=t;return j({span_id:e,trace_id:n,data:r,description:s,parent_span_id:c,start_timestamp:It(o),timestamp:It(i)||void 0,status:Mt(u),op:r[Nt],origin:r[kt],F:void 0})}return{span_id:e,trace_id:n}}catch(t){return{}}}function Mt(t){if(t&&t.code!==Ct)return t.code===Dt?"ok":t.message||"unknown_error"}const Lt="_sentryRootSpan";function Bt(t){return t[Lt]||t}function Gt(t,e,n,r){const o=ot(n),s=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,n&&n.sdk);const i=function(t,e,n,r){const o=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:k(r)},...o&&{trace:j({...o})}}}(t,o,r,e);delete t.sdkProcessingMetadata;return Q(i,[[{type:s},t]])}const Jt="__SENTRY_SUPPRESS_TRACING__";function zt(t){const e=$t(ut());return e.suppressTracing?e.suppressTracing(t):function(...t){const e=$t(ut());if(2===t.length){const[n,r]=t;return n?e.withSetScope(n,r):e.withScope(r)}return e.withScope(t[0])}((e=>(e.setSDKProcessingMetadata({[Jt]:!0}),t())))}function Ht(t,e){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=e;!function(t,e){const{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:c}=e,u=j(n);u&&Object.keys(u).length&&(t.extra={...u,...t.extra});const a=j(r);a&&Object.keys(a).length&&(t.tags={...a,...t.tags});const f=j(o);f&&Object.keys(f).length&&(t.user={...f,...t.user});const h=j(s);h&&Object.keys(h).length&&(t.contexts={...h,...t.contexts});i&&(t.level=i);c&&"transaction"!==t.type&&(t.transaction=c)}(t,e),r&&function(t,e){t.contexts={trace:At(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:jt(e),...t.sdkProcessingMetadata};const n=Bt(e),r=Ut(n).description;r&&!t.transaction&&"transaction"===t.type&&(t.transaction=r)}(t,r),function(t,e){t.fingerprint=t.fingerprint?function(t){return Array.isArray(t)?t:[t]}(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e));t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,n),function(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}(t,o),function(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}(t,s)}const Wt="7";function Yt(t,e){return n={sentry_key:t.publicKey,sentry_version:Wt,...e&&{sentry_client:`${e.name}/${e.version}`}},Object.keys(n).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`)).join("&");var n}const qt=64;function Ft(t,e,n=q(t.bufferSize||qt)){let r={};return{send:function(o){const s=[];if(X(o,((e,n)=>{const o=rt(n);if(function(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}(r,o)){const r=Kt(e,n);t.recordDroppedEvent("ratelimit_backoff",o,r)}else s.push(e)})),0===s.length)return W({});const i=Q(o[0],s),c=e=>{X(i,((n,r)=>{const o=Kt(n,r);t.recordDroppedEvent(e,rt(r),o)}))};return n.add((()=>e({body:et(i)}).then((t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&ct&&N.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=it(r,t),t)),(t=>{throw c("network_error"),t})))).then((t=>t),(t=>{if(t instanceof C)return ct&&N.error("Skipped sending event because buffer is full."),c("queue_overflow"),W({});throw t}))},flush:t=>n.drain(t)}}function Kt(t,e){if("event"===e||"transaction"===e)return Array.isArray(t)?t[1]:void 0}const Vt=Symbol("AgentBaseInternalState");class Zt extends h.Agent{[Vt];options;keepAlive;constructor(t){super(t),this[Vt]={}}isSecureEndpoint(t){if(t){if("boolean"==typeof t.secureEndpoint)return t.secureEndpoint;if("string"==typeof t.protocol)return"https:"===t.protocol}const{stack:e}=new Error;return"string"==typeof e&&e.split("\n").some((t=>-1!==t.indexOf("(https.js:")||-1!==t.indexOf("node:https:")))}createSocket(t,e,n){const r={...e,secureEndpoint:this.isSecureEndpoint(e)};Promise.resolve().then((()=>this.connect(t,r))).then((o=>{if(o instanceof h.Agent)return o.addRequest(t,r);this[Vt].currentSocket=o,super.createSocket(t,e,n)}),n)}createConnection(){const t=this[Vt].currentSocket;if(this[Vt].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[Vt].defaultPort??("https:"===this.protocol?443:80)}set defaultPort(t){this[Vt]&&(this[Vt].defaultPort=t)}get protocol(){return this[Vt].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[Vt]&&(this[Vt].protocol=t)}}function Qt(...t){N.log("[https-proxy-agent:parse-proxy-response]",...t)}function Xt(t){return new Promise(((e,n)=>{let r=0;const o=[];function s(){const c=t.read();c?function(c){o.push(c),r+=c.length;const u=Buffer.concat(o,r),a=u.indexOf("\r\n\r\n");if(-1===a)return Qt("have not received end of HTTP headers yet..."),void s();const f=u.slice(0,a).toString("ascii").split("\r\n"),h=f.shift();if(!h)return t.destroy(),n(new Error("No header received from proxy CONNECT response"));const p=h.split(" "),l=+p[1],d=p.slice(2).join(" "),m={};for(const e of f){if(!e)continue;const r=e.indexOf(":");if(-1===r)return t.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${e}"`));const o=e.slice(0,r).toLowerCase(),s=e.slice(r+1).trimStart(),i=m[o];"string"==typeof i?m[o]=[i,s]:Array.isArray(i)?i.push(s):m[o]=s}Qt("got proxy server response: %o %o",h,m),i(),e({connect:{statusCode:l,statusText:d,headers:m},buffered:u})}(c):t.once("readable",s)}function i(){t.removeListener("end",c),t.removeListener("error",u),t.removeListener("readable",s)}function c(){i(),Qt("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function u(t){i(),Qt("onerror %o",t),n(t)}t.on("error",u),t.on("end",c),s()}))}function te(...t){N.log("[https-proxy-agent]",...t)}class ee extends Zt{static protocols=["http","https"];proxy;proxyHeaders;connectOpts;constructor(t,e){super(e),this.options={},this.proxy="string"==typeof t?new URL(t):t,this.proxyHeaders=e?.headers??{},te("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),r=this.proxy.port?parseInt(this.proxy.port,10):"https:"===this.proxy.protocol?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...e?re(e,"headers"):null,host:n,port:r}}async connect(t,e){const{proxy:n}=this;if(!e.host)throw new TypeError('No "host" provided');let r;if("https:"===n.protocol){te("Creating `tls.Socket`: %o",this.connectOpts);const t=this.connectOpts.servername||this.connectOpts.host;r=f.connect({...this.connectOpts,servername:t&&a.isIP(t)?void 0:t})}else te("Creating `net.Socket`: %o",this.connectOpts),r=a.connect(this.connectOpts);const o="function"==typeof this.proxyHeaders?this.proxyHeaders():{...this.proxyHeaders},s=a.isIPv6(e.host)?`[${e.host}]`:e.host;let i=`CONNECT ${s}:${e.port} HTTP/1.1\r\n`;if(n.username||n.password){const t=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;o["Proxy-Authorization"]=`Basic ${Buffer.from(t).toString("base64")}`}o.Host=`${s}:${e.port}`,o["Proxy-Connection"]||(o["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(const t of Object.keys(o))i+=`${t}: ${o[t]}\r\n`;const c=Xt(r);r.write(`${i}\r\n`);const{connect:u,buffered:h}=await c;if(t.emit("proxyConnect",u),this.emit("proxyConnect",u,t),200===u.statusCode){if(t.once("socket",ne),e.secureEndpoint){te("Upgrading socket connection to TLS");const t=e.servername||e.host;return f.connect({...re(e,"host","path","port"),socket:r,servername:a.isIP(t)?void 0:t})}return r}r.destroy();const p=new a.Socket({writable:!1});return p.readable=!0,t.once("socket",(t=>{te("Replaying proxy buffer for failed request"),t.push(h),t.push(null)})),p}}function ne(t){t.resume()}function re(t,...e){const n={};let r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}const oe=32768;function se(t){return t.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}const ie=n;let ce,ue=!1;function ae(t){ie.debug&&console.log(`[ANR Worker] ${t}`)}var fe,he,pe;const le=function(t){let e;try{e=new URL(t.url)}catch(e){return x((()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.")})),Ft(t,(()=>Promise.resolve({})))}const n="https:"===e.protocol,r=function(t,e){const{no_proxy:n}=process.env;return n&&n.split(",").some((e=>t.host.endsWith(e)||t.hostname.endsWith(e)))?void 0:e}(e,t.proxy||(n?process.env.https_proxy:void 0)||process.env.http_proxy),o=n?i:s,a=void 0!==t.keepAlive&&t.keepAlive,f=r?new ee(r):new o.Agent({keepAlive:a,maxSockets:30,timeout:2e3});return zt((()=>{const e=function(t,e,n){const{hostname:r,pathname:o,port:s,protocol:i,search:a}=new URL(t.url);return function(f){return new Promise(((h,p)=>{let l=function(t){return new c({read(){this.push(t),this.push(null)}})}(f.body);const d={...t.headers};f.body.length>oe&&(d["content-encoding"]="gzip",l=l.pipe(u()));const m=e.request({method:"POST",agent:n,headers:d,hostname:r,path:`${o}${a}`,port:s,protocol:i,ca:t.caCerts},(t=>{t.on("data",(()=>{})),t.on("end",(()=>{})),t.setEncoding("utf8");const e=t.headers["retry-after"]??null,n=t.headers["x-sentry-rate-limits"]??null;h({statusCode:t.statusCode,headers:{"retry-after":e,"x-sentry-rate-limits":Array.isArray(n)?n[0]:n}})}));m.on("error",p),l.pipe(m)}))}}(t,t.httpModule??o,f);return Ft(t,e)}))}({url:(fe=ie.dsn,he=ie.tunnel,pe=ie.sdkMetadata.sdk,he||`${function(t){return`${function(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}(t)}${t.projectId}/envelope/`}(fe)}?${Yt(fe,pe)}`),recordDroppedEvent:()=>{}});async function de(){if(ce){ae("Sending abnormal session"),ht(ce,{status:"abnormal",abnormal_mechanism:"anr_foreground"});const t=function(t,e,n,r){const o=ot(n);return Q({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&e&&{dsn:k(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(ce,ie.dsn,ie.sdkMetadata,ie.tunnel);ae(JSON.stringify(t)),await le.send(t);try{e?.postMessage("session-ended")}catch(t){}}}function me(t){if(!t)return;const e=function(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(e[e.length-1].function||"")&&e.pop(),e.reverse(),P.test(e[e.length-1].function||"")&&(e.pop(),P.test(e[e.length-1].function||"")&&e.pop()),e.slice(0,A).map((t=>({...t,filename:t.filename||e[e.length-1].filename,function:t.function||I})))}(t);if(ie.appRootPath)for(const t of e)t.filename&&(t.filename=G(t.filename,ie.appRootPath));return e}async function ge(t,e){if(ue)return;ue=!0,await de(),ae("Sending event");const n={event_id:M(),contexts:ie.contexts,release:ie.release,environment:ie.environment,dist:ie.dist,platform:"node",level:"error",exception:{values:[{type:"ApplicationNotResponding",value:`Application Not Responding for at least ${ie.anrThreshold} ms`,stacktrace:{frames:me(t)},mechanism:{type:"ANR"}}]},tags:ie.staticTags};e&&function(t,e){if(Ht(t,e),!t.contexts?.trace){const{traceId:n,spanId:r,parentSpanId:o}=e.propagationContext;t.contexts={trace:{trace_id:n,span_id:r,parent_span_id:o},...t.contexts}}}(n,e);const r=Gt(n,ie.dsn,ie.sdkMetadata,ie.tunnel);ae(JSON.stringify(r)),await le.send(r),await le.flush(2e3),setTimeout((()=>{process.exit(0)}),5e3)}let ye;if(ae("Started"),ie.captureStackTrace){ae("Connecting to debugger");const e=new t;e.connectToMainThread(),ae("Connected to debugger");const n=new Map;e.on("Debugger.scriptParsed",(t=>{n.set(t.params.scriptId,t.params.url)})),e.on("Debugger.paused",(t=>{if("other"===t.params.reason)try{ae("Debugger paused");const s=[...t.params.callFrames],i=ie.appRootPath?function(t=(process.argv[1]?z(process.argv[1]):process.cwd()),e="\\"===o){const n=e?se(t):t;return t=>{if(!t)return;const o=e?se(t):t;let{dir:s,base:i,ext:c}=r.parse(o);".js"!==c&&".mjs"!==c&&".cjs"!==c||(i=i.slice(0,-1*c.length)),s||(s=".");const u=s.lastIndexOf("/node_modules");if(u>-1)return`${s.slice(u+14).replace(/\//g,".")}:${i}`;if(s.startsWith(n)){let t=s.slice(n.length+1).replace(/\//g,".");return t&&(t+=":"),t+=i,t}return i}}(ie.appRootPath):()=>{},c=s.map((t=>function(t,e,n){const r=e?e.replace(/^file:\/\//,""):void 0,o=t.location.columnNumber?t.location.columnNumber+1:void 0,s=t.location.lineNumber?t.location.lineNumber+1:void 0;return j({filename:r,module:n(r),function:t.functionName||I,colno:o,lineno:s,in_app:r?F(r):void 0})}(t,n.get(t.location.scriptId),i))),u=setTimeout((()=>{ge(c).then(null,(()=>{ae("Sending ANR event failed.")}))}),5e3);e.post("Runtime.evaluate",{expression:"global.__SENTRY_GET_SCOPES__();",silent:!0,returnByValue:!0},((t,n)=>{t&&ae(`Error executing script: '${t.message}'`),clearTimeout(u);const r=n&&n.result?n.result.value:void 0;e.post("Debugger.resume"),e.post("Debugger.disable"),ge(c,r).then(null,(()=>{ae("Sending ANR event failed.")}))}))}catch(t){throw e.post("Debugger.resume"),e.post("Debugger.disable"),t}})),ye=()=>{try{e.post("Debugger.enable",(()=>{e.post("Debugger.pause")}))}catch(t){}}}const{poll:be}=function(t,e,n,r){const o=t();let s=!1,i=!0;return setInterval((()=>{const t=o.getTimeMs();!1===s&&t>e+n&&(s=!0,i&&r()),t<e+n&&(s=!1)}),20),{poll:()=>{o.reset()},enabled:t=>{i=t}}}((function(){let t=process.hrtime();return{getTimeMs:()=>{const[e,n]=process.hrtime(t);return Math.floor(1e3*e+n/1e6)},reset:()=>{t=process.hrtime()}}}),ie.pollInterval,ie.anrThreshold,(function(){ae("Watchdog timeout"),ye?(ae("Pausing debugger to capture stack trace"),ye()):(ae("Capturing event without a stack trace"),ge().then(null,(()=>{ae("Sending ANR event failed on watchdog timeout.")})))}));e?.on("message",(t=>{t.session&&(ce=ft(t.session)),be()}));
1
+ /*! @sentry/node 8.2.1 (bb2f1bc) | https://github.com/getsentry/sentry-javascript */
2
+ import{Session as t}from"inspector";import{parentPort as e,workerData as n}from"worker_threads";import{posix as r,sep as o}from"path";import*as s from"node:http";import*as i from"node:https";import{Readable as c}from"stream";import{createGzip as u}from"zlib";import*as a from"net";import*as f from"tls";import*as h from"http";const p=Object.prototype.toString;function l(t,e){return p.call(t)===`[object ${e}]`}function d(t){return l(t,"Object")}function m(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function g(t,e){try{return t instanceof e}catch(t){return!1}}const y=globalThis;function b(t,e,n){const r=n||y,o=r.__SENTRY__=r.__SENTRY__||{};return o[t]||(o[t]=e())}const v=y,_=80;function w(t,e){const n=t,r=[];let o,s,i,c,u;if(!n||!n.tagName)return"";if(v.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const a=e&&e.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(a&&a.length)a.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else if(n.id&&r.push(`#${n.id}`),o=n.className,o&&l(o,"String"))for(s=o.split(/\s+/),u=0;u<s.length;u++)r.push(`.${s[u]}`);const f=["aria-label","type","name","title","alt"];for(u=0;u<f.length;u++)i=f[u],c=n.getAttribute(i),c&&r.push(`[${i}="${c}"]`);return r.join("")}const S="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,$=["debug","info","warn","error","log","assert","trace"],E={};function x(t){if(!("console"in y))return t();const e=y.console,n={},r=Object.keys(E);r.forEach((t=>{const r=E[t];n[t]=e[t],e[t]=r}));try{return t()}finally{r.forEach((t=>{e[t]=n[t]}))}}const N=function(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return S?$.forEach((n=>{e[n]=(...e)=>{t&&x((()=>{y.console[n](`Sentry Logger [${n}]:`,...e)}))}})):$.forEach((t=>{e[t]=()=>{}})),e}();function k(t,e=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:c,publicKey:u}=t;return`${c}://${u}${e&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${i}`}class C extends Error{constructor(t,e="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=e}}function D(t){if(function(t){switch(p.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return g(t,Error)}}(t))return{message:t.message,name:t.name,stack:t.stack,...O(t)};if(e=t,"undefined"!=typeof Event&&g(e,Event)){const e={type:t.type,target:T(t.target),currentTarget:T(t.currentTarget),...O(t)};return"undefined"!=typeof CustomEvent&&g(t,CustomEvent)&&(e.detail=t.detail),e}return t;var e}function T(t){try{return e=t,"undefined"!=typeof Element&&g(e,Element)?function(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,o=[];let s=0,i=0;const c=" > ",u=c.length;let a;const f=Array.isArray(e)?e:e.keyAttrs,h=!Array.isArray(e)&&e.maxStringLength||_;for(;n&&s++<r&&(a=w(n,f),!("html"===a||s>1&&i+o.length*u+a.length>=h));)o.push(a),i+=a.length,n=n.parentNode;return o.reverse().join(c)}catch(t){return"<unknown>"}}(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}var e}function O(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function j(t){return R(t,new Map)}function R(t,e){if(function(t){if(!d(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||"Object"===e}catch(t){return!0}}(t)){const n=e.get(t);if(void 0!==n)return n;const r={};e.set(t,r);for(const n of Object.keys(t))void 0!==t[n]&&(r[n]=R(t[n],e));return r}if(Array.isArray(t)){const n=e.get(t);if(void 0!==n)return n;const r=[];return e.set(t,r),t.forEach((t=>{r.push(R(t,e))})),r}return t}const A=50,I="?",P=/captureMessage|captureException/;const U="<anonymous>";const M=1e3;function L(){return Date.now()/M}const B=function(){const{performance:t}=y;if(!t||!t.now)return L;const e=Date.now()-t.now(),n=null==t.timeOrigin?e:t.timeOrigin;return()=>(n+t.now())/M}();function G(){const t=y,e=t.crypto||t.msCrypto;let n=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{const t=new Uint8Array(1);return e.getRandomValues(t),t[0]})}catch(t){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(15&n())>>t/4).toString(16)))}function J(t,e=100,n=1/0){try{return z("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function z(t,e,n=1/0,r=1/0,o=function(){const t="function"==typeof WeakSet,e=t?new WeakSet:[];return[function(n){if(t)return!!e.has(n)||(e.add(n),!1);for(let t=0;t<e.length;t++)if(e[t]===n)return!0;return e.push(n),!1},function(n){if(t)e.delete(n);else for(let t=0;t<e.length;t++)if(e[t]===n){e.splice(t,1);break}}]}()){const[s,i]=o;if(null==e||["number","boolean","string"].includes(typeof e)&&!Number.isNaN(e))return e;const c=function(t,e){try{if("domain"===t&&e&&"object"==typeof e&&e.t)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&e===global)return"[Global]";if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if("object"==typeof(n=e)&&null!==n&&(n.__isVue||n.o))return"[VueViewModel]";if(function(t){return d(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}(e))return"[SyntheticEvent]";if("number"==typeof e&&e!=e)return"[NaN]";if("function"==typeof e)return`[Function: ${function(t){try{return t&&"function"==typeof t&&t.name||U}catch(t){return U}}(e)}]`;if("symbol"==typeof e)return`[${String(e)}]`;if("bigint"==typeof e)return`[BigInt: ${String(e)}]`;const r=function(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}(e);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(t){return`**non-serializable** (${t})`}var n}(t,e);if(!c.startsWith("[object "))return c;if(e.__sentry_skip_normalization__)return e;const u="number"==typeof e.__sentry_override_normalization_depth__?e.__sentry_override_normalization_depth__:n;if(0===u)return c.replace("object ","");if(s(e))return"[Circular ~]";const a=e;if(a&&"function"==typeof a.toJSON)try{return z("",a.toJSON(),u-1,r,o)}catch(t){}const f=Array.isArray(e)?[]:{};let h=0;const p=D(e);for(const t in p){if(!Object.prototype.hasOwnProperty.call(p,t))continue;if(h>=r){f[t]="[MaxProperties ~]";break}const e=p[t];f[t]=z(t,e,u-1,r,o),h++}return i(e),f}function H(t,e){const n=e.replace(/\\/g,"/").replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");let r=t;try{r=decodeURI(t)}catch(t){}return r.replace(/\\/g,"/").replace(/webpack:\/?/g,"").replace(new RegExp(`(file://)?/*${n}/*`,"ig"),"app:///")}(()=>{const{performance:t}=y;if(!t||!t.now)return;const e=36e5,n=t.now(),r=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,s=o<e,i=t.timing&&t.timing.navigationStart,c="number"==typeof i?Math.abs(i+n-r):e;(s||c<e)&&(o<=c&&t.timeOrigin)})();const W=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Y(t){const e=function(t){const e=t.length>1024?`<truncated>${t.slice(-1024)}`:t,n=W.exec(e);return n?n.slice(1):[]}(t),n=e[0];let r=e[1];return n||r?(r&&(r=r.slice(0,r.length-1)),n+r):"."}var q;function F(t){return new K((e=>{e(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(q||(q={}));class K{constructor(t){K.prototype.__init.call(this),K.prototype.__init2.call(this),K.prototype.__init3.call(this),K.prototype.__init4.call(this),this.i=q.PENDING,this.u=[];try{t(this.h,this.p)}catch(t){this.p(t)}}then(t,e){return new K(((n,r)=>{this.u.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this.l()}))}catch(t){return this.then((t=>t),t)}finally(t){return new K(((e,n)=>{let r,o;return this.then((e=>{o=!1,r=e,t&&t()}),(e=>{o=!0,r=e,t&&t()})).then((()=>{o?n(r):e(r)}))}))}__init(){this.h=t=>{this.m(q.RESOLVED,t)}}__init2(){this.p=t=>{this.m(q.REJECTED,t)}}__init3(){this.m=(t,e)=>{this.i===q.PENDING&&(m(e)?e.then(this.h,this.p):(this.i=t,this.v=e,this.l()))}}__init4(){this.l=()=>{if(this.i===q.PENDING)return;const t=this.u.slice();this.u=[],t.forEach((t=>{t[0]||(this.i===q.RESOLVED&&t[1](this.v),this.i===q.REJECTED&&t[2](this.v),t[0]=!0)}))}}}function V(t){const e=[];function n(t){return e.splice(e.indexOf(t),1)[0]}return{$:e,add:function(r){if(!(void 0===t||e.length<t))return o=new C("Not adding Promise because buffer limit was reached."),new K(((t,e)=>{e(o)}));var o;const s=r();return-1===e.indexOf(s)&&e.push(s),s.then((()=>n(s))).then(null,(()=>n(s).then(null,(()=>{})))),s},drain:function(t){return new K(((n,r)=>{let o=e.length;if(!o)return n(!0);const s=setTimeout((()=>{t&&t>0&&n(!1)}),t);e.forEach((t=>{F(t).then((()=>{--o||(clearTimeout(s),n(!0))}),r)}))}))}}}function Z(t,e=!1){return!(e||t&&!t.startsWith("/")&&!t.match(/^[A-Z]:/)&&!t.startsWith(".")&&!t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&void 0!==t&&!t.includes("node_modules/")}function Q(t,e=[]){return[t,e]}function X(t,e){const n=t[1];for(const t of n){if(e(t,t[0].type))return!0}return!1}function tt(t){return y.__SENTRY__&&y.__SENTRY__.encodePolyfill?y.__SENTRY__.encodePolyfill(t):(new TextEncoder).encode(t)}function et(t){const[e,n]=t;let r=JSON.stringify(e);function o(t){"string"==typeof r?r="string"==typeof t?r+t:[tt(r),t]:r.push("string"==typeof t?tt(t):t)}for(const t of n){const[e,n]=t;if(o(`\n${JSON.stringify(e)}\n`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let t;try{t=JSON.stringify(n)}catch(e){t=JSON.stringify(J(n))}o(t)}}return"string"==typeof r?r:function(t){const e=t.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(r)}const nt={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function rt(t){return nt[t]}function ot(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}const st=6e4;function it(t,{statusCode:e,headers:n},r=Date.now()){const o={...t},s=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(s)for(const t of s.trim().split(",")){const[e,n,,,s]=t.split(":",5),i=parseInt(e,10),c=1e3*(isNaN(i)?60:i);if(n)for(const t of n.split(";"))"metric_bucket"===t&&s&&!s.split(";").includes("custom")||(o[t]=r+c);else o.all=r+c}else i?o.all=r+function(t,e=Date.now()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?st:r-e}(i,r):429===e&&(o.all=r+6e4);return o}const ct="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function ut(){return at(y),y}function at(t){return t.__SENTRY__||(t.__SENTRY__={extensions:{}}),t.__SENTRY__}function ft(t){const e=B(),n={sid:G(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return j({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&ht(n,t),n}function ht(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||B(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:G()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}const pt="_sentrySpan";function lt(t,e){e?function(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch(n){S&&N.log(`Failed to add non-enumerable property "${e}" to object`,t)}}(t,pt,e):delete t[pt]}function dt(t){return t[pt]}class mt{constructor(){this._=!1,this.S=[],this.N=[],this.k=[],this.C=[],this.D={},this.T={},this.O={},this.j={},this.R={},this.A=yt()}clone(){const t=new mt;return t.k=[...this.k],t.T={...this.T},t.O={...this.O},t.j={...this.j},t.D=this.D,t.I=this.I,t.P=this.P,t.U=this.U,t.M=this.M,t.N=[...this.N],t.L=this.L,t.C=[...this.C],t.R={...this.R},t.A={...this.A},t.B=this.B,t.G=this.G,lt(t,dt(this)),t}setClient(t){this.B=t}setLastEventId(t){this.G=t}getClient(){return this.B}lastEventId(){return this.G}addScopeListener(t){this.S.push(t)}addEventProcessor(t){return this.N.push(t),this}setUser(t){return this.D=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.P&&ht(this.P,{user:t}),this.J(),this}getUser(){return this.D}getRequestSession(){return this.L}setRequestSession(t){return this.L=t,this}setTags(t){return this.T={...this.T,...t},this.J(),this}setTag(t,e){return this.T={...this.T,[t]:e},this.J(),this}setExtras(t){return this.O={...this.O,...t},this.J(),this}setExtra(t,e){return this.O={...this.O,[t]:e},this.J(),this}setFingerprint(t){return this.M=t,this.J(),this}setLevel(t){return this.I=t,this.J(),this}setTransactionName(t){return this.U=t,this.J(),this}setContext(t,e){return null===e?delete this.j[t]:this.j[t]=e,this.J(),this}setSession(t){return t?this.P=t:delete this.P,this.J(),this}getSession(){return this.P}update(t){if(!t)return this;const e="function"==typeof t?t(this):t,[n,r]=e instanceof gt?[e.getScopeData(),e.getRequestSession()]:d(e)?[t,t.requestSession]:[],{tags:o,extra:s,user:i,contexts:c,level:u,fingerprint:a=[],propagationContext:f}=n||{};return this.T={...this.T,...o},this.O={...this.O,...s},this.j={...this.j,...c},i&&Object.keys(i).length&&(this.D=i),u&&(this.I=u),a.length&&(this.M=a),f&&(this.A=f),r&&(this.L=r),this}clear(){return this.k=[],this.T={},this.O={},this.D={},this.j={},this.I=void 0,this.U=void 0,this.M=void 0,this.L=void 0,this.P=void 0,lt(this,void 0),this.C=[],this.A=yt(),this.J(),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:L(),...t},o=this.k;return o.push(r),this.k=o.length>n?o.slice(-n):o,this.J(),this}getLastBreadcrumb(){return this.k[this.k.length-1]}clearBreadcrumbs(){return this.k=[],this.J(),this}addAttachment(t){return this.C.push(t),this}clearAttachments(){return this.C=[],this}getScopeData(){return{breadcrumbs:this.k,attachments:this.C,contexts:this.j,tags:this.T,extra:this.O,user:this.D,level:this.I,fingerprint:this.M||[],eventProcessors:this.N,propagationContext:this.A,sdkProcessingMetadata:this.R,transactionName:this.U,span:dt(this)}}setSDKProcessingMetadata(t){return this.R={...this.R,...t},this}setPropagationContext(t){return this.A=t,this}getPropagationContext(){return this.A}captureException(t,e){const n=e&&e.event_id?e.event_id:G();if(!this.B)return N.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this.B.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},this),n}captureMessage(t,e,n){const r=n&&n.event_id?n.event_id:G();if(!this.B)return N.warn("No client configured on scope - will not capture message!"),r;const o=new Error(t);return this.B.captureMessage(t,e,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:G();return this.B?(this.B.captureEvent(t,{...e,event_id:n},this),n):(N.warn("No client configured on scope - will not capture event!"),n)}J(){this._||(this._=!0,this.S.forEach((t=>{t(this)})),this._=!1)}}const gt=mt;function yt(){return{traceId:G(),spanId:G().substring(16)}}function bt(){return Et(ut()).getCurrentScope().getClient()}class vt{constructor(t,e){let n,r;n=t||new gt,r=e||new gt,this.H=[{scope:n}],this.W=r}withScope(t){const e=this.Y();let n;try{n=t(e)}catch(t){throw this.q(),t}return m(n)?n.then((t=>(this.q(),t)),(t=>{throw this.q(),t})):(this.q(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.W}getStack(){return this.H}getStackTop(){return this.H[this.H.length-1]}Y(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}q(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}}function _t(){const t=at(ut());return t.hub||(t.hub=new vt(b("defaultCurrentScope",(()=>new gt)),b("defaultIsolationScope",(()=>new gt)))),t.hub}function wt(t){return _t().withScope(t)}function St(t,e){const n=_t();return n.withScope((()=>(n.getStackTop().scope=t,e(t))))}function $t(t){return _t().withScope((()=>t(_t().getIsolationScope())))}function Et(t){const e=at(t);return e.acs?e.acs:{withIsolationScope:$t,withScope:wt,withSetScope:St,withSetIsolationScope:(t,e)=>$t(e),getCurrentScope:()=>_t().getScope(),getIsolationScope:()=>_t().getIsolationScope()}}const xt="sentry.source",Nt="sentry.sample_rate",kt="sentry.op",Ct="sentry.origin",Dt=0,Tt=1,Ot="production",jt="_frozenDsc";function Rt(t){const e=bt();if(!e)return{};const n=function(t,e){const n=e.getOptions(),{publicKey:r}=e.getDsn()||{},o=j({environment:n.environment||Ot,release:n.release,public_key:r,trace_id:t});return e.emit("createDsc",o),o}(Mt(t).trace_id||"",e),r=Gt(t);if(!r)return n;const o=r[jt];if(o)return o;const s=Mt(r),i=s.data||{},c=i[Nt];null!=c&&(n.sample_rate=`${c}`);const u=i[xt];return u&&"url"!==u&&(n.transaction=s.description),n.sampled=String(function(t){const{traceFlags:e}=t.spanContext();return e===At}(r)),e.emit("createDsc",n),n}const At=1;function It(t){const{spanId:e,traceId:n}=t.spanContext(),{parent_span_id:r}=Mt(t);return j({parent_span_id:r,span_id:e,trace_id:n})}function Pt(t){return"number"==typeof t?Ut(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Ut(t.getTime()):B()}function Ut(t){return t>9999999999?t/1e3:t}function Mt(t){if(function(t){return"function"==typeof t.getSpanJSON}(t))return t.getSpanJSON();try{const{spanId:e,traceId:n}=t.spanContext();if(function(t){const e=t;return!!(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status)}(t)){const{attributes:r,startTime:o,name:s,endTime:i,parentSpanId:c,status:u}=t;return j({span_id:e,trace_id:n,data:r,description:s,parent_span_id:c,start_timestamp:Pt(o),timestamp:Pt(i)||void 0,status:Lt(u),op:r[kt],origin:r[Ct],F:void 0})}return{span_id:e,trace_id:n}}catch(t){return{}}}function Lt(t){if(t&&t.code!==Dt)return t.code===Tt?"ok":t.message||"unknown_error"}const Bt="_sentryRootSpan";function Gt(t){return t[Bt]||t}function Jt(t,e,n,r){const o=ot(n),s=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){e&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||e.name,t.sdk.version=t.sdk.version||e.version,t.sdk.integrations=[...t.sdk.integrations||[],...e.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...e.packages||[]])}(t,n&&n.sdk);const i=function(t,e,n,r){const o=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:k(r)},...o&&{trace:j({...o})}}}(t,o,r,e);delete t.sdkProcessingMetadata;return Q(i,[[{type:s},t]])}const zt="__SENTRY_SUPPRESS_TRACING__";function Ht(t){const e=Et(ut());return e.suppressTracing?e.suppressTracing(t):function(...t){const e=Et(ut());if(2===t.length){const[n,r]=t;return n?e.withSetScope(n,r):e.withScope(r)}return e.withScope(t[0])}((e=>(e.setSDKProcessingMetadata({[zt]:!0}),t())))}function Wt(t,e){const{fingerprint:n,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=e;!function(t,e){const{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:c}=e,u=j(n);u&&Object.keys(u).length&&(t.extra={...u,...t.extra});const a=j(r);a&&Object.keys(a).length&&(t.tags={...a,...t.tags});const f=j(o);f&&Object.keys(f).length&&(t.user={...f,...t.user});const h=j(s);h&&Object.keys(h).length&&(t.contexts={...h,...t.contexts});i&&(t.level=i);c&&"transaction"!==t.type&&(t.transaction=c)}(t,e),r&&function(t,e){t.contexts={trace:It(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:Rt(e),...t.sdkProcessingMetadata};const n=Gt(e),r=Mt(n).description;r&&!t.transaction&&"transaction"===t.type&&(t.transaction=r)}(t,r),function(t,e){t.fingerprint=t.fingerprint?function(t){return Array.isArray(t)?t:[t]}(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e));t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,n),function(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}(t,o),function(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}(t,s)}const Yt="7";function qt(t,e){return n={sentry_key:t.publicKey,sentry_version:Yt,...e&&{sentry_client:`${e.name}/${e.version}`}},Object.keys(n).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`)).join("&");var n}const Ft=64;function Kt(t,e,n=V(t.bufferSize||Ft)){let r={};return{send:function(o){const s=[];if(X(o,((e,n)=>{const o=rt(n);if(function(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}(r,o)){const r=Vt(e,n);t.recordDroppedEvent("ratelimit_backoff",o,r)}else s.push(e)})),0===s.length)return F({});const i=Q(o[0],s),c=e=>{X(i,((n,r)=>{const o=Vt(n,r);t.recordDroppedEvent(e,rt(r),o)}))};return n.add((()=>e({body:et(i)}).then((t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&ct&&N.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=it(r,t),t)),(t=>{throw c("network_error"),t})))).then((t=>t),(t=>{if(t instanceof C)return ct&&N.error("Skipped sending event because buffer is full."),c("queue_overflow"),F({});throw t}))},flush:t=>n.drain(t)}}function Vt(t,e){if("event"===e||"transaction"===e)return Array.isArray(t)?t[1]:void 0}const Zt=Symbol("AgentBaseInternalState");class Qt extends h.Agent{[Zt];options;keepAlive;constructor(t){super(t),this[Zt]={}}isSecureEndpoint(t){if(t){if("boolean"==typeof t.secureEndpoint)return t.secureEndpoint;if("string"==typeof t.protocol)return"https:"===t.protocol}const{stack:e}=new Error;return"string"==typeof e&&e.split("\n").some((t=>-1!==t.indexOf("(https.js:")||-1!==t.indexOf("node:https:")))}createSocket(t,e,n){const r={...e,secureEndpoint:this.isSecureEndpoint(e)};Promise.resolve().then((()=>this.connect(t,r))).then((o=>{if(o instanceof h.Agent)return o.addRequest(t,r);this[Zt].currentSocket=o,super.createSocket(t,e,n)}),n)}createConnection(){const t=this[Zt].currentSocket;if(this[Zt].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[Zt].defaultPort??("https:"===this.protocol?443:80)}set defaultPort(t){this[Zt]&&(this[Zt].defaultPort=t)}get protocol(){return this[Zt].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[Zt]&&(this[Zt].protocol=t)}}function Xt(...t){N.log("[https-proxy-agent:parse-proxy-response]",...t)}function te(t){return new Promise(((e,n)=>{let r=0;const o=[];function s(){const c=t.read();c?function(c){o.push(c),r+=c.length;const u=Buffer.concat(o,r),a=u.indexOf("\r\n\r\n");if(-1===a)return Xt("have not received end of HTTP headers yet..."),void s();const f=u.slice(0,a).toString("ascii").split("\r\n"),h=f.shift();if(!h)return t.destroy(),n(new Error("No header received from proxy CONNECT response"));const p=h.split(" "),l=+p[1],d=p.slice(2).join(" "),m={};for(const e of f){if(!e)continue;const r=e.indexOf(":");if(-1===r)return t.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${e}"`));const o=e.slice(0,r).toLowerCase(),s=e.slice(r+1).trimStart(),i=m[o];"string"==typeof i?m[o]=[i,s]:Array.isArray(i)?i.push(s):m[o]=s}Xt("got proxy server response: %o %o",h,m),i(),e({connect:{statusCode:l,statusText:d,headers:m},buffered:u})}(c):t.once("readable",s)}function i(){t.removeListener("end",c),t.removeListener("error",u),t.removeListener("readable",s)}function c(){i(),Xt("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function u(t){i(),Xt("onerror %o",t),n(t)}t.on("error",u),t.on("end",c),s()}))}function ee(...t){N.log("[https-proxy-agent]",...t)}class ne extends Qt{static protocols=["http","https"];proxy;proxyHeaders;connectOpts;constructor(t,e){super(e),this.options={},this.proxy="string"==typeof t?new URL(t):t,this.proxyHeaders=e?.headers??{},ee("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),r=this.proxy.port?parseInt(this.proxy.port,10):"https:"===this.proxy.protocol?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...e?oe(e,"headers"):null,host:n,port:r}}async connect(t,e){const{proxy:n}=this;if(!e.host)throw new TypeError('No "host" provided');let r;if("https:"===n.protocol){ee("Creating `tls.Socket`: %o",this.connectOpts);const t=this.connectOpts.servername||this.connectOpts.host;r=f.connect({...this.connectOpts,servername:t&&a.isIP(t)?void 0:t})}else ee("Creating `net.Socket`: %o",this.connectOpts),r=a.connect(this.connectOpts);const o="function"==typeof this.proxyHeaders?this.proxyHeaders():{...this.proxyHeaders},s=a.isIPv6(e.host)?`[${e.host}]`:e.host;let i=`CONNECT ${s}:${e.port} HTTP/1.1\r\n`;if(n.username||n.password){const t=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;o["Proxy-Authorization"]=`Basic ${Buffer.from(t).toString("base64")}`}o.Host=`${s}:${e.port}`,o["Proxy-Connection"]||(o["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(const t of Object.keys(o))i+=`${t}: ${o[t]}\r\n`;const c=te(r);r.write(`${i}\r\n`);const{connect:u,buffered:h}=await c;if(t.emit("proxyConnect",u),this.emit("proxyConnect",u,t),200===u.statusCode){if(t.once("socket",re),e.secureEndpoint){ee("Upgrading socket connection to TLS");const t=e.servername||e.host;return f.connect({...oe(e,"host","path","port"),socket:r,servername:a.isIP(t)?void 0:t})}return r}r.destroy();const p=new a.Socket({writable:!1});return p.readable=!0,t.once("socket",(t=>{ee("Replaying proxy buffer for failed request"),t.push(h),t.push(null)})),p}}function re(t){t.resume()}function oe(t,...e){const n={};let r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}const se=32768;function ie(t){return t.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}const ce=n;let ue,ae=!1;function fe(t){ce.debug&&console.log(`[ANR Worker] ${t}`)}var he,pe,le;const de=function(t){let e;try{e=new URL(t.url)}catch(e){return x((()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.")})),Kt(t,(()=>Promise.resolve({})))}const n="https:"===e.protocol,r=function(t,e){const{no_proxy:n}=process.env;return n&&n.split(",").some((e=>t.host.endsWith(e)||t.hostname.endsWith(e)))?void 0:e}(e,t.proxy||(n?process.env.https_proxy:void 0)||process.env.http_proxy),o=n?i:s,a=void 0!==t.keepAlive&&t.keepAlive,f=r?new ne(r):new o.Agent({keepAlive:a,maxSockets:30,timeout:2e3});return Ht((()=>{const e=function(t,e,n){const{hostname:r,pathname:o,port:s,protocol:i,search:a}=new URL(t.url);return function(f){return new Promise(((h,p)=>{let l=function(t){return new c({read(){this.push(t),this.push(null)}})}(f.body);const d={...t.headers};f.body.length>se&&(d["content-encoding"]="gzip",l=l.pipe(u()));const m=e.request({method:"POST",agent:n,headers:d,hostname:r,path:`${o}${a}`,port:s,protocol:i,ca:t.caCerts},(t=>{t.on("data",(()=>{})),t.on("end",(()=>{})),t.setEncoding("utf8");const e=t.headers["retry-after"]??null,n=t.headers["x-sentry-rate-limits"]??null;h({statusCode:t.statusCode,headers:{"retry-after":e,"x-sentry-rate-limits":Array.isArray(n)?n[0]:n}})}));m.on("error",p),l.pipe(m)}))}}(t,t.httpModule??o,f);return Kt(t,e)}))}({url:(he=ce.dsn,pe=ce.tunnel,le=ce.sdkMetadata.sdk,pe||`${function(t){return`${function(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}(t)}${t.projectId}/envelope/`}(he)}?${qt(he,le)}`),recordDroppedEvent:()=>{}});async function me(){if(ue){fe("Sending abnormal session"),ht(ue,{status:"abnormal",abnormal_mechanism:"anr_foreground"});const t=function(t,e,n,r){const o=ot(n);return Q({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&e&&{dsn:k(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(ue,ce.dsn,ce.sdkMetadata,ce.tunnel);fe(JSON.stringify(t)),await de.send(t);try{e?.postMessage("session-ended")}catch(t){}}}function ge(t){if(!t)return;const e=function(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(e[e.length-1].function||"")&&e.pop(),e.reverse(),P.test(e[e.length-1].function||"")&&(e.pop(),P.test(e[e.length-1].function||"")&&e.pop()),e.slice(0,A).map((t=>({...t,filename:t.filename||e[e.length-1].filename,function:t.function||I})))}(t);if(ce.appRootPath)for(const t of e)t.filename&&(t.filename=H(t.filename,ce.appRootPath));return e}async function ye(t,e){if(ae)return;ae=!0,await me(),fe("Sending event");const n={event_id:G(),contexts:ce.contexts,release:ce.release,environment:ce.environment,dist:ce.dist,platform:"node",level:"error",exception:{values:[{type:"ApplicationNotResponding",value:`Application Not Responding for at least ${ce.anrThreshold} ms`,stacktrace:{frames:ge(t)},mechanism:{type:"ANR"}}]},tags:ce.staticTags};e&&function(t,e){if(Wt(t,e),!t.contexts?.trace){const{traceId:n,spanId:r,parentSpanId:o}=e.propagationContext;t.contexts={trace:{trace_id:n,span_id:r,parent_span_id:o},...t.contexts}}}(n,e);const r=Jt(n,ce.dsn,ce.sdkMetadata,ce.tunnel);fe(JSON.stringify(r)),await de.send(r),await de.flush(2e3),setTimeout((()=>{process.exit(0)}),5e3)}let be;if(fe("Started"),ce.captureStackTrace){fe("Connecting to debugger");const e=new t;e.connectToMainThread(),fe("Connected to debugger");const n=new Map;e.on("Debugger.scriptParsed",(t=>{n.set(t.params.scriptId,t.params.url)})),e.on("Debugger.paused",(t=>{if("other"===t.params.reason)try{fe("Debugger paused");const s=[...t.params.callFrames],i=ce.appRootPath?function(t=(process.argv[1]?Y(process.argv[1]):process.cwd()),e="\\"===o){const n=e?ie(t):t;return t=>{if(!t)return;const o=e?ie(t):t;let{dir:s,base:i,ext:c}=r.parse(o);".js"!==c&&".mjs"!==c&&".cjs"!==c||(i=i.slice(0,-1*c.length)),s||(s=".");const u=s.lastIndexOf("/node_modules");if(u>-1)return`${s.slice(u+14).replace(/\//g,".")}:${i}`;if(s.startsWith(n)){let t=s.slice(n.length+1).replace(/\//g,".");return t&&(t+=":"),t+=i,t}return i}}(ce.appRootPath):()=>{},c=s.map((t=>function(t,e,n){const r=e?e.replace(/^file:\/\//,""):void 0,o=t.location.columnNumber?t.location.columnNumber+1:void 0,s=t.location.lineNumber?t.location.lineNumber+1:void 0;return j({filename:r,module:n(r),function:t.functionName||I,colno:o,lineno:s,in_app:r?Z(r):void 0})}(t,n.get(t.location.scriptId),i))),u=setTimeout((()=>{ye(c).then(null,(()=>{fe("Sending ANR event failed.")}))}),5e3);e.post("Runtime.evaluate",{expression:"global.__SENTRY_GET_SCOPES__();",silent:!0,returnByValue:!0},((t,n)=>{t&&fe(`Error executing script: '${t.message}'`),clearTimeout(u);const r=n&&n.result?n.result.value:void 0;e.post("Debugger.resume"),e.post("Debugger.disable"),ye(c,r).then(null,(()=>{fe("Sending ANR event failed.")}))}))}catch(t){throw e.post("Debugger.resume"),e.post("Debugger.disable"),t}})),be=()=>{try{e.post("Debugger.enable",(()=>{e.post("Debugger.pause")}))}catch(t){}}}const{poll:ve}=function(t,e,n,r){const o=t();let s=!1,i=!0;return setInterval((()=>{const t=o.getTimeMs();!1===s&&t>e+n&&(s=!0,i&&r()),t<e+n&&(s=!1)}),20),{poll:()=>{o.reset()},enabled:t=>{i=t}}}((function(){let t=process.hrtime();return{getTimeMs:()=>{const[e,n]=process.hrtime(t);return Math.floor(1e3*e+n/1e6)},reset:()=>{t=process.hrtime()}}}),ce.pollInterval,ce.anrThreshold,(function(){fe("Watchdog timeout"),be?(fe("Pausing debugger to capture stack trace"),be()):(fe("Capturing event without a stack trace"),ye().then(null,(()=>{fe("Sending ANR event failed on watchdog timeout.")})))}));e?.on("message",(t=>{t.session&&(ue=ft(t.session)),ve()}));
@@ -2,7 +2,7 @@ import { _optionalChain } from '@sentry/utils';
2
2
  import { SpanKind } from '@opentelemetry/api';
3
3
  import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';
4
4
  import { addOpenTelemetryInstrumentation, getClient, getSpanKind, getRequestSpanData } from '@sentry/opentelemetry';
5
- import { defineIntegration, isSentryRequestUrl, getCapturedScopesOnSpan, getIsolationScope, getCurrentScope, setCapturedScopesOnSpan, spanToJSON, addBreadcrumb } from '@sentry/core';
5
+ import { defineIntegration, isSentryRequestUrl, getCapturedScopesOnSpan, getIsolationScope, getCurrentScope, setCapturedScopesOnSpan, addBreadcrumb } from '@sentry/core';
6
6
  import { stripUrlQueryAndFragment } from '@sentry/utils';
7
7
  import { setIsolationScope } from '../sdk/scope.js';
8
8
  import { addOriginToSpan } from '../utils/addOriginToSpan.js';
@@ -82,13 +82,9 @@ const _httpIntegration = ((options = {}) => {
82
82
  // attempt to update the scope's `transactionName` based on the request URL
83
83
  // Ideally, framework instrumentations coming after the HttpInstrumentation
84
84
  // update the transactionName once we get a parameterized route.
85
- const attributes = spanToJSON(span).data;
86
- if (!attributes) {
87
- return;
88
- }
85
+ const httpMethod = (req.method || 'GET').toUpperCase();
86
+ const httpTarget = stripUrlQueryAndFragment(req.url || '/');
89
87
 
90
- const httpMethod = String(attributes['http.method']).toUpperCase() || 'GET';
91
- const httpTarget = stripUrlQueryAndFragment(String(attributes['http.target'])) || '/';
92
88
  const bestEffortTransactionName = `${httpMethod} ${httpTarget}`;
93
89
 
94
90
  isolationScope.setTransactionName(bestEffortTransactionName);
@@ -1 +1 @@
1
- {"version":3,"file":"http.js","sources":["../../../src/integrations/http.ts"],"sourcesContent":["import type { ClientRequest, IncomingMessage, ServerResponse } from 'http';\nimport type { Span } from '@opentelemetry/api';\nimport { SpanKind } from '@opentelemetry/api';\nimport { HttpInstrumentation } from '@opentelemetry/instrumentation-http';\nimport { addOpenTelemetryInstrumentation } from '@sentry/opentelemetry';\n\nimport {\n addBreadcrumb,\n defineIntegration,\n getCapturedScopesOnSpan,\n getCurrentScope,\n getIsolationScope,\n isSentryRequestUrl,\n setCapturedScopesOnSpan,\n spanToJSON,\n} from '@sentry/core';\nimport { getClient, getRequestSpanData, getSpanKind } from '@sentry/opentelemetry';\nimport type { IntegrationFn } from '@sentry/types';\n\nimport { stripUrlQueryAndFragment } from '@sentry/utils';\nimport type { NodeClient } from '../sdk/client';\nimport { setIsolationScope } from '../sdk/scope';\nimport type { HTTPModuleRequestIncomingMessage } from '../transports/http-module';\nimport { addOriginToSpan } from '../utils/addOriginToSpan';\nimport { getRequestUrl } from '../utils/getRequestUrl';\n\ninterface HttpOptions {\n /**\n * Whether breadcrumbs should be recorded for requests.\n * Defaults to true\n */\n breadcrumbs?: boolean;\n\n /**\n * Do not capture spans or breadcrumbs for outgoing HTTP requests to URLs where the given callback returns `true`.\n * This controls both span & breadcrumb creation - spans will be non recording if tracing is disabled.\n */\n ignoreOutgoingRequests?: (url: string) => boolean;\n\n /**\n * Do not capture spans or breadcrumbs for incoming HTTP requests to URLs where the given callback returns `true`.\n * This controls both span & breadcrumb creation - spans will be non recording if tracing is disabled.\n */\n ignoreIncomingRequests?: (url: string) => boolean;\n\n /** Allows to pass a custom version of HttpInstrumentation. We use this for Next.js. */\n _instrumentation?: typeof HttpInstrumentation;\n}\n\nconst _httpIntegration = ((options: HttpOptions = {}) => {\n const _breadcrumbs = typeof options.breadcrumbs === 'undefined' ? true : options.breadcrumbs;\n const _ignoreOutgoingRequests = options.ignoreOutgoingRequests;\n const _ignoreIncomingRequests = options.ignoreIncomingRequests;\n const _InstrumentationClass = options._instrumentation || HttpInstrumentation;\n\n return {\n name: 'Http',\n setupOnce() {\n addOpenTelemetryInstrumentation(\n new _InstrumentationClass({\n ignoreOutgoingRequestHook: request => {\n const url = getRequestUrl(request);\n\n if (!url) {\n return false;\n }\n\n if (isSentryRequestUrl(url, getClient())) {\n return true;\n }\n\n if (_ignoreOutgoingRequests && _ignoreOutgoingRequests(url)) {\n return true;\n }\n\n return false;\n },\n\n ignoreIncomingRequestHook: request => {\n const url = getRequestUrl(request);\n\n const method = request.method?.toUpperCase();\n // We do not capture OPTIONS/HEAD requests as transactions\n if (method === 'OPTIONS' || method === 'HEAD') {\n return true;\n }\n\n if (_ignoreIncomingRequests && _ignoreIncomingRequests(url)) {\n return true;\n }\n\n return false;\n },\n\n requireParentforOutgoingSpans: false,\n requireParentforIncomingSpans: false,\n requestHook: (span, req) => {\n addOriginToSpan(span, 'auto.http.otel.http');\n\n // both, incoming requests and \"client\" requests made within the app trigger the requestHook\n // we only want to isolate and further annotate incoming requests (IncomingMessage)\n if (_isClientRequest(req)) {\n return;\n }\n\n const scopes = getCapturedScopesOnSpan(span);\n\n const isolationScope = (scopes.isolationScope || getIsolationScope()).clone();\n const scope = scopes.scope || getCurrentScope();\n\n // Update the isolation scope, isolate this request\n isolationScope.setSDKProcessingMetadata({ request: req });\n\n const client = getClient<NodeClient>();\n if (client && client.getOptions().autoSessionTracking) {\n isolationScope.setRequestSession({ status: 'ok' });\n }\n setIsolationScope(isolationScope);\n setCapturedScopesOnSpan(span, scope, isolationScope);\n\n // attempt to update the scope's `transactionName` based on the request URL\n // Ideally, framework instrumentations coming after the HttpInstrumentation\n // update the transactionName once we get a parameterized route.\n const attributes = spanToJSON(span).data;\n if (!attributes) {\n return;\n }\n\n const httpMethod = String(attributes['http.method']).toUpperCase() || 'GET';\n const httpTarget = stripUrlQueryAndFragment(String(attributes['http.target'])) || '/';\n const bestEffortTransactionName = `${httpMethod} ${httpTarget}`;\n\n isolationScope.setTransactionName(bestEffortTransactionName);\n },\n responseHook: (span, res) => {\n if (_breadcrumbs) {\n _addRequestBreadcrumb(span, res);\n }\n\n const client = getClient<NodeClient>();\n if (client && client.getOptions().autoSessionTracking) {\n setImmediate(() => {\n client['_captureRequestSession']();\n });\n }\n },\n }),\n );\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * The http integration instruments Node's internal http and https modules.\n * It creates breadcrumbs and spans for outgoing HTTP requests which will be attached to the currently active span.\n */\nexport const httpIntegration = defineIntegration(_httpIntegration);\n\n/** Add a breadcrumb for outgoing requests. */\nfunction _addRequestBreadcrumb(span: Span, response: HTTPModuleRequestIncomingMessage | ServerResponse): void {\n if (getSpanKind(span) !== SpanKind.CLIENT) {\n return;\n }\n\n const data = getRequestSpanData(span);\n addBreadcrumb(\n {\n category: 'http',\n data: {\n status_code: response.statusCode,\n ...data,\n },\n type: 'http',\n },\n {\n event: 'response',\n // TODO FN: Do we need access to `request` here?\n // If we do, we'll have to use the `applyCustomAttributesOnSpan` hook instead,\n // but this has worse context semantics than request/responseHook.\n response,\n },\n );\n}\n\n/**\n * Determines if @param req is a ClientRequest, meaning the request was created within the express app\n * and it's an outgoing request.\n * Checking for properties instead of using `instanceOf` to avoid importing the request classes.\n */\nfunction _isClientRequest(req: ClientRequest | IncomingMessage): req is ClientRequest {\n return 'outputData' in req && 'outputSize' in req && !('client' in req) && !('statusCode' in req);\n}\n"],"names":[],"mappings":";;;;;;;;;;AAiDA,CAAA,CAAA,CAAA,CAAA,EAAM,iBAAoB,EAAA,CAAA,CAAC,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAgB,EAAE,EAAK,CAAA,EAAA;EACvD,CAAM,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAe,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,OAAO,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAgB,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAc,CAAA,CAAA,CAAA,EAAA,EAAO,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,WAAW;EAC5F,MAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAA0B,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,sBAAsB;EAC9D,MAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAA0B,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,sBAAsB;EAC9D,CAAA,CAAA,CAAA,CAAA,EAAM,sBAAwB,EAAA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AAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;CACA,CAAA;AACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA;EACA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,aAAA,CAAA,EAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,IAAA,CAAA,EAAA,CAAA,CAAA,SAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,aAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA;AACA;;"}
1
+ {"version":3,"file":"http.js","sources":["../../../src/integrations/http.ts"],"sourcesContent":["import type { ClientRequest, IncomingMessage, ServerResponse } from 'http';\nimport type { Span } from '@opentelemetry/api';\nimport { SpanKind } from '@opentelemetry/api';\nimport { HttpInstrumentation } from '@opentelemetry/instrumentation-http';\nimport { addOpenTelemetryInstrumentation } from '@sentry/opentelemetry';\n\nimport {\n addBreadcrumb,\n defineIntegration,\n getCapturedScopesOnSpan,\n getCurrentScope,\n getIsolationScope,\n isSentryRequestUrl,\n setCapturedScopesOnSpan,\n} from '@sentry/core';\nimport { getClient, getRequestSpanData, getSpanKind } from '@sentry/opentelemetry';\nimport type { IntegrationFn } from '@sentry/types';\n\nimport { stripUrlQueryAndFragment } from '@sentry/utils';\nimport type { NodeClient } from '../sdk/client';\nimport { setIsolationScope } from '../sdk/scope';\nimport type { HTTPModuleRequestIncomingMessage } from '../transports/http-module';\nimport { addOriginToSpan } from '../utils/addOriginToSpan';\nimport { getRequestUrl } from '../utils/getRequestUrl';\n\ninterface HttpOptions {\n /**\n * Whether breadcrumbs should be recorded for requests.\n * Defaults to true\n */\n breadcrumbs?: boolean;\n\n /**\n * Do not capture spans or breadcrumbs for outgoing HTTP requests to URLs where the given callback returns `true`.\n * This controls both span & breadcrumb creation - spans will be non recording if tracing is disabled.\n */\n ignoreOutgoingRequests?: (url: string) => boolean;\n\n /**\n * Do not capture spans or breadcrumbs for incoming HTTP requests to URLs where the given callback returns `true`.\n * This controls both span & breadcrumb creation - spans will be non recording if tracing is disabled.\n */\n ignoreIncomingRequests?: (url: string) => boolean;\n\n /** Allows to pass a custom version of HttpInstrumentation. We use this for Next.js. */\n _instrumentation?: typeof HttpInstrumentation;\n}\n\nconst _httpIntegration = ((options: HttpOptions = {}) => {\n const _breadcrumbs = typeof options.breadcrumbs === 'undefined' ? true : options.breadcrumbs;\n const _ignoreOutgoingRequests = options.ignoreOutgoingRequests;\n const _ignoreIncomingRequests = options.ignoreIncomingRequests;\n const _InstrumentationClass = options._instrumentation || HttpInstrumentation;\n\n return {\n name: 'Http',\n setupOnce() {\n addOpenTelemetryInstrumentation(\n new _InstrumentationClass({\n ignoreOutgoingRequestHook: request => {\n const url = getRequestUrl(request);\n\n if (!url) {\n return false;\n }\n\n if (isSentryRequestUrl(url, getClient())) {\n return true;\n }\n\n if (_ignoreOutgoingRequests && _ignoreOutgoingRequests(url)) {\n return true;\n }\n\n return false;\n },\n\n ignoreIncomingRequestHook: request => {\n const url = getRequestUrl(request);\n\n const method = request.method?.toUpperCase();\n // We do not capture OPTIONS/HEAD requests as transactions\n if (method === 'OPTIONS' || method === 'HEAD') {\n return true;\n }\n\n if (_ignoreIncomingRequests && _ignoreIncomingRequests(url)) {\n return true;\n }\n\n return false;\n },\n\n requireParentforOutgoingSpans: false,\n requireParentforIncomingSpans: false,\n requestHook: (span, req) => {\n addOriginToSpan(span, 'auto.http.otel.http');\n\n // both, incoming requests and \"client\" requests made within the app trigger the requestHook\n // we only want to isolate and further annotate incoming requests (IncomingMessage)\n if (_isClientRequest(req)) {\n return;\n }\n\n const scopes = getCapturedScopesOnSpan(span);\n\n const isolationScope = (scopes.isolationScope || getIsolationScope()).clone();\n const scope = scopes.scope || getCurrentScope();\n\n // Update the isolation scope, isolate this request\n isolationScope.setSDKProcessingMetadata({ request: req });\n\n const client = getClient<NodeClient>();\n if (client && client.getOptions().autoSessionTracking) {\n isolationScope.setRequestSession({ status: 'ok' });\n }\n setIsolationScope(isolationScope);\n setCapturedScopesOnSpan(span, scope, isolationScope);\n\n // attempt to update the scope's `transactionName` based on the request URL\n // Ideally, framework instrumentations coming after the HttpInstrumentation\n // update the transactionName once we get a parameterized route.\n const httpMethod = (req.method || 'GET').toUpperCase();\n const httpTarget = stripUrlQueryAndFragment(req.url || '/');\n\n const bestEffortTransactionName = `${httpMethod} ${httpTarget}`;\n\n isolationScope.setTransactionName(bestEffortTransactionName);\n },\n responseHook: (span, res) => {\n if (_breadcrumbs) {\n _addRequestBreadcrumb(span, res);\n }\n\n const client = getClient<NodeClient>();\n if (client && client.getOptions().autoSessionTracking) {\n setImmediate(() => {\n client['_captureRequestSession']();\n });\n }\n },\n }),\n );\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * The http integration instruments Node's internal http and https modules.\n * It creates breadcrumbs and spans for outgoing HTTP requests which will be attached to the currently active span.\n */\nexport const httpIntegration = defineIntegration(_httpIntegration);\n\n/** Add a breadcrumb for outgoing requests. */\nfunction _addRequestBreadcrumb(span: Span, response: HTTPModuleRequestIncomingMessage | ServerResponse): void {\n if (getSpanKind(span) !== SpanKind.CLIENT) {\n return;\n }\n\n const data = getRequestSpanData(span);\n addBreadcrumb(\n {\n category: 'http',\n data: {\n status_code: response.statusCode,\n ...data,\n },\n type: 'http',\n },\n {\n event: 'response',\n // TODO FN: Do we need access to `request` here?\n // If we do, we'll have to use the `applyCustomAttributesOnSpan` hook instead,\n // but this has worse context semantics than request/responseHook.\n response,\n },\n );\n}\n\n/**\n * Determines if @param req is a ClientRequest, meaning the request was created within the express app\n * and it's an outgoing request.\n * Checking for properties instead of using `instanceOf` to avoid importing the request classes.\n */\nfunction _isClientRequest(req: ClientRequest | IncomingMessage): req is ClientRequest {\n return 'outputData' in req && 'outputSize' in req && !('client' in req) && !('statusCode' in req);\n}\n"],"names":[],"mappings":";;;;;;;;;;AAgDA,CAAA,CAAA,CAAA,CAAA,EAAM,iBAAoB,EAAA,CAAA,CAAC,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAAgB,EAAE,EAAK,CAAA,EAAA;EACvD,CAAM,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAe,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,OAAO,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAgB,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAAc,CAAA,CAAA,CAAA,EAAA,EAAO,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,WAAW;EAC5F,MAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,EAA0B,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,sBAAsB;EAC9D,MAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA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CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA;EACA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,aAAA,CAAA,EAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,IAAA,CAAA,EAAA,CAAA,CAAA,SAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,aAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA;AACA;;"}
@@ -5,7 +5,7 @@ import { Worker } from 'worker_threads';
5
5
  import { hashFrames, functionNamesMatch } from './common.js';
6
6
 
7
7
  // This string is a placeholder that gets overwritten with the worker code.
8
- const base64WorkerScript = 'LyohIEBzZW50cnkvbm9kZSA4LjEuMCAoZDMxZDdhMCkgfCBodHRwczovL2dpdGh1Yi5jb20vZ2V0c2VudHJ5L3NlbnRyeS1qYXZhc2NyaXB0ICovCmltcG9ydHtTZXNzaW9uIGFzIGV9ZnJvbSJub2RlOmluc3BlY3Rvci9wcm9taXNlcyI7aW1wb3J0e3dvcmtlckRhdGEgYXMgbixwYXJlbnRQb3J0IGFzIHR9ZnJvbSJ3b3JrZXJfdGhyZWFkcyI7aW1wb3J0e3Bvc2l4IGFzIG8sc2VwIGFzIHJ9ZnJvbSJwYXRoIjtjb25zdCBpPTUwLHM9Ij8iLGM9L1woZXJyb3I6ICguKilcKS8sYT0vY2FwdHVyZU1lc3NhZ2V8Y2FwdHVyZUV4Y2VwdGlvbi87Y29uc3QgdT0vXihcUys6XFx8XC8/KShbXHNcU10qPykoKD86XC57MSwyfXxbXi9cXF0rP3wpKFwuW14uL1xcXSp8KSkoPzpbL1xcXSopJC87ZnVuY3Rpb24gZihlKXtjb25zdCBuPWZ1bmN0aW9uKG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t9KSwxZTQpOw==';
9
9
 
10
10
  function log(...args) {
11
11
  logger.log('[LocalVariables]', ...args);
@@ -1,2 +1,2 @@
1
- /*! @sentry/node 8.1.0 (d31d7a0) | https://github.com/getsentry/sentry-javascript */
1
+ /*! @sentry/node 8.2.1 (bb2f1bc) | https://github.com/getsentry/sentry-javascript */
2
2
  import{Session as e}from"node:inspector/promises";import{workerData as n,parentPort as t}from"worker_threads";import{posix as o,sep as r}from"path";const i=50,s="?",c=/\(error: (.*)\)/,a=/captureMessage|captureException/;const u=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function f(e){const n=function(e){const n=e.length>1024?`<truncated>${e.slice(-1024)}`:e,t=u.exec(n);return t?t.slice(1):[]}(e),t=n[0];let o=n[1];return t||o?(o&&(o=o.slice(0,o.length-1)),t+o):"."}function l(e,n=!1){return!(n||e&&!e.startsWith("/")&&!e.match(/^[A-Z]:/)&&!e.startsWith(".")&&!e.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&void 0!==e&&!e.includes("node_modules/")}function d(e){const n=/^\s*[-]{4,}$/,t=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;return o=>{const r=o.match(t);if(r){let n,t,o,i,c;if(r[1]){o=r[1];let e=o.lastIndexOf(".");if("."===o[e-1]&&e--,e>0){n=o.slice(0,e),t=o.slice(e+1);const r=n.indexOf(".Module");r>0&&(o=o.slice(r+1),n=n.slice(0,r))}i=void 0}t&&(i=n,c=t),"<anonymous>"===t&&(c=void 0,o=void 0),void 0===o&&(c=c||s,o=i?`${i}.${c}`:c);let a=r[2]&&r[2].startsWith("file://")?r[2].slice(7):r[2];const u="native"===r[5];return a&&a.match(/\/[A-Z]:/)&&(a=a.slice(1)),a||!r[5]||u||(a=r[5]),{filename:a,module:e?e(a):void 0,function:o,lineno:parseInt(r[3],10)||void 0,colno:parseInt(r[4],10)||void 0,in_app:l(a,u)}}if(o.match(n))return{filename:o}}}function p(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}const g=n,m=function(...e){const n=e.sort(((e,n)=>e[0]-n[0])).map((e=>e[1]));return(e,t=0,o=0)=>{const r=[],u=e.split("\n");for(let e=t;e<u.length;e++){const t=u[e];if(t.length>1024)continue;const s=c.test(t)?t.replace(c,"$1"):t;if(!s.match(/\S*Error: /)){for(const e of n){const n=e(s);if(n){r.push(n);break}}if(r.length>=i+o)break}}return function(e){if(!e.length)return[];const n=Array.from(e);/sentryWrapped/.test(n[n.length-1].function||"")&&n.pop();n.reverse(),a.test(n[n.length-1].function||"")&&(n.pop(),a.test(n[n.length-1].function||"")&&n.pop());return n.slice(0,i).map((e=>({...e,filename:e.filename||n[n.length-1].filename,function:e.function||s})))}(r.slice(o))}}([90,d(function(e=(process.argv[1]?f(process.argv[1]):process.cwd()),n="\\"===r){const t=n?p(e):e;return e=>{if(!e)return;const r=n?p(e):e;let{dir:i,base:s,ext:c}=o.parse(r);".js"!==c&&".mjs"!==c&&".cjs"!==c||(s=s.slice(0,-1*c.length)),i||(i=".");const a=i.lastIndexOf("/node_modules");if(a>-1)return`${i.slice(a+14).replace(/\//g,".")}:${s}`;if(i.startsWith(t)){let e=i.slice(t.length+1).replace(/\//g,".");return e&&(e+=":"),e+=s,e}return s}}(g.basePath))]);function b(...e){g.debug&&console.log("[LocalVariables Worker]",...e)}async function v(e,n,t,o){const r=await e.post("Runtime.getProperties",{objectId:n,ownProperties:!0});o[t]=r.result.filter((e=>"length"!==e.name&&!isNaN(parseInt(e.name,10)))).sort(((e,n)=>parseInt(e.name,10)-parseInt(n.name,10))).map((e=>e.value?.value))}async function $(e,n,t,o){const r=await e.post("Runtime.getProperties",{objectId:n,ownProperties:!0});o[t]=r.result.map((e=>[e.name,e.value?.value])).reduce(((e,[n,t])=>(e[n]=t,e)),{})}function w(e,n){e.value&&("value"in e.value?void 0===e.value.value||null===e.value.value?n[e.name]=`<${e.value.value}>`:n[e.name]=e.value.value:"description"in e.value&&"function"!==e.value.type?n[e.name]=`<${e.value.description}>`:"undefined"===e.value.type&&(n[e.name]="<undefined>"))}async function y(e,n){const t=await e.post("Runtime.getProperties",{objectId:n,ownProperties:!0}),o={};for(const n of t.result)if(n?.value?.objectId&&"Array"===n?.value.className){const t=n.value.objectId;await v(e,t,n.name,o)}else if(n?.value?.objectId&&"Object"===n?.value?.className){const t=n.value.objectId;await $(e,t,n.name,o)}else n?.value&&w(n,o);return o}let h;(async function(){const n=new e;n.connectToMainThread(),b("Connected to main thread");let o=!1;n.on("Debugger.resumed",(()=>{o=!1})),n.on("Debugger.paused",(e=>{o=!0,async function(e,n,{reason:o,data:r,callFrames:i}){if("exception"!==o&&"promiseRejection"!==o)return;h?.();const s=function(e,n){if(void 0!==n)return function(e){if(void 0!==e)return e.slice(-10).reduce(((e,n)=>`${e},${n.function},${n.lineno},${n.colno}`),"")}(e(n,1))}(n,r?.description);if(null==s)return;const c=[];for(let n=0;n<i.length;n++){const{scopeChain:t,functionName:o,this:r}=i[n],s=t.find((e=>"local"===e.type)),a="global"!==r.className&&r.className?`${r.className}.${o}`:o;if(void 0===s?.object.objectId)c[n]={function:a};else{const t=await y(e,s.object.objectId);c[n]={function:a,vars:t}}}t?.postMessage({exceptionHash:s,frames:c})}(n,m,e.params).then((()=>o?n.post("Debugger.resume"):Promise.resolve()),(e=>{}))})),await n.post("Debugger.enable");const r=!1!==g.captureAllExceptions;if(await n.post("Debugger.setPauseOnExceptions",{state:r?"all":"uncaught"}),r){const e=g.maxExceptionsPerSecond||50;h=function(e,n,t){let o=0,r=5,i=0;return setInterval((()=>{0===i?o>e&&(r*=2,t(r),r>86400&&(r=86400),i=r):(i-=1,0===i&&n()),o=0}),1e3).unref(),()=>{o+=1}}(e,(async()=>{b("Rate-limit lifted."),await n.post("Debugger.setPauseOnExceptions",{state:"all"})}),(async e=>{b(`Rate-limit exceeded. Disabling capturing of caught exceptions for ${e} seconds.`),await n.post("Debugger.setPauseOnExceptions",{state:"uncaught"})}))}})().catch((e=>{b("Failed to start debugger",e)})),setInterval((()=>{}),1e4);
@@ -1 +1 @@
1
- {"version":3,"file":"nest.js","sources":["../../../../src/integrations/tracing/nest.ts"],"sourcesContent":["import { NestInstrumentation } from '@opentelemetry/instrumentation-nestjs-core';\nimport { captureException, defineIntegration, getDefaultIsolationScope, getIsolationScope } from '@sentry/core';\nimport { addOpenTelemetryInstrumentation } from '@sentry/opentelemetry';\nimport type { IntegrationFn } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\ninterface MinimalNestJsExecutionContext {\n getType: () => string;\n\n switchToHttp: () => {\n // minimal request object\n // according to official types, all properties are required but\n // let's play it safe and assume they're optional\n getRequest: () => {\n route?: {\n path?: string;\n };\n method?: string;\n };\n };\n}\n\ninterface NestJsErrorFilter {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n catch(exception: any, host: any): void;\n}\n\ninterface MinimalNestJsApp {\n useGlobalFilters: (arg0: NestJsErrorFilter) => void;\n useGlobalInterceptors: (interceptor: {\n intercept: (context: MinimalNestJsExecutionContext, next: { handle: () => void }) => void;\n }) => void;\n}\n\nconst _nestIntegration = (() => {\n return {\n name: 'Nest',\n setupOnce() {\n addOpenTelemetryInstrumentation(new NestInstrumentation({}));\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Nest framework integration\n *\n * Capture tracing data for nest.\n */\nexport const nestIntegration = defineIntegration(_nestIntegration);\n\n/**\n * Setup an error handler for Nest.\n */\nexport function setupNestErrorHandler(app: MinimalNestJsApp, baseFilter: NestJsErrorFilter): void {\n app.useGlobalInterceptors({\n intercept(context, next) {\n if (getIsolationScope() === getDefaultIsolationScope()) {\n logger.warn('Isolation scope is still the default isolation scope, skipping setting transactionName.');\n return next.handle();\n }\n\n if (context.getType() === 'http') {\n const req = context.switchToHttp().getRequest();\n if (req.route) {\n getIsolationScope().setTransactionName(`${req.method?.toUpperCase() || 'GET'} ${req.route.path}`);\n }\n }\n\n return next.handle();\n },\n });\n\n const wrappedFilter = new Proxy(baseFilter, {\n get(target, prop, receiver) {\n if (prop === 'catch') {\n const originalCatch = Reflect.get(target, prop, receiver);\n\n return (exception: unknown, host: unknown) => {\n captureException(exception);\n return originalCatch.apply(target, [exception, host]);\n };\n }\n return Reflect.get(target, prop, receiver);\n },\n });\n\n app.useGlobalFilters(wrappedFilter);\n}\n"],"names":[],"mappings":";;;;;;AAkCA,CAAM,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAoB,CAAM,EAAA,CAAA,EAAA;EAC9B,CAAO,CAAA,CAAA,CAAA,CAAA,EAAA;IACL,CAAA,CAAA,CAAA,CAAI,EAAE,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA;IACZ,SAAS,CAAG,EAAA;MACV,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA+B,CAAC,CAAI,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmB,CAAC,CAAE,CAAA,CAAC,CAAC;IAC7D,CAAA;EACL,CAAG;AACH,CAAC,EAAE;;AAEH,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;CACA;CACA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EA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AA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IACA,CAAA;EACA,CAAA,CAAA;;EAEA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA;;"}
1
+ {"version":3,"file":"nest.js","sources":["../../../../src/integrations/tracing/nest.ts"],"sourcesContent":["import { NestInstrumentation } from '@opentelemetry/instrumentation-nestjs-core';\nimport { captureException, defineIntegration, getDefaultIsolationScope, getIsolationScope } from '@sentry/core';\nimport { addOpenTelemetryInstrumentation } from '@sentry/opentelemetry';\nimport type { IntegrationFn } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\ninterface MinimalNestJsExecutionContext {\n getType: () => string;\n\n switchToHttp: () => {\n // minimal request object\n // according to official types, all properties are required but\n // let's play it safe and assume they're optional\n getRequest: () => {\n route?: {\n path?: string;\n };\n method?: string;\n };\n };\n}\n\ninterface NestJsErrorFilter {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n catch(exception: any, host: any): void;\n}\n\ninterface MinimalNestJsApp {\n useGlobalFilters: (arg0: NestJsErrorFilter) => void;\n useGlobalInterceptors: (interceptor: {\n intercept: (context: MinimalNestJsExecutionContext, next: { handle: () => any }) => any;\n }) => void;\n}\n\nconst _nestIntegration = (() => {\n return {\n name: 'Nest',\n setupOnce() {\n addOpenTelemetryInstrumentation(new NestInstrumentation({}));\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Nest framework integration\n *\n * Capture tracing data for nest.\n */\nexport const nestIntegration = defineIntegration(_nestIntegration);\n\n/**\n * Setup an error handler for Nest.\n */\nexport function setupNestErrorHandler(app: MinimalNestJsApp, baseFilter: NestJsErrorFilter): void {\n app.useGlobalInterceptors({\n intercept(context, next) {\n if (getIsolationScope() === getDefaultIsolationScope()) {\n logger.warn('Isolation scope is still the default isolation scope, skipping setting transactionName.');\n return next.handle();\n }\n\n if (context.getType() === 'http') {\n const req = context.switchToHttp().getRequest();\n if (req.route) {\n getIsolationScope().setTransactionName(`${req.method?.toUpperCase() || 'GET'} ${req.route.path}`);\n }\n }\n\n return next.handle();\n },\n });\n\n const wrappedFilter = new Proxy(baseFilter, {\n get(target, prop, receiver) {\n if (prop === 'catch') {\n const originalCatch = Reflect.get(target, prop, receiver);\n\n return (exception: unknown, host: unknown) => {\n captureException(exception);\n return originalCatch.apply(target, [exception, host]);\n };\n }\n return Reflect.get(target, prop, receiver);\n },\n });\n\n app.useGlobalFilters(wrappedFilter);\n}\n"],"names":[],"mappings":";;;;;;AAkCA,CAAM,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,KAAoB,CAAM,EAAA,CAAA,EAAA;EAC9B,CAAO,CAAA,CAAA,CAAA,CAAA,EAAA;IACL,CAAA,CAAA,CAAA,CAAI,EAAE,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA;IACZ,SAAS,CAAG,EAAA;MACV,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAA+B,CAAC,CAAI,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmB,CAAC,CAAE,CAAA,CAAC,CAAC;IAC7D,CAAA;EACL,CAAG;AACH,CAAC,EAAE;;AAEH,CAAA,CAAA;CACA,EAAA,CAA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AA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACA,CAAA;MACA;MACA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;IACA,CAAA;EACA,CAAA,CAAA;;EAEA,GAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACA;;"}
@@ -1,13 +1,78 @@
1
+ import { _optionalChain } from '@sentry/utils';
1
2
  import { IORedisInstrumentation } from '@opentelemetry/instrumentation-ioredis';
2
- import { defineIntegration } from '@sentry/core';
3
+ import { defineIntegration, SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_CACHE_KEY, SEMANTIC_ATTRIBUTE_CACHE_HIT, spanToJSON } from '@sentry/core';
3
4
  import { addOpenTelemetryInstrumentation } from '@sentry/opentelemetry';
4
5
 
5
- const _redisIntegration = (() => {
6
+ function keyHasPrefix(key, prefixes) {
7
+ return prefixes.some(prefix => key.startsWith(prefix));
8
+ }
9
+
10
+ /** Currently, caching only supports 'get' and 'set' commands. More commands will be added (setex, mget, del, expire) */
11
+ function shouldConsiderForCache(
12
+ redisCommand,
13
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
14
+ key,
15
+ prefixes,
16
+ ) {
17
+ return (redisCommand === 'get' || redisCommand === 'set') && typeof key === 'string' && keyHasPrefix(key, prefixes);
18
+ }
19
+
20
+ function calculateCacheItemSize(response) {
21
+ try {
22
+ if (Buffer.isBuffer(response)) return response.byteLength;
23
+ else if (typeof response === 'string') return response.length;
24
+ else if (typeof response === 'number') return response.toString().length;
25
+ else if (response === null || response === undefined) return 0;
26
+ return JSON.stringify(response).length;
27
+ } catch (e) {
28
+ return undefined;
29
+ }
30
+ }
31
+
32
+ const _redisIntegration = ((options) => {
6
33
  return {
7
34
  name: 'Redis',
8
35
  setupOnce() {
9
36
  addOpenTelemetryInstrumentation([
10
- new IORedisInstrumentation({}),
37
+ new IORedisInstrumentation({
38
+ responseHook: (span, redisCommand, cmdArgs, response) => {
39
+ const key = cmdArgs[0];
40
+
41
+ if (!_optionalChain([options, 'optionalAccess', _ => _.cachePrefixes]) || !shouldConsiderForCache(redisCommand, key, options.cachePrefixes)) {
42
+ // not relevant for cache
43
+ return;
44
+ }
45
+
46
+ // otel/ioredis seems to be using the old standard, as there was a change to those params: https://github.com/open-telemetry/opentelemetry-specification/issues/3199
47
+ // We are using params based on the docs: https://opentelemetry.io/docs/specs/semconv/attributes-registry/network/
48
+ const networkPeerAddress = _optionalChain([spanToJSON, 'call', _2 => _2(span), 'access', _3 => _3.data, 'optionalAccess', _4 => _4['net.peer.name']]);
49
+ const networkPeerPort = _optionalChain([spanToJSON, 'call', _5 => _5(span), 'access', _6 => _6.data, 'optionalAccess', _7 => _7['net.peer.port']]);
50
+ if (networkPeerPort && networkPeerAddress) {
51
+ span.setAttributes({ 'network.peer.address': networkPeerAddress, 'network.peer.port': networkPeerPort });
52
+ }
53
+
54
+ const cacheItemSize = calculateCacheItemSize(response);
55
+ if (cacheItemSize) span.setAttribute(SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE, cacheItemSize);
56
+
57
+ if (typeof key === 'string') {
58
+ switch (redisCommand) {
59
+ case 'get':
60
+ span.setAttributes({
61
+ [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'cache.get_item', // todo: will be changed to cache.get
62
+ [SEMANTIC_ATTRIBUTE_CACHE_KEY]: key,
63
+ });
64
+ if (cacheItemSize !== undefined) span.setAttribute(SEMANTIC_ATTRIBUTE_CACHE_HIT, cacheItemSize > 0);
65
+ break;
66
+ case 'set':
67
+ span.setAttributes({
68
+ [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'cache.put',
69
+ [SEMANTIC_ATTRIBUTE_CACHE_KEY]: key,
70
+ });
71
+ break;
72
+ }
73
+ }
74
+ },
75
+ }),
11
76
  // todo: implement them gradually
12
77
  // new LegacyRedisInstrumentation({}),
13
78
  // new RedisInstrumentation({}),
@@ -1 +1 @@
1
- {"version":3,"file":"redis.js","sources":["../../../../src/integrations/tracing/redis.ts"],"sourcesContent":["import { IORedisInstrumentation } from '@opentelemetry/instrumentation-ioredis';\nimport { defineIntegration } from '@sentry/core';\nimport { addOpenTelemetryInstrumentation } from '@sentry/opentelemetry';\nimport type { IntegrationFn } from '@sentry/types';\n\nconst _redisIntegration = (() => {\n return {\n name: 'Redis',\n setupOnce() {\n addOpenTelemetryInstrumentation([\n new IORedisInstrumentation({}),\n // todo: implement them gradually\n // new LegacyRedisInstrumentation({}),\n // new RedisInstrumentation({}),\n ]);\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Redis integration for \"ioredis\"\n *\n * Capture tracing data for redis and ioredis.\n */\nexport const redisIntegration = defineIntegration(_redisIntegration);\n"],"names":[],"mappings":";;;;AAKA,MAAM,iBAAkB,IAAG,MAAM;AACjC,EAAE,OAAO;AACT,IAAI,IAAI,EAAE,OAAO;AACjB,IAAI,SAAS,GAAG;AAChB,MAAM,+BAA+B,CAAC;AACtC,QAAQ,IAAI,sBAAsB,CAAC,EAAE,CAAC;AACtC;AACA;AACA;AACA,OAAO,CAAC,CAAA;AACR,KAAK;AACL,GAAG,CAAA;AACH,CAAC,CAAE,EAAA;AACH;AACA;AACA;AACA;AACA;AACA;MACa,gBAAiB,GAAE,iBAAiB,CAAC,iBAAiB;;;;"}
1
+ {"version":3,"file":"redis.js","sources":["../../../../src/integrations/tracing/redis.ts"],"sourcesContent":["import { IORedisInstrumentation } from '@opentelemetry/instrumentation-ioredis';\nimport {\n SEMANTIC_ATTRIBUTE_CACHE_HIT,\n SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE,\n SEMANTIC_ATTRIBUTE_CACHE_KEY,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n defineIntegration,\n spanToJSON,\n} from '@sentry/core';\nimport { addOpenTelemetryInstrumentation } from '@sentry/opentelemetry';\nimport type { IntegrationFn } from '@sentry/types';\n\nfunction keyHasPrefix(key: string, prefixes: string[]): boolean {\n return prefixes.some(prefix => key.startsWith(prefix));\n}\n\n/** Currently, caching only supports 'get' and 'set' commands. More commands will be added (setex, mget, del, expire) */\nfunction shouldConsiderForCache(\n redisCommand: string,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n key: string | number | any[] | Buffer,\n prefixes: string[],\n): boolean {\n return (redisCommand === 'get' || redisCommand === 'set') && typeof key === 'string' && keyHasPrefix(key, prefixes);\n}\n\nfunction calculateCacheItemSize(response: unknown): number | undefined {\n try {\n if (Buffer.isBuffer(response)) return response.byteLength;\n else if (typeof response === 'string') return response.length;\n else if (typeof response === 'number') return response.toString().length;\n else if (response === null || response === undefined) return 0;\n return JSON.stringify(response).length;\n } catch (e) {\n return undefined;\n }\n}\n\ninterface RedisOptions {\n cachePrefixes?: string[];\n}\n\nconst _redisIntegration = ((options?: RedisOptions) => {\n return {\n name: 'Redis',\n setupOnce() {\n addOpenTelemetryInstrumentation([\n new IORedisInstrumentation({\n responseHook: (span, redisCommand, cmdArgs, response) => {\n const key = cmdArgs[0];\n\n if (!options?.cachePrefixes || !shouldConsiderForCache(redisCommand, key, options.cachePrefixes)) {\n // not relevant for cache\n return;\n }\n\n // otel/ioredis seems to be using the old standard, as there was a change to those params: https://github.com/open-telemetry/opentelemetry-specification/issues/3199\n // We are using params based on the docs: https://opentelemetry.io/docs/specs/semconv/attributes-registry/network/\n const networkPeerAddress = spanToJSON(span).data?.['net.peer.name'];\n const networkPeerPort = spanToJSON(span).data?.['net.peer.port'];\n if (networkPeerPort && networkPeerAddress) {\n span.setAttributes({ 'network.peer.address': networkPeerAddress, 'network.peer.port': networkPeerPort });\n }\n\n const cacheItemSize = calculateCacheItemSize(response);\n if (cacheItemSize) span.setAttribute(SEMANTIC_ATTRIBUTE_CACHE_ITEM_SIZE, cacheItemSize);\n\n if (typeof key === 'string') {\n switch (redisCommand) {\n case 'get':\n span.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'cache.get_item', // todo: will be changed to cache.get\n [SEMANTIC_ATTRIBUTE_CACHE_KEY]: key,\n });\n if (cacheItemSize !== undefined) span.setAttribute(SEMANTIC_ATTRIBUTE_CACHE_HIT, cacheItemSize > 0);\n break;\n case 'set':\n span.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'cache.put',\n [SEMANTIC_ATTRIBUTE_CACHE_KEY]: key,\n });\n break;\n }\n }\n },\n }),\n // todo: implement them gradually\n // new LegacyRedisInstrumentation({}),\n // new RedisInstrumentation({}),\n ]);\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Redis integration for \"ioredis\"\n *\n * Capture tracing data for redis and ioredis.\n */\nexport const redisIntegration = defineIntegration(_redisIntegration);\n"],"names":[],"mappings":";;;;;AAYA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAS,CAAY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,CAAG,CAAA,CAAA,EAAU,QAAQ,EAAqB;EAC9D,CAAO,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAC,CAAA,CAAA,CAAA,CAAI,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAU,CAAG,CAAA,CAAA,CAAC,CAAU,CAAA,CAAA,CAAA,CAAA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B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;"}
package/esm/sdk/init.js CHANGED
@@ -56,10 +56,23 @@ function getDefaultIntegrationsWithoutPerformance() {
56
56
  function getDefaultIntegrations(options) {
57
57
  return [
58
58
  ...getDefaultIntegrationsWithoutPerformance(),
59
- ...(hasTracingEnabled(options) ? getAutoPerformanceIntegrations() : []),
59
+ // We only add performance integrations if tracing is enabled
60
+ // Note that this means that without tracing enabled, e.g. `expressIntegration()` will not be added
61
+ // This means that generally request isolation will work (because that is done by httpIntegration)
62
+ // But `transactionName` will not be set automatically
63
+ ...(shouldAddPerformanceIntegrations(options) ? getAutoPerformanceIntegrations() : []),
60
64
  ];
61
65
  }
62
66
 
67
+ function shouldAddPerformanceIntegrations(options) {
68
+ if (!hasTracingEnabled(options)) {
69
+ return false;
70
+ }
71
+
72
+ // We want to ensure `tracesSampleRate` is not just undefined/null here
73
+ return options.enableTracing || options.tracesSampleRate != null || 'tracesSampler' in options;
74
+ }
75
+
63
76
  /**
64
77
  * Initialize Sentry for Node.
65
78
  */