@sentry/node 8.4.0 → 8.6.0
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.
- package/cjs/index.js +14 -9
- package/cjs/index.js.map +1 -1
- package/cjs/init.js +2 -2
- package/cjs/init.js.map +1 -1
- package/cjs/integrations/anr/index.js +2 -2
- package/cjs/integrations/anr/index.js.map +1 -1
- package/cjs/integrations/http.js +121 -97
- package/cjs/integrations/http.js.map +1 -1
- package/cjs/integrations/local-variables/local-variables-async.js +2 -2
- package/cjs/integrations/local-variables/local-variables-async.js.map +1 -1
- package/cjs/integrations/local-variables/local-variables-sync.js +114 -109
- package/cjs/integrations/local-variables/local-variables-sync.js.map +1 -1
- package/cjs/integrations/tracing/connect.js +8 -3
- package/cjs/integrations/tracing/connect.js.map +1 -1
- package/cjs/integrations/tracing/express.js +44 -37
- package/cjs/integrations/tracing/express.js.map +1 -1
- package/cjs/integrations/tracing/fastify.js +16 -9
- package/cjs/integrations/tracing/fastify.js.map +1 -1
- package/cjs/integrations/tracing/graphql.js +24 -16
- package/cjs/integrations/tracing/graphql.js.map +1 -1
- package/cjs/integrations/tracing/hapi/index.js +8 -3
- package/cjs/integrations/tracing/hapi/index.js.map +1 -1
- package/cjs/integrations/tracing/index.js +25 -0
- package/cjs/integrations/tracing/index.js.map +1 -1
- package/cjs/integrations/tracing/koa.js +45 -39
- package/cjs/integrations/tracing/koa.js.map +1 -1
- package/cjs/integrations/tracing/mongo.js +16 -9
- package/cjs/integrations/tracing/mongo.js.map +1 -1
- package/cjs/integrations/tracing/mongoose.js +16 -9
- package/cjs/integrations/tracing/mongoose.js.map +1 -1
- package/cjs/integrations/tracing/mysql.js +8 -3
- package/cjs/integrations/tracing/mysql.js.map +1 -1
- package/cjs/integrations/tracing/mysql2.js +16 -9
- package/cjs/integrations/tracing/mysql2.js.map +1 -1
- package/cjs/integrations/tracing/nest.js +8 -3
- package/cjs/integrations/tracing/nest.js.map +1 -1
- package/cjs/integrations/tracing/postgres.js +17 -10
- package/cjs/integrations/tracing/postgres.js.map +1 -1
- package/cjs/integrations/tracing/prisma.js +16 -7
- package/cjs/integrations/tracing/prisma.js.map +1 -1
- package/cjs/integrations/tracing/redis.js +58 -47
- package/cjs/integrations/tracing/redis.js.map +1 -1
- package/cjs/otel/instrument.js +35 -0
- package/cjs/otel/instrument.js.map +1 -0
- package/cjs/preload.js +20 -0
- package/cjs/preload.js.map +1 -0
- package/cjs/sdk/{init.js → index.js} +8 -29
- package/cjs/sdk/index.js.map +1 -0
- package/cjs/sdk/initOtel.js +88 -9
- package/cjs/sdk/initOtel.js.map +1 -1
- package/esm/index.js +4 -3
- package/esm/index.js.map +1 -1
- package/esm/init.js +1 -1
- package/esm/init.js.map +1 -1
- package/esm/integrations/anr/index.js +2 -2
- package/esm/integrations/anr/index.js.map +1 -1
- package/esm/integrations/anr/worker-script.js +2 -2
- package/esm/integrations/http.js +123 -100
- package/esm/integrations/http.js.map +1 -1
- package/esm/integrations/local-variables/local-variables-async.js +2 -2
- package/esm/integrations/local-variables/local-variables-async.js.map +1 -1
- package/esm/integrations/local-variables/local-variables-sync.js +114 -109
- package/esm/integrations/local-variables/local-variables-sync.js.map +1 -1
- package/esm/integrations/local-variables/worker-script.js +1 -1
- package/esm/integrations/tracing/connect.js +8 -4
- package/esm/integrations/tracing/connect.js.map +1 -1
- package/esm/integrations/tracing/express.js +44 -38
- package/esm/integrations/tracing/express.js.map +1 -1
- package/esm/integrations/tracing/fastify.js +16 -10
- package/esm/integrations/tracing/fastify.js.map +1 -1
- package/esm/integrations/tracing/graphql.js +24 -17
- package/esm/integrations/tracing/graphql.js.map +1 -1
- package/esm/integrations/tracing/hapi/index.js +8 -4
- package/esm/integrations/tracing/hapi/index.js.map +1 -1
- package/esm/integrations/tracing/index.js +37 -13
- package/esm/integrations/tracing/index.js.map +1 -1
- package/esm/integrations/tracing/koa.js +45 -40
- package/esm/integrations/tracing/koa.js.map +1 -1
- package/esm/integrations/tracing/mongo.js +16 -10
- package/esm/integrations/tracing/mongo.js.map +1 -1
- package/esm/integrations/tracing/mongoose.js +16 -10
- package/esm/integrations/tracing/mongoose.js.map +1 -1
- package/esm/integrations/tracing/mysql.js +8 -4
- package/esm/integrations/tracing/mysql.js.map +1 -1
- package/esm/integrations/tracing/mysql2.js +16 -10
- package/esm/integrations/tracing/mysql2.js.map +1 -1
- package/esm/integrations/tracing/nest.js +8 -4
- package/esm/integrations/tracing/nest.js.map +1 -1
- package/esm/integrations/tracing/postgres.js +17 -11
- package/esm/integrations/tracing/postgres.js.map +1 -1
- package/esm/integrations/tracing/prisma.js +16 -8
- package/esm/integrations/tracing/prisma.js.map +1 -1
- package/esm/integrations/tracing/redis.js +57 -47
- package/esm/integrations/tracing/redis.js.map +1 -1
- package/esm/otel/instrument.js +33 -0
- package/esm/otel/instrument.js.map +1 -0
- package/esm/preload.js +20 -0
- package/esm/preload.js.map +1 -0
- package/esm/sdk/{init.js → index.js} +11 -32
- package/esm/sdk/index.js.map +1 -0
- package/esm/sdk/initOtel.js +88 -12
- package/esm/sdk/initOtel.js.map +1 -1
- package/package.json +15 -7
- package/types/index.d.ts +4 -3
- package/types/index.d.ts.map +1 -1
- package/types/integrations/anr/index.d.ts.map +1 -1
- package/types/integrations/http.d.ts +7 -0
- package/types/integrations/http.d.ts.map +1 -1
- package/types/integrations/local-variables/local-variables-sync.d.ts +1 -1
- package/types/integrations/local-variables/local-variables-sync.d.ts.map +1 -1
- package/types/integrations/tracing/connect.d.ts +3 -0
- package/types/integrations/tracing/connect.d.ts.map +1 -1
- package/types/integrations/tracing/express.d.ts +3 -0
- package/types/integrations/tracing/express.d.ts.map +1 -1
- package/types/integrations/tracing/fastify.d.ts +3 -0
- package/types/integrations/tracing/fastify.d.ts.map +1 -1
- package/types/integrations/tracing/graphql.d.ts +4 -1
- package/types/integrations/tracing/graphql.d.ts.map +1 -1
- package/types/integrations/tracing/hapi/index.d.ts +3 -0
- package/types/integrations/tracing/hapi/index.d.ts.map +1 -1
- package/types/integrations/tracing/index.d.ts +6 -0
- package/types/integrations/tracing/index.d.ts.map +1 -1
- package/types/integrations/tracing/koa.d.ts +3 -0
- package/types/integrations/tracing/koa.d.ts.map +1 -1
- package/types/integrations/tracing/mongo.d.ts +3 -0
- package/types/integrations/tracing/mongo.d.ts.map +1 -1
- package/types/integrations/tracing/mongoose.d.ts +3 -0
- package/types/integrations/tracing/mongoose.d.ts.map +1 -1
- package/types/integrations/tracing/mysql.d.ts +3 -0
- package/types/integrations/tracing/mysql.d.ts.map +1 -1
- package/types/integrations/tracing/mysql2.d.ts +3 -0
- package/types/integrations/tracing/mysql2.d.ts.map +1 -1
- package/types/integrations/tracing/nest.d.ts +3 -0
- package/types/integrations/tracing/nest.d.ts.map +1 -1
- package/types/integrations/tracing/postgres.d.ts +3 -0
- package/types/integrations/tracing/postgres.d.ts.map +1 -1
- package/types/integrations/tracing/prisma.d.ts +3 -0
- package/types/integrations/tracing/prisma.d.ts.map +1 -1
- package/types/integrations/tracing/redis.d.ts +3 -0
- package/types/integrations/tracing/redis.d.ts.map +1 -1
- package/types/otel/instrument.d.ts +9 -0
- package/types/otel/instrument.d.ts.map +1 -0
- package/types/preload.d.ts +2 -0
- package/types/preload.d.ts.map +1 -0
- package/types/sdk/{init.d.ts → index.d.ts} +5 -1
- package/types/sdk/index.d.ts.map +1 -0
- package/types/sdk/initOtel.d.ts +13 -0
- package/types/sdk/initOtel.d.ts.map +1 -1
- package/types-ts3.8/index.d.ts +4 -3
- package/types-ts3.8/integrations/http.d.ts +7 -0
- package/types-ts3.8/integrations/local-variables/local-variables-sync.d.ts +1 -1
- package/types-ts3.8/integrations/tracing/connect.d.ts +3 -0
- package/types-ts3.8/integrations/tracing/express.d.ts +3 -0
- package/types-ts3.8/integrations/tracing/fastify.d.ts +3 -0
- package/types-ts3.8/integrations/tracing/graphql.d.ts +4 -1
- package/types-ts3.8/integrations/tracing/hapi/index.d.ts +3 -0
- package/types-ts3.8/integrations/tracing/index.d.ts +6 -0
- package/types-ts3.8/integrations/tracing/koa.d.ts +3 -0
- package/types-ts3.8/integrations/tracing/mongo.d.ts +3 -0
- package/types-ts3.8/integrations/tracing/mongoose.d.ts +3 -0
- package/types-ts3.8/integrations/tracing/mysql.d.ts +3 -0
- package/types-ts3.8/integrations/tracing/mysql2.d.ts +3 -0
- package/types-ts3.8/integrations/tracing/nest.d.ts +3 -0
- package/types-ts3.8/integrations/tracing/postgres.d.ts +3 -0
- package/types-ts3.8/integrations/tracing/prisma.d.ts +3 -0
- package/types-ts3.8/integrations/tracing/redis.d.ts +3 -0
- package/types-ts3.8/otel/instrument.d.ts +9 -0
- package/types-ts3.8/preload.d.ts +2 -0
- package/types-ts3.8/sdk/{init.d.ts → index.d.ts} +5 -1
- package/types-ts3.8/sdk/initOtel.d.ts +13 -0
- package/cjs/sdk/init.js.map +0 -1
- package/esm/sdk/init.js.map +0 -1
- package/types/sdk/init.d.ts.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @sentry/node 8.
|
|
2
|
-
import{parentPort as t,workerData as e}from"node:worker_threads";import{Session as n}from"inspector";import{posix as r,sep as o}from"node:path";import*as s from"node:http";import*as i from"node:https";import{Readable as c}from"node:stream";import{createGzip as u}from"node:zlib";import*as a from"node:net";import*as f from"node:tls";const h=Object.prototype.toString;function p(t,e){return h.call(t)===`[object ${e}]`}function l(t){return p(t,"Object")}function d(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function m(t,e){try{return t instanceof e}catch(t){return!1}}const g=globalThis;function y(t,e,n){const r=n||g,o=r.__SENTRY__=r.__SENTRY__||{};return o[t]||(o[t]=e())}const b=g,v=80;function _(t,e){const n=t,r=[];let o,s,i,c,u;if(!n||!n.tagName)return"";if(b.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&&p(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 w="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,S=["debug","info","warn","error","log","assert","trace"],$={};function E(t){if(!("console"in g))return t();const e=g.console,n={},r=Object.keys($);r.forEach((t=>{const r=$[t];n[t]=e[t],e[t]=r}));try{return t()}finally{r.forEach((t=>{e[t]=n[t]}))}}const x=function(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return w?S.forEach((n=>{e[n]=(...e)=>{t&&E((()=>{g.console[n](`Sentry Logger [${n}]:`,...e)}))}})):S.forEach((t=>{e[t]=()=>{}})),e}();function N(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 k 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 C(t){if(function(t){switch(h.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return m(t,Error)}}(t))return{message:t.message,name:t.name,stack:t.stack,...T(t)};if(e=t,"undefined"!=typeof Event&&m(e,Event)){const e={type:t.type,target:D(t.target),currentTarget:D(t.currentTarget),...T(t)};return"undefined"!=typeof CustomEvent&&m(t,CustomEvent)&&(e.detail=t.detail),e}return t;var e}function D(t){try{return e=t,"undefined"!=typeof Element&&m(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||v;for(;n&&s++<r&&(a=_(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 T(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 O(t){return j(t,new Map)}function j(t,e){if(function(t){if(!l(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]=j(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(j(t,e))})),r}return t}const R=50,A="?",I=/captureMessage|captureException/;const P="<anonymous>";const U=1e3;function M(){return Date.now()/U}const L=function(){const{performance:t}=g;if(!t||!t.now)return M;const e=Date.now()-t.now(),n=null==t.timeOrigin?e:t.timeOrigin;return()=>(n+t.now())/U}();function B(){const t=g,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 G(t,e=100,n=1/0){try{return J("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function J(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 l(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||P}catch(t){return P}}(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 J("",a.toJSON(),u-1,r,o)}catch(t){}const f=Array.isArray(e)?[]:{};let h=0;const p=C(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]=J(t,e,u-1,r,o),h++}return i(e),f}function z(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}=g;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 H=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function W(t){const e=function(t){const e=t.length>1024?`<truncated>${t.slice(-1024)}`:t,n=H.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 Y;function q(t){return new F((e=>{e(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(Y||(Y={}));class F{constructor(t){F.prototype.__init.call(this),F.prototype.__init2.call(this),F.prototype.__init3.call(this),F.prototype.__init4.call(this),this.i=Y.PENDING,this.u=[];try{t(this.h,this.p)}catch(t){this.p(t)}}then(t,e){return new F(((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 F(((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(Y.RESOLVED,t)}}__init2(){this.p=t=>{this.m(Y.REJECTED,t)}}__init3(){this.m=(t,e)=>{this.i===Y.PENDING&&(d(e)?e.then(this.h,this.p):(this.i=t,this.v=e,this.l()))}}__init4(){this.l=()=>{if(this.i===Y.PENDING)return;const t=this.u.slice();this.u=[],t.forEach((t=>{t[0]||(this.i===Y.RESOLVED&&t[1](this.v),this.i===Y.REJECTED&&t[2](this.v),t[0]=!0)}))}}}function K(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 k("Not adding Promise because buffer limit was reached."),new F(((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 F(((n,r)=>{let o=e.length;if(!o)return n(!0);const s=setTimeout((()=>{t&&t>0&&n(!1)}),t);e.forEach((t=>{q(t).then((()=>{--o||(clearTimeout(s),n(!0))}),r)}))}))}}}function V(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 Z(t,e=[]){return[t,e]}function Q(t,e){const n=t[1];for(const t of n){if(e(t,t[0].type))return!0}return!1}function X(t){return g.__SENTRY__&&g.__SENTRY__.encodePolyfill?g.__SENTRY__.encodePolyfill(t):(new TextEncoder).encode(t)}function tt(t){const[e,n]=t;let r=JSON.stringify(e);function o(t){"string"==typeof r?r="string"==typeof t?r+t:[X(r),t]:r.push("string"==typeof t?X(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(G(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 et={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 nt(t){return et[t]}function rt(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}const ot=6e4;function st(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)?ot:r-e}(i,r):429===e&&(o.all=r+6e4);return o}const it="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function ct(){return ut(g),g}function ut(t){return t.__SENTRY__||(t.__SENTRY__={extensions:{}}),t.__SENTRY__}function at(t){const e=L(),n={sid:B(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return O({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&&ft(n,t),n}function ft(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||L(),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:B()),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 ht="_sentrySpan";function pt(t,e){e?function(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch(n){w&&x.log(`Failed to add non-enumerable property "${e}" to object`,t)}}(t,ht,e):delete t[ht]}function lt(t){return t[ht]}class dt{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 dt;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,pt(t,lt(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&&ft(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()]:l(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,pt(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:M(),...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:lt(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:B();if(!this.B)return x.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:B();if(!this.B)return x.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:B();return this.B?(this.B.captureEvent(t,{...e,event_id:n},this),n):(x.warn("No client configured on scope - will not capture event!"),n)}J(){this._||(this._=!0,this.S.forEach((t=>{t(this)})),this._=!1)}}const mt=dt;function gt(){return{traceId:B(),spanId:B().substring(16)}}class yt{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 d(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 bt(){const t=ut(ct());return t.hub||(t.hub=new yt(y("defaultCurrentScope",(()=>new mt)),y("defaultIsolationScope",(()=>new mt)))),t.hub}function vt(t){return bt().withScope(t)}function _t(t,e){const n=bt();return n.withScope((()=>(n.getStackTop().scope=t,e(t))))}function wt(t){return bt().withScope((()=>t(bt().getIsolationScope())))}function St(t){const e=ut(t);return e.acs?e.acs:{withIsolationScope:wt,withScope:vt,withSetScope:_t,withSetIsolationScope:(t,e)=>wt(e),getCurrentScope:()=>bt().getScope(),getIsolationScope:()=>bt().getIsolationScope()}}function $t(){return St(ct()).getCurrentScope().getClient()}const Et="sentry.source",xt="sentry.sample_rate",Nt="sentry.op",kt="sentry.origin",Ct=0,Dt=1,Tt=1;function Ot(t){const{spanId:e,traceId:n}=t.spanContext(),{parent_span_id:r}=At(t);return O({parent_span_id:r,span_id:e,trace_id:n})}function jt(t){return"number"==typeof t?Rt(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Rt(t.getTime()):L()}function Rt(t){return t>9999999999?t/1e3:t}function At(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 O({span_id:e,trace_id:n,data:r,description:s,parent_span_id:c,start_timestamp:jt(o),timestamp:jt(i)||void 0,status:It(u),op:r[Nt],origin:r[kt],F:void 0})}return{span_id:e,trace_id:n}}catch(t){return{}}}function It(t){if(t&&t.code!==Ct)return t.code===Dt?"ok":t.message||"unknown_error"}const Pt="_sentryRootSpan";function Ut(t){return t[Pt]||t}const Mt="production",Lt="_frozenDsc";function Bt(t){const e=$t();if(!e)return{};const n=function(t,e){const n=e.getOptions(),{publicKey:r}=e.getDsn()||{},o=O({environment:n.environment||Mt,release:n.release,public_key:r,trace_id:t});return e.emit("createDsc",o),o}(At(t).trace_id||"",e),r=Ut(t);if(!r)return n;const o=r[Lt];if(o)return o;const s=At(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===Tt}(r)),e.emit("createDsc",n),n}function Gt(t,e,n,r){const o=rt(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:N(r)},...o&&{trace:O({...o})}}}(t,o,r,e);delete t.sdkProcessingMetadata;return Z(i,[[{type:s},t]])}const Jt="__SENTRY_SUPPRESS_TRACING__";function zt(t){const e=St(ct());return e.suppressTracing?e.suppressTracing(t):function(...t){const e=St(ct());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=O(n);u&&Object.keys(u).length&&(t.extra={...u,...t.extra});const a=O(r);a&&Object.keys(a).length&&(t.tags={...a,...t.tags});const f=O(o);f&&Object.keys(f).length&&(t.user={...f,...t.user});const h=O(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:Ot(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:Bt(e),...t.sdkProcessingMetadata};const n=Ut(e),r=At(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=K(t.bufferSize||qt)){let r={};return{send:function(o){const s=[];if(Q(o,((e,n)=>{const o=nt(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 q({});const i=Z(o[0],s),c=e=>{Q(i,((n,r)=>{const o=Kt(n,r);t.recordDroppedEvent(e,nt(r),o)}))};return n.add((()=>e({body:tt(i)}).then((t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&it&&x.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=st(r,t),t)),(t=>{throw c("network_error"),t})))).then((t=>t),(t=>{if(t instanceof k)return it&&x.error("Skipped sending event because buffer is full."),c("queue_overflow"),q({});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 s.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 s.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){x.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){x.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=e;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 E((()=>{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"),ft(ce,{status:"abnormal",abnormal_mechanism:"anr_foreground"});const e=function(t,e,n,r){const o=rt(n);return Z({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&e&&{dsn:N(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(ce,ie.dsn,ie.sdkMetadata,ie.tunnel);ae(JSON.stringify(e)),await le.send(e);try{t?.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(),I.test(e[e.length-1].function||"")&&(e.pop(),I.test(e[e.length-1].function||"")&&e.pop()),e.slice(0,R).map((t=>({...t,filename:t.filename||e[e.length-1].filename,function:t.function||A})))}(t);if(ie.appRootPath)for(const t of e)t.filename&&(t.filename=z(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:B(),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 t=new n;t.connectToMainThread(),ae("Connected to debugger");const e=new Map;t.on("Debugger.scriptParsed",(t=>{e.set(t.params.scriptId,t.params.url)})),t.on("Debugger.paused",(n=>{if("other"===n.params.reason)try{ae("Debugger paused");const s=[...n.params.callFrames],i=ie.appRootPath?function(t=(process.argv[1]?W(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 O({filename:r,module:n(r),function:t.functionName||A,colno:o,lineno:s,in_app:r?V(r):void 0})}(t,e.get(t.location.scriptId),i))),u=setTimeout((()=>{ge(c).then(null,(()=>{ae("Sending ANR event failed.")}))}),5e3);t.post("Runtime.evaluate",{expression:"global.__SENTRY_GET_SCOPES__();",silent:!0,returnByValue:!0},((e,n)=>{e&&ae(`Error executing script: '${e.message}'`),clearTimeout(u);const r=n&&n.result?n.result.value:void 0;t.post("Debugger.resume"),t.post("Debugger.disable"),ge(c,r).then(null,(()=>{ae("Sending ANR event failed.")}))}))}catch(e){throw t.post("Debugger.resume"),t.post("Debugger.disable"),e}})),ye=()=>{try{t.post("Debugger.enable",(()=>{t.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.")})))}));t?.on("message",(t=>{t.session&&(ce=at(t.session)),be()}));
|
|
1
|
+
/*! @sentry/node 8.6.0 (7480992) | https://github.com/getsentry/sentry-javascript */
|
|
2
|
+
import{Session as t}from"node:inspector";import{parentPort as n,workerData as e}from"node:worker_threads";import{posix as r,sep as o}from"node:path";import*as s from"node:http";import*as i from"node:https";import{Readable as c}from"node:stream";import{createGzip as u}from"node:zlib";import*as a from"node:net";import*as f from"node:tls";const h=Object.prototype.toString;function p(t,n){return h.call(t)===`[object ${n}]`}function l(t){return p(t,"Object")}function d(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function m(t,n){try{return t instanceof n}catch(t){return!1}}const g="8.6.0",y=globalThis;function b(t,n,e){const r=e||y,o=r.__SENTRY__=r.__SENTRY__||{},s=o[g]=o[g]||{};return s[t]||(s[t]=n())}const v=y,_=80;function w(t,n){const e=t,r=[];let o,s,i,c,u;if(!e||!e.tagName)return"";if(v.HTMLElement&&e instanceof HTMLElement&&e.dataset){if(e.dataset.sentryComponent)return e.dataset.sentryComponent;if(e.dataset.sentryElement)return e.dataset.sentryElement}r.push(e.tagName.toLowerCase());const a=n&&n.length?n.filter((t=>e.getAttribute(t))).map((t=>[t,e.getAttribute(t)])):null;if(a&&a.length)a.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else if(e.id&&r.push(`#${e.id}`),o=e.className,o&&p(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=e.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 n=y.console,e={},r=Object.keys(E);r.forEach((t=>{const r=E[t];e[t]=n[t],n[t]=r}));try{return t()}finally{r.forEach((t=>{n[t]=e[t]}))}}const N=function(){let t=!1;const n={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return S?$.forEach((e=>{n[e]=(...n)=>{t&&x((()=>{y.console[e](`Sentry Logger [${e}]:`,...n)}))}})):$.forEach((t=>{n[t]=()=>{}})),n}();function k(t,n=!1){const{host:e,path:r,pass:o,port:s,projectId:i,protocol:c,publicKey:u}=t;return`${c}://${u}${n&&o?`:${o}`:""}@${e}${s?`:${s}`:""}/${r?`${r}/`:r}${i}`}class C extends Error{constructor(t,n="warn"){super(t),this.message=t,this.name=new.target.prototype.constructor.name,Object.setPrototypeOf(this,new.target.prototype),this.logLevel=n}}function D(t){if(function(t){switch(h.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return m(t,Error)}}(t))return{message:t.message,name:t.name,stack:t.stack,...O(t)};if(n=t,"undefined"!=typeof Event&&m(n,Event)){const n={type:t.type,target:T(t.target),currentTarget:T(t.currentTarget),...O(t)};return"undefined"!=typeof CustomEvent&&m(t,CustomEvent)&&(n.detail=t.detail),n}return t;var n}function T(t){try{return n=t,"undefined"!=typeof Element&&m(n,Element)?function(t,n={}){if(!t)return"<unknown>";try{let e=t;const r=5,o=[];let s=0,i=0;const c=" > ",u=c.length;let a;const f=Array.isArray(n)?n:n.keyAttrs,h=!Array.isArray(n)&&n.maxStringLength||_;for(;e&&s++<r&&(a=w(e,f),!("html"===a||s>1&&i+o.length*u+a.length>=h));)o.push(a),i+=a.length,e=e.parentNode;return o.reverse().join(c)}catch(t){return"<unknown>"}}(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}var n}function O(t){if("object"==typeof t&&null!==t){const n={};for(const e in t)Object.prototype.hasOwnProperty.call(t,e)&&(n[e]=t[e]);return n}return{}}function j(t){return R(t,new Map)}function R(t,n){if(function(t){if(!l(t))return!1;try{const n=Object.getPrototypeOf(t).constructor.name;return!n||"Object"===n}catch(t){return!0}}(t)){const e=n.get(t);if(void 0!==e)return e;const r={};n.set(t,r);for(const e of Object.keys(t))void 0!==t[e]&&(r[e]=R(t[e],n));return r}if(Array.isArray(t)){const e=n.get(t);if(void 0!==e)return e;const r=[];return n.set(t,r),t.forEach((t=>{r.push(R(t,n))})),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 n=Date.now()-t.now(),e=null==t.timeOrigin?n:t.timeOrigin;return()=>(e+t.now())/M}();function G(){const t=y,n=t.crypto||t.msCrypto;let e=()=>16*Math.random();try{if(n&&n.randomUUID)return n.randomUUID().replace(/-/g,"");n&&n.getRandomValues&&(e=()=>{const t=new Uint8Array(1);return n.getRandomValues(t),t[0]})}catch(t){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(15&e())>>t/4).toString(16)))}function J(t,n=100,e=1/0){try{return z("",t,n,e)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function z(t,n,e=1/0,r=1/0,o=function(){const t="function"==typeof WeakSet,n=t?new WeakSet:[];return[function(e){if(t)return!!n.has(e)||(n.add(e),!1);for(let t=0;t<n.length;t++)if(n[t]===e)return!0;return n.push(e),!1},function(e){if(t)n.delete(e);else for(let t=0;t<n.length;t++)if(n[t]===e){n.splice(t,1);break}}]}()){const[s,i]=o;if(null==n||["number","boolean","string"].includes(typeof n)&&!Number.isNaN(n))return n;const c=function(t,n){try{if("domain"===t&&n&&"object"==typeof n&&n.t)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&n===global)return"[Global]";if("undefined"!=typeof window&&n===window)return"[Window]";if("undefined"!=typeof document&&n===document)return"[Document]";if("object"==typeof(e=n)&&null!==e&&(e.__isVue||e.o))return"[VueViewModel]";if(function(t){return l(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}(n))return"[SyntheticEvent]";if("number"==typeof n&&n!=n)return"[NaN]";if("function"==typeof n)return`[Function: ${function(t){try{return t&&"function"==typeof t&&t.name||U}catch(t){return U}}(n)}]`;if("symbol"==typeof n)return`[${String(n)}]`;if("bigint"==typeof n)return`[BigInt: ${String(n)}]`;const r=function(t){const n=Object.getPrototypeOf(t);return n?n.constructor.name:"null prototype"}(n);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(t){return`**non-serializable** (${t})`}var e}(t,n);if(!c.startsWith("[object "))return c;if(n.__sentry_skip_normalization__)return n;const u="number"==typeof n.__sentry_override_normalization_depth__?n.__sentry_override_normalization_depth__:e;if(0===u)return c.replace("object ","");if(s(n))return"[Circular ~]";const a=n;if(a&&"function"==typeof a.toJSON)try{return z("",a.toJSON(),u-1,r,o)}catch(t){}const f=Array.isArray(n)?[]:{};let h=0;const p=D(n);for(const t in p){if(!Object.prototype.hasOwnProperty.call(p,t))continue;if(h>=r){f[t]="[MaxProperties ~]";break}const n=p[t];f[t]=z(t,n,u-1,r,o),h++}return i(n),f}function H(t,n){const e=n.replace(/\\/g,"/").replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");let r=t;try{r=decodeURI(t)}catch(t){}return r.replace(/\\/g,"/").replace(/webpack:\/?/g,"").replace(new RegExp(`(file://)?/*${e}/*`,"ig"),"app:///")}(()=>{const{performance:t}=y;if(!t||!t.now)return;const n=36e5,e=t.now(),r=Date.now(),o=t.timeOrigin?Math.abs(t.timeOrigin+e-r):n,s=o<n,i=t.timing&&t.timing.navigationStart,c="number"==typeof i?Math.abs(i+e-r):n;(s||c<n)&&(o<=c&&t.timeOrigin)})();const W=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function Y(t){const n=function(t){const n=t.length>1024?`<truncated>${t.slice(-1024)}`:t,e=W.exec(n);return e?e.slice(1):[]}(t),e=n[0];let r=n[1];return e||r?(r&&(r=r.slice(0,r.length-1)),e+r):"."}var q;function F(t){return new K((n=>{n(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,n){return new K(((e,r)=>{this.u.push([!1,n=>{if(t)try{e(t(n))}catch(t){r(t)}else e(n)},t=>{if(n)try{e(n(t))}catch(t){r(t)}else r(t)}]),this.l()}))}catch(t){return this.then((t=>t),t)}finally(t){return new K(((n,e)=>{let r,o;return this.then((n=>{o=!1,r=n,t&&t()}),(n=>{o=!0,r=n,t&&t()})).then((()=>{o?e(r):n(r)}))}))}__init(){this.h=t=>{this.m(q.RESOLVED,t)}}__init2(){this.p=t=>{this.m(q.REJECTED,t)}}__init3(){this.m=(t,n)=>{this.i===q.PENDING&&(d(n)?n.then(this.h,this.p):(this.i=t,this.v=n,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 n=[];function e(t){return n.splice(n.indexOf(t),1)[0]}return{$:n,add:function(r){if(!(void 0===t||n.length<t))return o=new C("Not adding Promise because buffer limit was reached."),new K(((t,n)=>{n(o)}));var o;const s=r();return-1===n.indexOf(s)&&n.push(s),s.then((()=>e(s))).then(null,(()=>e(s).then(null,(()=>{})))),s},drain:function(t){return new K(((e,r)=>{let o=n.length;if(!o)return e(!0);const s=setTimeout((()=>{t&&t>0&&e(!1)}),t);n.forEach((t=>{F(t).then((()=>{--o||(clearTimeout(s),e(!0))}),r)}))}))}}}function Z(t,n=!1){return!(n||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,n=[]){return[t,n]}function X(t,n){const e=t[1];for(const t of e){if(n(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 nt(t){const[n,e]=t;let r=JSON.stringify(n);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 e){const[n,e]=t;if(o(`\n${JSON.stringify(n)}\n`),"string"==typeof e||e instanceof Uint8Array)o(e);else{let t;try{t=JSON.stringify(e)}catch(n){t=JSON.stringify(J(e))}o(t)}}return"string"==typeof r?r:function(t){const n=t.reduce(((t,n)=>t+n.length),0),e=new Uint8Array(n);let r=0;for(const n of t)e.set(n,r),r+=n.length;return e}(r)}const et={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 et[t]}function ot(t){if(!t||!t.sdk)return;const{name:n,version:e}=t.sdk;return{name:n,version:e}}const st=6e4;function it(t,{statusCode:n,headers:e},r=Date.now()){const o={...t},s=e&&e["x-sentry-rate-limits"],i=e&&e["retry-after"];if(s)for(const t of s.trim().split(",")){const[n,e,,,s]=t.split(":",5),i=parseInt(n,10),c=1e3*(isNaN(i)?60:i);if(e)for(const t of e.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,n=Date.now()){const e=parseInt(`${t}`,10);if(!isNaN(e))return 1e3*e;const r=Date.parse(`${t}`);return isNaN(r)?st:r-n}(i,r):429===n&&(o.all=r+6e4);return o}function ct(){return{traceId:G(),spanId:G().substring(16)}}const ut="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function at(){return ft(y),y}function ft(t){const n=t.__SENTRY__=t.__SENTRY__||{};return n.version=n.version||g,n[g]=n[g]||{}}function ht(t){const n=B(),e={sid:G(),init:!0,timestamp:n,started:n,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}})}(e)};return t&&pt(e,t),e}function pt(t,n={}){if(n.user&&(!t.ipAddress&&n.user.ip_address&&(t.ipAddress=n.user.ip_address),t.did||n.did||(t.did=n.user.id||n.user.email||n.user.username)),t.timestamp=n.timestamp||B(),n.abnormal_mechanism&&(t.abnormal_mechanism=n.abnormal_mechanism),n.ignoreDuration&&(t.ignoreDuration=n.ignoreDuration),n.sid&&(t.sid=32===n.sid.length?n.sid:G()),void 0!==n.init&&(t.init=n.init),!t.did&&n.did&&(t.did=`${n.did}`),"number"==typeof n.started&&(t.started=n.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof n.duration)t.duration=n.duration;else{const n=t.timestamp-t.started;t.duration=n>=0?n:0}n.release&&(t.release=n.release),n.environment&&(t.environment=n.environment),!t.ipAddress&&n.ipAddress&&(t.ipAddress=n.ipAddress),!t.userAgent&&n.userAgent&&(t.userAgent=n.userAgent),"number"==typeof n.errors&&(t.errors=n.errors),n.status&&(t.status=n.status)}const lt="_sentrySpan";function dt(t,n){n?function(t,n,e){try{Object.defineProperty(t,n,{value:e,writable:!0,configurable:!0})}catch(e){S&&N.log(`Failed to add non-enumerable property "${n}" to object`,t)}}(t,lt,n):delete t[lt]}function mt(t){return t[lt]}class gt{constructor(){this._=!1,this.S=[],this.N=[],this.k=[],this.C=[],this.D={},this.T={},this.O={},this.j={},this.R={},this.A=ct()}clone(){const t=new gt;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,dt(t,mt(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&&pt(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,n){return this.T={...this.T,[t]:n},this.J(),this}setExtras(t){return this.O={...this.O,...t},this.J(),this}setExtra(t,n){return this.O={...this.O,[t]:n},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,n){return null===n?delete this.j[t]:this.j[t]=n,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 n="function"==typeof t?t(this):t,[e,r]=n instanceof yt?[n.getScopeData(),n.getRequestSession()]:l(n)?[t,t.requestSession]:[],{tags:o,extra:s,user:i,contexts:c,level:u,fingerprint:a=[],propagationContext:f}=e||{};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,dt(this,void 0),this.C=[],this.A=ct(),this.J(),this}addBreadcrumb(t,n){const e="number"==typeof n?n:100;if(e<=0)return this;const r={timestamp:L(),...t},o=this.k;return o.push(r),this.k=o.length>e?o.slice(-e):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:mt(this)}}setSDKProcessingMetadata(t){return this.R={...this.R,...t},this}setPropagationContext(t){return this.A=t,this}getPropagationContext(){return this.A}captureException(t,n){const e=n&&n.event_id?n.event_id:G();if(!this.B)return N.warn("No client configured on scope - will not capture exception!"),e;const r=new Error("Sentry syntheticException");return this.B.captureException(t,{originalException:t,syntheticException:r,...n,event_id:e},this),e}captureMessage(t,n,e){const r=e&&e.event_id?e.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,n,{originalException:t,syntheticException:o,...e,event_id:r},this),r}captureEvent(t,n){const e=n&&n.event_id?n.event_id:G();return this.B?(this.B.captureEvent(t,{...n,event_id:e},this),e):(N.warn("No client configured on scope - will not capture event!"),e)}J(){this._||(this._=!0,this.S.forEach((t=>{t(this)})),this._=!1)}}const yt=gt;class bt{constructor(t,n){let e,r;e=t||new yt,r=n||new yt,this.H=[{scope:e}],this.W=r}withScope(t){const n=this.Y();let e;try{e=t(n)}catch(t){throw this.q(),t}return d(e)?e.then((t=>(this.q(),t)),(t=>{throw this.q(),t})):(this.q(),e)}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=ft(at());return t.stack=t.stack||new bt(b("defaultCurrentScope",(()=>new yt)),b("defaultIsolationScope",(()=>new yt)))}function _t(t){return vt().withScope(t)}function wt(t,n){const e=vt();return e.withScope((()=>(e.getStackTop().scope=t,n(t))))}function St(t){return vt().withScope((()=>t(vt().getIsolationScope())))}function $t(t){const n=ft(t);return n.acs?n.acs:{withIsolationScope:St,withScope:_t,withSetScope:wt,withSetIsolationScope:(t,n)=>St(n),getCurrentScope:()=>vt().getScope(),getIsolationScope:()=>vt().getIsolationScope()}}function Et(){return $t(at()).getCurrentScope().getClient()}const xt="_sentryMetrics";function Nt(t){const n=t[xt];if(!n)return;const e={};for(const[,[t,r]]of n)e[t]||(e[t]=[]),e[t].push(j(r));return e}const kt="sentry.source",Ct="sentry.sample_rate",Dt="sentry.op",Tt="sentry.origin",Ot=0,jt=1,Rt=1;function At(t){const{spanId:n,traceId:e}=t.spanContext(),{parent_span_id:r}=Ut(t);return j({parent_span_id:r,span_id:n,trace_id:e})}function It(t){return"number"==typeof t?Pt(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Pt(t.getTime()):B()}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:n,traceId:e}=t.spanContext();if(function(t){const n=t;return!!(n.attributes&&n.startTime&&n.name&&n.endTime&&n.status)}(t)){const{attributes:r,startTime:o,name:s,endTime:i,parentSpanId:c,status:u}=t;return j({span_id:n,trace_id:e,data:r,description:s,parent_span_id:c,start_timestamp:It(o),timestamp:It(i)||void 0,status:Mt(u),op:r[Dt],origin:r[Tt],_metrics_summary:Nt(t)})}return{span_id:n,trace_id:e}}catch(t){return{}}}function Mt(t){if(t&&t.code!==Ot)return t.code===jt?"ok":t.message||"unknown_error"}const Lt="_sentryRootSpan";function Bt(t){return t[Lt]||t}const Gt="production",Jt="_frozenDsc";function zt(t){const n=Et();if(!n)return{};const e=function(t,n){const e=n.getOptions(),{publicKey:r}=n.getDsn()||{},o=j({environment:e.environment||Gt,release:e.release,public_key:r,trace_id:t});return n.emit("createDsc",o),o}(Ut(t).trace_id||"",n),r=Bt(t);if(!r)return e;const o=r[Jt];if(o)return o;const s=Ut(r),i=s.data||{},c=i[Ct];null!=c&&(e.sample_rate=`${c}`);const u=i[kt];return u&&"url"!==u&&(e.transaction=s.description),e.sampled=String(function(t){const{traceFlags:n}=t.spanContext();return n===Rt}(r)),n.emit("createDsc",e),e}function Ht(t,n,e,r){const o=ot(e),s=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,n){n&&(t.sdk=t.sdk||{},t.sdk.name=t.sdk.name||n.name,t.sdk.version=t.sdk.version||n.version,t.sdk.integrations=[...t.sdk.integrations||[],...n.integrations||[]],t.sdk.packages=[...t.sdk.packages||[],...n.packages||[]])}(t,e&&e.sdk);const i=function(t,n,e,r){const o=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...n&&{sdk:n},...!!e&&r&&{dsn:k(r)},...o&&{trace:j({...o})}}}(t,o,r,n);delete t.sdkProcessingMetadata;return Q(i,[[{type:s},t]])}const Wt="__SENTRY_SUPPRESS_TRACING__";function Yt(t){const n=$t(at());return n.suppressTracing?n.suppressTracing(t):function(...t){const n=$t(at());if(2===t.length){const[e,r]=t;return e?n.withSetScope(e,r):n.withScope(r)}return n.withScope(t[0])}((n=>(n.setSDKProcessingMetadata({[Wt]:!0}),t())))}function qt(t,n){const{fingerprint:e,span:r,breadcrumbs:o,sdkProcessingMetadata:s}=n;!function(t,n){const{extra:e,tags:r,user:o,contexts:s,level:i,transactionName:c}=n,u=j(e);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,n),r&&function(t,n){t.contexts={trace:At(n),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:zt(n),...t.sdkProcessingMetadata};const e=Bt(n),r=Ut(e).description;r&&!t.transaction&&"transaction"===t.type&&(t.transaction=r)}(t,r),function(t,n){t.fingerprint=t.fingerprint?function(t){return Array.isArray(t)?t:[t]}(t.fingerprint):[],n&&(t.fingerprint=t.fingerprint.concat(n));t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,e),function(t,n){const e=[...t.breadcrumbs||[],...n];t.breadcrumbs=e.length?e:void 0}(t,o),function(t,n){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...n}}(t,s)}const Ft="7";function Kt(t,n){return e={sentry_key:t.publicKey,sentry_version:Ft,...n&&{sentry_client:`${n.name}/${n.version}`}},Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&");var e}const Vt=64;function Zt(t,n,e=V(t.bufferSize||Vt)){let r={};return{send:function(o){const s=[];if(X(o,((n,e)=>{const o=rt(e);if(function(t,n,e=Date.now()){return function(t,n){return t[n]||t.all||0}(t,n)>e}(r,o)){const r=Qt(n,e);t.recordDroppedEvent("ratelimit_backoff",o,r)}else s.push(n)})),0===s.length)return F({});const i=Q(o[0],s),c=n=>{X(i,((e,r)=>{const o=Qt(e,r);t.recordDroppedEvent(n,rt(r),o)}))};return e.add((()=>n({body:nt(i)}).then((t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&ut&&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 ut&&N.error("Skipped sending event because buffer is full."),c("queue_overflow"),F({});throw t}))},flush:t=>e.drain(t)}}function Qt(t,n){if("event"===n||"transaction"===n)return Array.isArray(t)?t[1]:void 0}const Xt=Symbol("AgentBaseInternalState");class tn extends s.Agent{[Xt];options;keepAlive;constructor(t){super(t),this[Xt]={}}isSecureEndpoint(t){if(t){if("boolean"==typeof t.secureEndpoint)return t.secureEndpoint;if("string"==typeof t.protocol)return"https:"===t.protocol}const{stack:n}=new Error;return"string"==typeof n&&n.split("\n").some((t=>-1!==t.indexOf("(https.js:")||-1!==t.indexOf("node:https:")))}createSocket(t,n,e){const r={...n,secureEndpoint:this.isSecureEndpoint(n)};Promise.resolve().then((()=>this.connect(t,r))).then((o=>{if(o instanceof s.Agent)return o.addRequest(t,r);this[Xt].currentSocket=o,super.createSocket(t,n,e)}),e)}createConnection(){const t=this[Xt].currentSocket;if(this[Xt].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[Xt].defaultPort??("https:"===this.protocol?443:80)}set defaultPort(t){this[Xt]&&(this[Xt].defaultPort=t)}get protocol(){return this[Xt].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[Xt]&&(this[Xt].protocol=t)}}function nn(...t){N.log("[https-proxy-agent:parse-proxy-response]",...t)}function en(t){return new Promise(((n,e)=>{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 nn("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(),e(new Error("No header received from proxy CONNECT response"));const p=h.split(" "),l=+p[1],d=p.slice(2).join(" "),m={};for(const n of f){if(!n)continue;const r=n.indexOf(":");if(-1===r)return t.destroy(),e(new Error(`Invalid header from proxy CONNECT response: "${n}"`));const o=n.slice(0,r).toLowerCase(),s=n.slice(r+1).trimStart(),i=m[o];"string"==typeof i?m[o]=[i,s]:Array.isArray(i)?i.push(s):m[o]=s}nn("got proxy server response: %o %o",h,m),i(),n({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(),nn("onend"),e(new Error("Proxy connection ended before receiving CONNECT response"))}function u(t){i(),nn("onerror %o",t),e(t)}t.on("error",u),t.on("end",c),s()}))}function rn(...t){N.log("[https-proxy-agent]",...t)}class on extends tn{static protocols=["http","https"];proxy;proxyHeaders;connectOpts;constructor(t,n){super(n),this.options={},this.proxy="string"==typeof t?new URL(t):t,this.proxyHeaders=n?.headers??{},rn("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const e=(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"],...n?cn(n,"headers"):null,host:e,port:r}}async connect(t,n){const{proxy:e}=this;if(!n.host)throw new TypeError('No "host" provided');let r;if("https:"===e.protocol){rn("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 rn("Creating `net.Socket`: %o",this.connectOpts),r=a.connect(this.connectOpts);const o="function"==typeof this.proxyHeaders?this.proxyHeaders():{...this.proxyHeaders},s=a.isIPv6(n.host)?`[${n.host}]`:n.host;let i=`CONNECT ${s}:${n.port} HTTP/1.1\r\n`;if(e.username||e.password){const t=`${decodeURIComponent(e.username)}:${decodeURIComponent(e.password)}`;o["Proxy-Authorization"]=`Basic ${Buffer.from(t).toString("base64")}`}o.Host=`${s}:${n.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=en(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",sn),n.secureEndpoint){rn("Upgrading socket connection to TLS");const t=n.servername||n.host;return f.connect({...cn(n,"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=>{rn("Replaying proxy buffer for failed request"),t.push(h),t.push(null)})),p}}function sn(t){t.resume()}function cn(t,...n){const e={};let r;for(r in t)n.includes(r)||(e[r]=t[r]);return e}const un=32768;function an(t){return t.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}const fn=e;let hn,pn=!1;function ln(t){fn.debug&&console.log(`[ANR Worker] ${t}`)}var dn,mn,gn;const yn=function(t){let n;try{n=new URL(t.url)}catch(n){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.")})),Zt(t,(()=>Promise.resolve({})))}const e="https:"===n.protocol,r=function(t,n){const{no_proxy:e}=process.env;return e&&e.split(",").some((n=>t.host.endsWith(n)||t.hostname.endsWith(n)))?void 0:n}(n,t.proxy||(e?process.env.https_proxy:void 0)||process.env.http_proxy),o=e?i:s,a=void 0!==t.keepAlive&&t.keepAlive,f=r?new on(r):new o.Agent({keepAlive:a,maxSockets:30,timeout:2e3});return Yt((()=>{const n=function(t,n,e){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>un&&(d["content-encoding"]="gzip",l=l.pipe(u()));const m=n.request({method:"POST",agent:e,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 n=t.headers["retry-after"]??null,e=t.headers["x-sentry-rate-limits"]??null;h({statusCode:t.statusCode,headers:{"retry-after":n,"x-sentry-rate-limits":Array.isArray(e)?e[0]:e}})}));m.on("error",p),l.pipe(m)}))}}(t,t.httpModule??o,f);return Zt(t,n)}))}({url:(dn=fn.dsn,mn=fn.tunnel,gn=fn.sdkMetadata.sdk,mn||`${function(t){return`${function(t){const n=t.protocol?`${t.protocol}:`:"",e=t.port?`:${t.port}`:"";return`${n}//${t.host}${e}${t.path?`/${t.path}`:""}/api/`}(t)}${t.projectId}/envelope/`}(dn)}?${Kt(dn,gn)}`),recordDroppedEvent:()=>{}});async function bn(){if(hn){ln("Sending abnormal session"),pt(hn,{status:"abnormal",abnormal_mechanism:"anr_foreground"});const t=function(t,n,e,r){const o=ot(e);return Q({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&n&&{dsn:k(n)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(hn,fn.dsn,fn.sdkMetadata,fn.tunnel);ln(JSON.stringify(t)),await yn.send(t);try{n?.postMessage("session-ended")}catch(t){}}}function vn(t){if(!t)return;const n=function(t){if(!t.length)return[];const n=Array.from(t);return/sentryWrapped/.test(n[n.length-1].function||"")&&n.pop(),n.reverse(),P.test(n[n.length-1].function||"")&&(n.pop(),P.test(n[n.length-1].function||"")&&n.pop()),n.slice(0,A).map((t=>({...t,filename:t.filename||n[n.length-1].filename,function:t.function||I})))}(t);if(fn.appRootPath)for(const t of n)t.filename&&(t.filename=H(t.filename,fn.appRootPath));return n}async function _n(t,n){if(pn)return;pn=!0,await bn(),ln("Sending event");const e={event_id:G(),contexts:fn.contexts,release:fn.release,environment:fn.environment,dist:fn.dist,platform:"node",level:"error",exception:{values:[{type:"ApplicationNotResponding",value:`Application Not Responding for at least ${fn.anrThreshold} ms`,stacktrace:{frames:vn(t)},mechanism:{type:"ANR"}}]},tags:fn.staticTags};n&&function(t,n){if(qt(t,n),!t.contexts?.trace){const{traceId:e,spanId:r,parentSpanId:o}=n.propagationContext;t.contexts={trace:{trace_id:e,span_id:r,parent_span_id:o},...t.contexts}}}(e,n);const r=Ht(e,fn.dsn,fn.sdkMetadata,fn.tunnel);ln(JSON.stringify(r)),await yn.send(r),await yn.flush(2e3),setTimeout((()=>{process.exit(0)}),5e3)}let wn;if(ln("Started"),fn.captureStackTrace){ln("Connecting to debugger");const n=new t;n.connectToMainThread(),ln("Connected to debugger");const e=new Map;n.on("Debugger.scriptParsed",(t=>{e.set(t.params.scriptId,t.params.url)})),n.on("Debugger.paused",(t=>{if("other"===t.params.reason)try{ln("Debugger paused");const s=[...t.params.callFrames],i=fn.appRootPath?function(t=(process.argv[1]?Y(process.argv[1]):process.cwd()),n="\\"===o){const e=n?an(t):t;return t=>{if(!t)return;const o=n?an(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(e)){let t=s.slice(e.length+1).replace(/\//g,".");return t&&(t+=":"),t+=i,t}return i}}(fn.appRootPath):()=>{},c=s.map((t=>function(t,n,e){const r=n?n.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:e(r),function:t.functionName||I,colno:o,lineno:s,in_app:r?Z(r):void 0})}(t,e.get(t.location.scriptId),i))),u=setTimeout((()=>{_n(c).then(null,(()=>{ln("Sending ANR event failed.")}))}),5e3);n.post("Runtime.evaluate",{expression:"global.__SENTRY_GET_SCOPES__();",silent:!0,returnByValue:!0},((t,e)=>{t&&ln(`Error executing script: '${t.message}'`),clearTimeout(u);const r=e&&e.result?e.result.value:void 0;n.post("Debugger.resume"),n.post("Debugger.disable"),_n(c,r).then(null,(()=>{ln("Sending ANR event failed.")}))}))}catch(t){throw n.post("Debugger.resume"),n.post("Debugger.disable"),t}})),wn=()=>{try{n.post("Debugger.enable",(()=>{n.post("Debugger.pause")}))}catch(t){}}}const{poll:Sn}=function(t,n,e,r){const o=t();let s=!1,i=!0;return setInterval((()=>{const t=o.getTimeMs();!1===s&&t>n+e&&(s=!0,i&&r()),t<n+e&&(s=!1)}),20),{poll:()=>{o.reset()},enabled:t=>{i=t}}}((function(){let t=process.hrtime();return{getTimeMs:()=>{const[n,e]=process.hrtime(t);return Math.floor(1e3*n+e/1e6)},reset:()=>{t=process.hrtime()}}}),fn.pollInterval,fn.anrThreshold,(function(){ln("Watchdog timeout"),wn?(ln("Pausing debugger to capture stack trace"),wn()):(ln("Capturing event without a stack trace"),_n().then(null,(()=>{ln("Sending ANR event failed on watchdog timeout.")})))}));n?.on("message",(t=>{t.session&&(hn=ht(t.session)),Sn()}));
|
package/esm/integrations/http.js
CHANGED
|
@@ -1,112 +1,135 @@
|
|
|
1
1
|
import { _optionalChain } from '@sentry/utils';
|
|
2
2
|
import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { getClient, addOpenTelemetryInstrumentation } from '@sentry/opentelemetry';
|
|
4
|
+
import { isSentryRequestUrl, getCapturedScopesOnSpan, getIsolationScope, getCurrentScope, setCapturedScopesOnSpan, defineIntegration, addBreadcrumb } from '@sentry/core';
|
|
5
5
|
import { stripUrlQueryAndFragment, parseUrl, getSanitizedUrlString } from '@sentry/utils';
|
|
6
6
|
import { setIsolationScope } from '../sdk/scope.js';
|
|
7
7
|
import { addOriginToSpan } from '../utils/addOriginToSpan.js';
|
|
8
8
|
import { getRequestUrl } from '../utils/getRequestUrl.js';
|
|
9
9
|
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
const INTEGRATION_NAME = 'Http';
|
|
11
|
+
|
|
12
|
+
let _httpOptions = {};
|
|
13
|
+
let _httpInstrumentation;
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Instrument the HTTP module.
|
|
17
|
+
* This can only be instrumented once! If this called again later, we just update the options.
|
|
18
|
+
*/
|
|
19
|
+
const instrumentHttp = Object.assign(
|
|
20
|
+
function () {
|
|
21
|
+
if (_httpInstrumentation) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
const _InstrumentationClass = _httpOptions._instrumentation || HttpInstrumentation;
|
|
26
|
+
|
|
27
|
+
_httpInstrumentation = new _InstrumentationClass({
|
|
28
|
+
ignoreOutgoingRequestHook: request => {
|
|
29
|
+
const url = getRequestUrl(request);
|
|
30
|
+
|
|
31
|
+
if (!url) {
|
|
32
|
+
return false;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (isSentryRequestUrl(url, getClient())) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
const _ignoreOutgoingRequests = _httpOptions.ignoreOutgoingRequests;
|
|
40
|
+
if (_ignoreOutgoingRequests && _ignoreOutgoingRequests(url)) {
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
return false;
|
|
45
|
+
},
|
|
46
|
+
|
|
47
|
+
ignoreIncomingRequestHook: request => {
|
|
48
|
+
const url = getRequestUrl(request);
|
|
49
|
+
|
|
50
|
+
const method = _optionalChain([request, 'access', _ => _.method, 'optionalAccess', _2 => _2.toUpperCase, 'call', _3 => _3()]);
|
|
51
|
+
// We do not capture OPTIONS/HEAD requests as transactions
|
|
52
|
+
if (method === 'OPTIONS' || method === 'HEAD') {
|
|
53
|
+
return true;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const _ignoreIncomingRequests = _httpOptions.ignoreIncomingRequests;
|
|
57
|
+
if (_ignoreIncomingRequests && _ignoreIncomingRequests(url)) {
|
|
58
|
+
return true;
|
|
59
|
+
}
|
|
15
60
|
|
|
61
|
+
return false;
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
requireParentforOutgoingSpans: false,
|
|
65
|
+
requireParentforIncomingSpans: false,
|
|
66
|
+
requestHook: (span, req) => {
|
|
67
|
+
addOriginToSpan(span, 'auto.http.otel.http');
|
|
68
|
+
|
|
69
|
+
// both, incoming requests and "client" requests made within the app trigger the requestHook
|
|
70
|
+
// we only want to isolate and further annotate incoming requests (IncomingMessage)
|
|
71
|
+
if (_isClientRequest(req)) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
const scopes = getCapturedScopesOnSpan(span);
|
|
76
|
+
|
|
77
|
+
const isolationScope = (scopes.isolationScope || getIsolationScope()).clone();
|
|
78
|
+
const scope = scopes.scope || getCurrentScope();
|
|
79
|
+
|
|
80
|
+
// Update the isolation scope, isolate this request
|
|
81
|
+
isolationScope.setSDKProcessingMetadata({ request: req });
|
|
82
|
+
|
|
83
|
+
const client = getClient();
|
|
84
|
+
if (client && client.getOptions().autoSessionTracking) {
|
|
85
|
+
isolationScope.setRequestSession({ status: 'ok' });
|
|
86
|
+
}
|
|
87
|
+
setIsolationScope(isolationScope);
|
|
88
|
+
setCapturedScopesOnSpan(span, scope, isolationScope);
|
|
89
|
+
|
|
90
|
+
// attempt to update the scope's `transactionName` based on the request URL
|
|
91
|
+
// Ideally, framework instrumentations coming after the HttpInstrumentation
|
|
92
|
+
// update the transactionName once we get a parameterized route.
|
|
93
|
+
const httpMethod = (req.method || 'GET').toUpperCase();
|
|
94
|
+
const httpTarget = stripUrlQueryAndFragment(req.url || '/');
|
|
95
|
+
|
|
96
|
+
const bestEffortTransactionName = `${httpMethod} ${httpTarget}`;
|
|
97
|
+
|
|
98
|
+
isolationScope.setTransactionName(bestEffortTransactionName);
|
|
99
|
+
},
|
|
100
|
+
responseHook: () => {
|
|
101
|
+
const client = getClient();
|
|
102
|
+
if (client && client.getOptions().autoSessionTracking) {
|
|
103
|
+
setImmediate(() => {
|
|
104
|
+
client['_captureRequestSession']();
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
applyCustomAttributesOnSpan: (
|
|
109
|
+
_span,
|
|
110
|
+
request,
|
|
111
|
+
response,
|
|
112
|
+
) => {
|
|
113
|
+
const _breadcrumbs = typeof _httpOptions.breadcrumbs === 'undefined' ? true : _httpOptions.breadcrumbs;
|
|
114
|
+
if (_breadcrumbs) {
|
|
115
|
+
_addRequestBreadcrumb(request, response);
|
|
116
|
+
}
|
|
117
|
+
},
|
|
118
|
+
});
|
|
119
|
+
|
|
120
|
+
addOpenTelemetryInstrumentation(_httpInstrumentation);
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
id: INTEGRATION_NAME,
|
|
124
|
+
},
|
|
125
|
+
);
|
|
126
|
+
|
|
127
|
+
const _httpIntegration = ((options = {}) => {
|
|
16
128
|
return {
|
|
17
|
-
name:
|
|
129
|
+
name: INTEGRATION_NAME,
|
|
18
130
|
setupOnce() {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
ignoreOutgoingRequestHook: request => {
|
|
22
|
-
const url = getRequestUrl(request);
|
|
23
|
-
|
|
24
|
-
if (!url) {
|
|
25
|
-
return false;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
if (isSentryRequestUrl(url, getClient())) {
|
|
29
|
-
return true;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (_ignoreOutgoingRequests && _ignoreOutgoingRequests(url)) {
|
|
33
|
-
return true;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
return false;
|
|
37
|
-
},
|
|
38
|
-
|
|
39
|
-
ignoreIncomingRequestHook: request => {
|
|
40
|
-
const url = getRequestUrl(request);
|
|
41
|
-
|
|
42
|
-
const method = _optionalChain([request, 'access', _ => _.method, 'optionalAccess', _2 => _2.toUpperCase, 'call', _3 => _3()]);
|
|
43
|
-
// We do not capture OPTIONS/HEAD requests as transactions
|
|
44
|
-
if (method === 'OPTIONS' || method === 'HEAD') {
|
|
45
|
-
return true;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
if (_ignoreIncomingRequests && _ignoreIncomingRequests(url)) {
|
|
49
|
-
return true;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return false;
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
requireParentforOutgoingSpans: false,
|
|
56
|
-
requireParentforIncomingSpans: false,
|
|
57
|
-
requestHook: (span, req) => {
|
|
58
|
-
addOriginToSpan(span, 'auto.http.otel.http');
|
|
59
|
-
|
|
60
|
-
// both, incoming requests and "client" requests made within the app trigger the requestHook
|
|
61
|
-
// we only want to isolate and further annotate incoming requests (IncomingMessage)
|
|
62
|
-
if (_isClientRequest(req)) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
const scopes = getCapturedScopesOnSpan(span);
|
|
67
|
-
|
|
68
|
-
const isolationScope = (scopes.isolationScope || getIsolationScope()).clone();
|
|
69
|
-
const scope = scopes.scope || getCurrentScope();
|
|
70
|
-
|
|
71
|
-
// Update the isolation scope, isolate this request
|
|
72
|
-
isolationScope.setSDKProcessingMetadata({ request: req });
|
|
73
|
-
|
|
74
|
-
const client = getClient();
|
|
75
|
-
if (client && client.getOptions().autoSessionTracking) {
|
|
76
|
-
isolationScope.setRequestSession({ status: 'ok' });
|
|
77
|
-
}
|
|
78
|
-
setIsolationScope(isolationScope);
|
|
79
|
-
setCapturedScopesOnSpan(span, scope, isolationScope);
|
|
80
|
-
|
|
81
|
-
// attempt to update the scope's `transactionName` based on the request URL
|
|
82
|
-
// Ideally, framework instrumentations coming after the HttpInstrumentation
|
|
83
|
-
// update the transactionName once we get a parameterized route.
|
|
84
|
-
const httpMethod = (req.method || 'GET').toUpperCase();
|
|
85
|
-
const httpTarget = stripUrlQueryAndFragment(req.url || '/');
|
|
86
|
-
|
|
87
|
-
const bestEffortTransactionName = `${httpMethod} ${httpTarget}`;
|
|
88
|
-
|
|
89
|
-
isolationScope.setTransactionName(bestEffortTransactionName);
|
|
90
|
-
},
|
|
91
|
-
responseHook: () => {
|
|
92
|
-
const client = getClient();
|
|
93
|
-
if (client && client.getOptions().autoSessionTracking) {
|
|
94
|
-
setImmediate(() => {
|
|
95
|
-
client['_captureRequestSession']();
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
},
|
|
99
|
-
applyCustomAttributesOnSpan: (
|
|
100
|
-
_span,
|
|
101
|
-
request,
|
|
102
|
-
response,
|
|
103
|
-
) => {
|
|
104
|
-
if (_breadcrumbs) {
|
|
105
|
-
_addRequestBreadcrumb(request, response);
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
}),
|
|
109
|
-
);
|
|
131
|
+
_httpOptions = options;
|
|
132
|
+
instrumentHttp();
|
|
110
133
|
},
|
|
111
134
|
};
|
|
112
135
|
}) ;
|
|
@@ -179,5 +202,5 @@ function _isClientRequest(req) {
|
|
|
179
202
|
return 'outputData' in req && 'outputSize' in req && !('client' in req) && !('statusCode' in req);
|
|
180
203
|
}
|
|
181
204
|
|
|
182
|
-
export { httpIntegration };
|
|
205
|
+
export { httpIntegration, instrumentHttp };
|
|
183
206
|
//# sourceMappingURL=http.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"http.js","sources":["../../../src/integrations/http.ts"],"sourcesContent":["import type { ClientRequest, ServerResponse } from 'node:http';\nimport type { Span } 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 } from '@sentry/opentelemetry';\nimport type { IntegrationFn, SanitizedRequestData } from '@sentry/types';\n\nimport { getSanitizedUrlString, parseUrl, 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: () => {\n const client = getClient<NodeClient>();\n if (client && client.getOptions().autoSessionTracking) {\n setImmediate(() => {\n client['_captureRequestSession']();\n });\n }\n },\n applyCustomAttributesOnSpan: (\n _span: Span,\n request: ClientRequest | HTTPModuleRequestIncomingMessage,\n response: HTTPModuleRequestIncomingMessage | ServerResponse,\n ) => {\n if (_breadcrumbs) {\n _addRequestBreadcrumb(request, response);\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(\n request: ClientRequest | HTTPModuleRequestIncomingMessage,\n response: HTTPModuleRequestIncomingMessage | ServerResponse,\n): void {\n // Only generate breadcrumbs for outgoing requests\n if (!_isClientRequest(request)) {\n return;\n }\n\n const data = getBreadcrumbData(request);\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 request,\n response,\n },\n );\n}\n\nfunction getBreadcrumbData(request: ClientRequest): Partial<SanitizedRequestData> {\n try {\n // `request.host` does not contain the port, but the host header does\n const host = request.getHeader('host') || request.host;\n const url = new URL(request.path, `${request.protocol}//${host}`);\n const parsedUrl = parseUrl(url.toString());\n\n const data: Partial<SanitizedRequestData> = {\n url: getSanitizedUrlString(parsedUrl),\n 'http.method': request.method || 'GET',\n };\n\n if (parsedUrl.search) {\n data['http.query'] = parsedUrl.search;\n }\n if (parsedUrl.hash) {\n data['http.fragment'] = parsedUrl.hash;\n }\n\n return data;\n } catch {\n return {};\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 | HTTPModuleRequestIncomingMessage): req is ClientRequest {\n return 'outputData' in req && 'outputSize' in req && !('client' in req) && !('statusCode' in req);\n}\n"],"names":[],"mappings":";;;;;;;;;AA+CA,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,C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A,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, ServerResponse } from 'node:http';\nimport type { Span } 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 } from '@sentry/opentelemetry';\nimport type { IntegrationFn, SanitizedRequestData } from '@sentry/types';\n\nimport { getSanitizedUrlString, parseUrl, 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\nconst INTEGRATION_NAME = 'Http';\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\nlet _httpOptions: HttpOptions = {};\nlet _httpInstrumentation: HttpInstrumentation | undefined;\n\n/**\n * Instrument the HTTP module.\n * This can only be instrumented once! If this called again later, we just update the options.\n */\nexport const instrumentHttp = Object.assign(\n function (): void {\n if (_httpInstrumentation) {\n return;\n }\n\n const _InstrumentationClass = _httpOptions._instrumentation || HttpInstrumentation;\n\n _httpInstrumentation = 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 const _ignoreOutgoingRequests = _httpOptions.ignoreOutgoingRequests;\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 const _ignoreIncomingRequests = _httpOptions.ignoreIncomingRequests;\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: () => {\n const client = getClient<NodeClient>();\n if (client && client.getOptions().autoSessionTracking) {\n setImmediate(() => {\n client['_captureRequestSession']();\n });\n }\n },\n applyCustomAttributesOnSpan: (\n _span: Span,\n request: ClientRequest | HTTPModuleRequestIncomingMessage,\n response: HTTPModuleRequestIncomingMessage | ServerResponse,\n ) => {\n const _breadcrumbs = typeof _httpOptions.breadcrumbs === 'undefined' ? true : _httpOptions.breadcrumbs;\n if (_breadcrumbs) {\n _addRequestBreadcrumb(request, response);\n }\n },\n });\n\n addOpenTelemetryInstrumentation(_httpInstrumentation);\n },\n {\n id: INTEGRATION_NAME,\n },\n);\n\nconst _httpIntegration = ((options: HttpOptions = {}) => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n _httpOptions = options;\n instrumentHttp();\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(\n request: ClientRequest | HTTPModuleRequestIncomingMessage,\n response: HTTPModuleRequestIncomingMessage | ServerResponse,\n): void {\n // Only generate breadcrumbs for outgoing requests\n if (!_isClientRequest(request)) {\n return;\n }\n\n const data = getBreadcrumbData(request);\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 request,\n response,\n },\n );\n}\n\nfunction getBreadcrumbData(request: ClientRequest): Partial<SanitizedRequestData> {\n try {\n // `request.host` does not contain the port, but the host header does\n const host = request.getHeader('host') || request.host;\n const url = new URL(request.path, `${request.protocol}//${host}`);\n const parsedUrl = parseUrl(url.toString());\n\n const data: Partial<SanitizedRequestData> = {\n url: getSanitizedUrlString(parsedUrl),\n 'http.method': request.method || 'GET',\n };\n\n if (parsedUrl.search) {\n data['http.query'] = parsedUrl.search;\n }\n if (parsedUrl.hash) {\n data['http.fragment'] = parsedUrl.hash;\n }\n\n return data;\n } catch {\n return {};\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 | HTTPModuleRequestIncomingMessage): req is ClientRequest {\n return 'outputData' in req && 'outputSize' in req && !('client' in req) && !('statusCode' in req);\n}\n"],"names":[],"mappings":";;;;;;;;;AAwBA,CAAM,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAmB,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM;;AAyB/B,CAAI,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAA4B,EAAA,CAAA,CAAE;AAClC,CAAA,CAAA,EAAI,oBAAoB;;AAExB,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA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A,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 { LRUMap, logger } from '@sentry/utils';
|
|
|
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 = '
|
|
8
|
+
const base64WorkerScript = 'LyohIEBzZW50cnkvbm9kZSA4LjYuMCAoNzQ4MDk5MikgfCBodHRwczovL2dpdGh1Yi5jb20vZ2V0c2VudHJ5L3NlbnRyeS1qYXZhc2NyaXB0ICovCmltcG9ydHtTZXNzaW9uIGFzIGV9ZnJvbSJub2RlOmluc3BlY3Rvci9wcm9taXNlcyI7aW1wb3J0e3dvcmtlckRhdGEgYXMgbixwYXJlbnRQb3J0IGFzIHR9ZnJvbSJub2RlOndvcmtlcl90aHJlYWRzIjtpbXBvcnR7cG9zaXggYXMgbyxzZXAgYXMgcn1mcm9tIm5vZGU6cGF0aCI7Y29uc3QgaT01MCxzPSI/IixjPS9cKGVycm9yOiAoLiopXCkvLGE9L2NhcHR1cmVNZXNzYWdlfGNhcHR1cmVFeGNlcHRpb24vO2NvbnN0IHU9L14oXFMrOlxcfFwvPykoW1xzXFNdKj8pKCg/OlwuezEsMn18W14vXFxdKz98KShcLlteLi9cXF0qfCkpKD86Wy9cXF0qKSQvO2Z1bmN0aW9uIGYoZSl7Y29uc3Qgbj1mdW5j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1cmluZyBvZiBjYXVnaHQgZXhjZXB0aW9ucyBmb3IgJHtlfSBzZWNvbmRzLmApLGF3YWl0IG4ucG9zdCgiRGVidWdnZXIuc2V0UGF1c2VPbkV4Y2VwdGlvbnMiLHtzdGF0ZToidW5jYXVnaHQifSl9KSl9fSkoKS5jYXRjaCgoZT0+e2IoIkZhaWxlZCB0byBzdGFydCBkZWJ1Z2dlciIsZSl9KSksc2V0SW50ZXJ2YWwoKCgpPT57fSksMWU0KTs=';
|
|
9
9
|
|
|
10
10
|
function log(...args) {
|
|
11
11
|
logger.log('[LocalVariables]', ...args);
|
|
@@ -72,7 +72,7 @@ const localVariablesAsyncIntegration = defineIntegration(((
|
|
|
72
72
|
|
|
73
73
|
async function startInspector() {
|
|
74
74
|
// We load inspector dynamically because on some platforms Node is built without inspector support
|
|
75
|
-
const inspector = await import('inspector');
|
|
75
|
+
const inspector = await import('node:inspector');
|
|
76
76
|
if (!inspector.url()) {
|
|
77
77
|
inspector.open(0);
|
|
78
78
|
}
|