@sentry/node 8.0.0-beta.1 → 8.0.0-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/cjs/index.js +297 -163
  2. package/cjs/index.js.map +1 -1
  3. package/esm/index.js +295 -165
  4. package/esm/index.js.map +1 -1
  5. package/esm/integrations/anr/worker-script.js +2 -2
  6. package/esm/integrations/local-variables/worker-script.js +2 -0
  7. package/package.json +15 -14
  8. package/types/index.d.ts +3 -2
  9. package/types/index.d.ts.map +1 -1
  10. package/types/integrations/anr/index.d.ts +1 -0
  11. package/types/integrations/anr/index.d.ts.map +1 -1
  12. package/types/integrations/http.d.ts +3 -0
  13. package/types/integrations/http.d.ts.map +1 -1
  14. package/types/integrations/local-variables/common.d.ts +12 -0
  15. package/types/integrations/local-variables/common.d.ts.map +1 -1
  16. package/types/integrations/local-variables/index.d.ts +3 -1
  17. package/types/integrations/local-variables/index.d.ts.map +1 -1
  18. package/types/integrations/local-variables/local-variables-async.d.ts +7 -0
  19. package/types/integrations/local-variables/local-variables-async.d.ts.map +1 -0
  20. package/types/integrations/local-variables/worker.d.ts +2 -0
  21. package/types/integrations/local-variables/worker.d.ts.map +1 -0
  22. package/types/integrations/node-fetch.d.ts.map +1 -1
  23. package/types/integrations/tracing/connect.d.ts +7 -0
  24. package/types/integrations/tracing/connect.d.ts.map +1 -0
  25. package/types/integrations/tracing/express.d.ts.map +1 -1
  26. package/types/integrations/tracing/fastify.d.ts.map +1 -1
  27. package/types/integrations/tracing/graphql.d.ts.map +1 -1
  28. package/types/integrations/tracing/hapi/index.d.ts.map +1 -1
  29. package/types/integrations/tracing/index.d.ts.map +1 -1
  30. package/types/integrations/tracing/koa.d.ts.map +1 -1
  31. package/types/integrations/tracing/mongo.d.ts.map +1 -1
  32. package/types/integrations/tracing/mongoose.d.ts.map +1 -1
  33. package/types/integrations/tracing/mysql.d.ts.map +1 -1
  34. package/types/integrations/tracing/mysql2.d.ts.map +1 -1
  35. package/types/integrations/tracing/nest.d.ts.map +1 -1
  36. package/types/integrations/tracing/postgres.d.ts.map +1 -1
  37. package/types/integrations/tracing/prisma.d.ts.map +1 -1
  38. package/types/sdk/initOtel.d.ts.map +1 -1
  39. package/types-ts3.8/index.d.ts +3 -2
  40. package/types-ts3.8/integrations/anr/index.d.ts +1 -0
  41. package/types-ts3.8/integrations/http.d.ts +3 -0
  42. package/types-ts3.8/integrations/local-variables/common.d.ts +12 -0
  43. package/types-ts3.8/integrations/local-variables/index.d.ts +3 -1
  44. package/types-ts3.8/integrations/local-variables/local-variables-async.d.ts +7 -0
  45. package/types-ts3.8/integrations/local-variables/worker.d.ts +2 -0
  46. package/types-ts3.8/integrations/tracing/connect.d.ts +7 -0
  47. package/types/integrations/anr/worker-script.d.ts +0 -2
  48. package/types/integrations/anr/worker-script.d.ts.map +0 -1
  49. package/types-ts3.8/integrations/anr/worker-script.d.ts +0 -2
@@ -1,2 +1,2 @@
1
- /*! @sentry/node 8.0.0-beta.1 (5bcb91f) | https://github.com/getsentry/sentry-javascript */
2
- import{Session as t}from"inspector";import{workerData as e,parentPort as n}from"worker_threads";import{posix as r,sep as s}from"path";import*as o from"node:http";import*as i from"node:https";import{Readable as c}from"stream";import{createGzip as u}from"zlib";import*as a from"net";import*as f from"tls";import*as h from"http";const l=Object.prototype.toString;function p(t,e){return l.call(t)===`[object ${e}]`}function d(t){return p(t,"Object")}function m(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function g(t,e){try{return t instanceof e}catch(t){return!1}}const y=globalThis;function b(t,e,n){const r=n||y,s=r.__SENTRY__=r.__SENTRY__||{};return s[t]||(s[t]=e())}const v=y,_=80;function w(t,e){const n=t,r=[];let s,o,i,c,u;if(!n||!n.tagName)return"";if(v.HTMLElement&&n instanceof HTMLElement&&n.dataset){if(n.dataset.sentryComponent)return n.dataset.sentryComponent;if(n.dataset.sentryElement)return n.dataset.sentryElement}r.push(n.tagName.toLowerCase());const a=e&&e.length?e.filter((t=>n.getAttribute(t))).map((t=>[t,n.getAttribute(t)])):null;if(a&&a.length)a.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else if(n.id&&r.push(`#${n.id}`),s=n.className,s&&p(s,"String"))for(o=s.split(/\s+/),u=0;u<o.length;u++)r.push(`.${o[u]}`);const f=["aria-label","type","name","title","alt"];for(u=0;u<f.length;u++)i=f[u],c=n.getAttribute(i),c&&r.push(`[${i}="${c}"]`);return r.join("")}const S="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,E=["debug","info","warn","error","log","assert","trace"],$={};function x(t){if(!("console"in y))return t();const e=y.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 N=function(){let t=!1;const e={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return S?E.forEach((n=>{e[n]=(...e)=>{t&&x((()=>{y.console[n](`Sentry Logger [${n}]:`,...e)}))}})):E.forEach((t=>{e[t]=()=>{}})),e}();function C(t,e=!1){const{host:n,path:r,pass:s,port:o,projectId:i,protocol:c,publicKey:u}=t;return`${c}://${u}${e&&s?`:${s}`:""}@${n}${o?`:${o}`:""}/${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 A(t){if(function(t){switch(l.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return g(t,Error)}}(t))return{message:t.message,name:t.name,stack:t.stack,...D(t)};if(e=t,"undefined"!=typeof Event&&g(e,Event)){const e={type:t.type,target:T(t.target),currentTarget:T(t.currentTarget),...D(t)};return"undefined"!=typeof CustomEvent&&g(t,CustomEvent)&&(e.detail=t.detail),e}return t;var e}function T(t){try{return e=t,"undefined"!=typeof Element&&g(e,Element)?function(t,e={}){if(!t)return"<unknown>";try{let n=t;const r=5,s=[];let o=0,i=0;const c=" > ",u=c.length;let a;const f=Array.isArray(e)?e:e.keyAttrs,h=!Array.isArray(e)&&e.maxStringLength||_;for(;n&&o++<r&&(a=w(n,f),!("html"===a||o>1&&i+s.length*u+a.length>=h));)s.push(a),i+=a.length,n=n.parentNode;return s.reverse().join(c)}catch(t){return"<unknown>"}}(t):Object.prototype.toString.call(t)}catch(t){return"<unknown>"}var e}function D(t){if("object"==typeof t&&null!==t){const e={};for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}return{}}function j(t){return O(t,new Map)}function O(t,e){if(function(t){if(!d(t))return!1;try{const e=Object.getPrototypeOf(t).constructor.name;return!e||"Object"===e}catch(t){return!0}}(t)){const n=e.get(t);if(void 0!==n)return n;const r={};e.set(t,r);for(const n of Object.keys(t))void 0!==t[n]&&(r[n]=O(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(O(t,e))})),r}return t}const R=50,I="?",P=/captureMessage|captureException/;const U="<anonymous>";function M(){const t=y,e=t.crypto||t.msCrypto;let n=()=>16*Math.random();try{if(e&&e.randomUUID)return e.randomUUID().replace(/-/g,"");e&&e.getRandomValues&&(n=()=>{const t=new Uint8Array(1);return e.getRandomValues(t),t[0]})}catch(t){}return([1e7]+1e3+4e3+8e3+1e11).replace(/[018]/g,(t=>(t^(15&n())>>t/4).toString(16)))}function B(t,e=100,n=1/0){try{return L("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function L(t,e,n=1/0,r=1/0,s=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[o,i]=s;if(null==e||["number","boolean","string"].includes(typeof e)&&!Number.isNaN(e))return e;const c=function(t,e){try{if("domain"===t&&e&&"object"==typeof e&&e.t)return"[Domain]";if("domainEmitter"===t)return"[DomainEmitter]";if("undefined"!=typeof global&&e===global)return"[Global]";if("undefined"!=typeof window&&e===window)return"[Window]";if("undefined"!=typeof document&&e===document)return"[Document]";if("object"==typeof(n=e)&&null!==n&&(n.__isVue||n.o))return"[VueViewModel]";if(function(t){return d(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}(e))return"[SyntheticEvent]";if("number"==typeof e&&e!=e)return"[NaN]";if("function"==typeof e)return`[Function: ${function(t){try{return t&&"function"==typeof t&&t.name||U}catch(t){return U}}(e)}]`;if("symbol"==typeof e)return`[${String(e)}]`;if("bigint"==typeof e)return`[BigInt: ${String(e)}]`;const r=function(t){const e=Object.getPrototypeOf(t);return e?e.constructor.name:"null prototype"}(e);return/^HTML(\w*)Element$/.test(r)?`[HTMLElement: ${r}]`:`[object ${r}]`}catch(t){return`**non-serializable** (${t})`}var n}(t,e);if(!c.startsWith("[object "))return c;if(e.__sentry_skip_normalization__)return e;const u="number"==typeof e.__sentry_override_normalization_depth__?e.__sentry_override_normalization_depth__:n;if(0===u)return c.replace("object ","");if(o(e))return"[Circular ~]";const a=e;if(a&&"function"==typeof a.toJSON)try{return L("",a.toJSON(),u-1,r,s)}catch(t){}const f=Array.isArray(e)?[]:{};let h=0;const l=A(e);for(const t in l){if(!Object.prototype.hasOwnProperty.call(l,t))continue;if(h>=r){f[t]="[MaxProperties ~]";break}const e=l[t];f[t]=L(t,e,u-1,r,s),h++}return i(e),f}function G(t,e){const n=e.replace(/\\/g,"/").replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");let r=t;try{r=decodeURI(t)}catch(t){}return r.replace(/\\/g,"/").replace(/webpack:\/?/g,"").replace(new RegExp(`(file://)?/*${n}/*`,"ig"),"app:///")}const J=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function z(t){const e=function(t){const e=t.length>1024?`<truncated>${t.slice(-1024)}`:t,n=J.exec(e);return n?n.slice(1):[]}(t),n=e[0];let r=e[1];return n||r?(r&&(r=r.slice(0,r.length-1)),n+r):"."}var H;function W(t){return new Y((e=>{e(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(H||(H={}));class Y{constructor(t){Y.prototype.__init.call(this),Y.prototype.__init2.call(this),Y.prototype.__init3.call(this),Y.prototype.__init4.call(this),this.i=H.PENDING,this.u=[];try{t(this.h,this.l)}catch(t){this.l(t)}}then(t,e){return new Y(((n,r)=>{this.u.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this.p()}))}catch(t){return this.then((t=>t),t)}finally(t){return new Y(((e,n)=>{let r,s;return this.then((e=>{s=!1,r=e,t&&t()}),(e=>{s=!0,r=e,t&&t()})).then((()=>{s?n(r):e(r)}))}))}__init(){this.h=t=>{this.m(H.RESOLVED,t)}}__init2(){this.l=t=>{this.m(H.REJECTED,t)}}__init3(){this.m=(t,e)=>{this.i===H.PENDING&&(m(e)?e.then(this.h,this.l):(this.i=t,this.v=e,this.p()))}}__init4(){this.p=()=>{if(this.i===H.PENDING)return;const t=this.u.slice();this.u=[],t.forEach((t=>{t[0]||(this.i===H.RESOLVED&&t[1](this.v),this.i===H.REJECTED&&t[2](this.v),t[0]=!0)}))}}}function F(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 s=new k("Not adding Promise because buffer limit was reached."),new Y(((t,e)=>{e(s)}));var s;const o=r();return-1===e.indexOf(o)&&e.push(o),o.then((()=>n(o))).then(null,(()=>n(o).then(null,(()=>{})))),o},drain:function(t){return new Y(((n,r)=>{let s=e.length;if(!s)return n(!0);const o=setTimeout((()=>{t&&t>0&&n(!1)}),t);e.forEach((t=>{W(t).then((()=>{--s||(clearTimeout(o),n(!0))}),r)}))}))}}}function q(t,e=!1){return!(e||t&&!t.startsWith("/")&&!t.match(/^[A-Z]:/)&&!t.startsWith(".")&&!t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&void 0!==t&&!t.includes("node_modules/")}const K=1e3;function V(){return Date.now()/K}const Z=function(){const{performance:t}=y;if(!t||!t.now)return V;const e=Date.now()-t.now(),n=null==t.timeOrigin?e:t.timeOrigin;return()=>(n+t.now())/K}();function Q(t,e=[]){return[t,e]}function X(t,e){const n=t[1];for(const t of n){if(e(t,t[0].type))return!0}return!1}function tt(t){return y.__SENTRY__&&y.__SENTRY__.encodePolyfill?y.__SENTRY__.encodePolyfill(t):(new TextEncoder).encode(t)}function et(t){const[e,n]=t;let r=JSON.stringify(e);function s(t){"string"==typeof r?r="string"==typeof t?r+t:[tt(r),t]:r.push("string"==typeof t?tt(t):t)}for(const t of n){const[e,n]=t;if(s(`\n${JSON.stringify(e)}\n`),"string"==typeof n||n instanceof Uint8Array)s(n);else{let t;try{t=JSON.stringify(n)}catch(e){t=JSON.stringify(B(n))}s(t)}}return"string"==typeof r?r:function(t){const e=t.reduce(((t,e)=>t+e.length),0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(r)}(()=>{const{performance:t}=y;if(!t||!t.now)return;const e=36e5,n=t.now(),r=Date.now(),s=t.timeOrigin?Math.abs(t.timeOrigin+n-r):e,o=s<e,i=t.timing&&t.timing.navigationStart,c="number"==typeof i?Math.abs(i+n-r):e;(o||c<e)&&(s<=c&&t.timeOrigin)})();const nt={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function rt(t){return nt[t]}function st(t){if(!t||!t.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}const ot=6e4;function it(t,{statusCode:e,headers:n},r=Date.now()){const s={...t},o=n&&n["x-sentry-rate-limits"],i=n&&n["retry-after"];if(o)for(const t of o.trim().split(",")){const[e,n,,,o]=t.split(":",5),i=parseInt(e,10),c=1e3*(isNaN(i)?60:i);if(n)for(const t of n.split(";"))"metric_bucket"===t&&o&&!o.split(";").includes("custom")||(s[t]=r+c);else s.all=r+c}else i?s.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&&(s.all=r+6e4);return s}const ct="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function ut(){return at(y),y}function at(t){return t.__SENTRY__||(t.__SENTRY__={extensions:{}}),t.__SENTRY__}const ft="production";function ht(t){const e=Z(),n={sid:M(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return j({sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}})}(n)};return t&&lt(n,t),n}function lt(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Z(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:M()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}const pt="_sentrySpan";function dt(t,e){e?function(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch(n){S&&N.log(`Failed to add non-enumerable property "${e}" to object`,t)}}(t,pt,e):delete t[pt]}function mt(t){return t[pt]}class gt{constructor(){this._=!1,this.S=[],this.N=[],this.C=[],this.k=[],this.A={},this.T={},this.D={},this.j={},this.O={},this.R=yt()}clone(){const t=new gt;return t.C=[...this.C],t.T={...this.T},t.D={...this.D},t.j={...this.j},t.A=this.A,t.I=this.I,t.P=this.P,t.U=this.U,t.M=this.M,t.N=[...this.N],t.B=this.B,t.k=[...this.k],t.O={...this.O},t.R={...this.R},t.L=this.L,dt(t,mt(this)),t}setClient(t){this.L=t}getClient(){return this.L}addScopeListener(t){this.S.push(t)}addEventProcessor(t){return this.N.push(t),this}setUser(t){return this.A=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.P&&lt(this.P,{user:t}),this.G(),this}getUser(){return this.A}getRequestSession(){return this.B}setRequestSession(t){return this.B=t,this}setTags(t){return this.T={...this.T,...t},this.G(),this}setTag(t,e){return this.T={...this.T,[t]:e},this.G(),this}setExtras(t){return this.D={...this.D,...t},this.G(),this}setExtra(t,e){return this.D={...this.D,[t]:e},this.G(),this}setFingerprint(t){return this.M=t,this.G(),this}setLevel(t){return this.I=t,this.G(),this}setTransactionName(t){return this.U=t,this.G(),this}setContext(t,e){return null===e?delete this.j[t]:this.j[t]=e,this.G(),this}setSession(t){return t?this.P=t:delete this.P,this.G(),this}getSession(){return this.P}update(t){if(!t)return this;const e="function"==typeof t?t(this):t,[n,r]=e instanceof gt?[e.getScopeData(),e.getRequestSession()]:d(e)?[t,t.requestSession]:[],{tags:s,extra:o,user:i,contexts:c,level:u,fingerprint:a=[],propagationContext:f}=n||{};return this.T={...this.T,...s},this.D={...this.D,...o},this.j={...this.j,...c},i&&Object.keys(i).length&&(this.A=i),u&&(this.I=u),a.length&&(this.M=a),f&&(this.R=f),r&&(this.B=r),this}clear(){return this.C=[],this.T={},this.D={},this.A={},this.j={},this.I=void 0,this.U=void 0,this.M=void 0,this.B=void 0,this.P=void 0,dt(this,void 0),this.k=[],this.R=yt(),this.G(),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:V(),...t},s=this.C;return s.push(r),this.C=s.length>n?s.slice(-n):s,this.G(),this}getLastBreadcrumb(){return this.C[this.C.length-1]}clearBreadcrumbs(){return this.C=[],this.G(),this}addAttachment(t){return this.k.push(t),this}clearAttachments(){return this.k=[],this}getScopeData(){return{breadcrumbs:this.C,attachments:this.k,contexts:this.j,tags:this.T,extra:this.D,user:this.A,level:this.I,fingerprint:this.M||[],eventProcessors:this.N,propagationContext:this.R,sdkProcessingMetadata:this.O,transactionName:this.U,span:mt(this)}}setSDKProcessingMetadata(t){return this.O={...this.O,...t},this}setPropagationContext(t){return this.R=t,this}getPropagationContext(){return this.R}captureException(t,e){const n=e&&e.event_id?e.event_id:M();if(!this.L)return N.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this.L.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},this),n}captureMessage(t,e,n){const r=n&&n.event_id?n.event_id:M();if(!this.L)return N.warn("No client configured on scope - will not capture message!"),r;const s=new Error(t);return this.L.captureMessage(t,e,{originalException:t,syntheticException:s,...n,event_id:r},this),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:M();return this.L?(this.L.captureEvent(t,{...e,event_id:n},this),n):(N.warn("No client configured on scope - will not capture event!"),n)}G(){this._||(this._=!0,this.S.forEach((t=>{t(this)})),this._=!1)}}function yt(){return{traceId:M(),spanId:M().substring(16)}}const bt=parseFloat("8.0.0-beta.1"),vt=100;class _t{constructor(t,e,n,r=bt){let s,o;this.J=r,e?s=e:(s=new gt,s.setClient(t)),n?o=n:(o=new gt,o.setClient(t)),this.H=[{scope:s}],t&&this.bindClient(t),this.W=o}bindClient(t){const e=this.getStackTop();e.client=t,e.scope.setClient(t),t&&t.init()}withScope(t){const e=this.Y();let n;try{n=t(e)}catch(t){throw this.F(),t}return m(n)?n.then((t=>(this.F(),t)),(t=>{throw this.F(),t})):(this.F(),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]}captureException(t,e){const n=e&&e.event_id?e.event_id:M(),r=new Error("Sentry syntheticException");return this.getScope().captureException(t,{originalException:t,syntheticException:r,...e,event_id:n}),n}captureMessage(t,e,n){const r=n&&n.event_id?n.event_id:M(),s=new Error(t);return this.getScope().captureMessage(t,e,{originalException:t,syntheticException:s,...n,event_id:r}),r}captureEvent(t,e){const n=e&&e.event_id?e.event_id:M();return this.getScope().captureEvent(t,{...e,event_id:n}),n}addBreadcrumb(t,e){const{client:n}=this.getStackTop();if(!n)return;const{beforeBreadcrumb:r=null,maxBreadcrumbs:s=vt}=n.getOptions&&n.getOptions()||{};if(s<=0)return;const o={timestamp:V(),...t},i=r?x((()=>r(o,e))):o;null!==i&&(n.emit("beforeAddBreadcrumb",i,e),this.getIsolationScope().addBreadcrumb(i,s))}setUser(t){this.getIsolationScope().setUser(t)}setTags(t){this.getIsolationScope().setTags(t)}setExtras(t){this.getIsolationScope().setExtras(t)}setTag(t,e){this.getIsolationScope().setTag(t,e)}setExtra(t,e){this.getIsolationScope().setExtra(t,e)}setContext(t,e){this.getIsolationScope().setContext(t,e)}getIntegration(t){const e=this.getClient();if(!e)return null;try{return e.getIntegrationByName(t.id)||null}catch(e){return ct&&N.warn(`Cannot retrieve integration ${t.id} from the current Hub`),null}}captureSession(t=!1){if(t)return this.endSession();this.q()}endSession(){const t=this.getStackTop().scope,e=t.getSession();e&&function(t,e){let n={};e?n={status:e}:"ok"===t.status&&(n={status:"exited"}),lt(t,n)}(e),this.q(),t.setSession()}startSession(t){const{scope:e,client:n}=this.getStackTop(),{release:r,environment:s=ft}=n&&n.getOptions()||{},{userAgent:o}=y.navigator||{},i=ht({release:r,environment:s,user:e.getUser(),...o&&{userAgent:o},...t}),c=e.getSession&&e.getSession();return c&&"ok"===c.status&&lt(c,{status:"exited"}),this.endSession(),e.setSession(i),i}q(){const{scope:t,client:e}=this.getStackTop(),n=t.getSession();n&&e&&e.captureSession&&e.captureSession(n)}Y(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}F(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}}function wt(){const t=at(ut());return t.hub||(t.hub=new _t(void 0,b("defaultCurrentScope",(()=>new gt)),b("defaultIsolationScope",(()=>new gt)))),t.hub}function St(t){const e=at(t);return e.acs?e.acs:{withIsolationScope:xt,withScope:Et,withSetScope:$t,withSetIsolationScope:(t,e)=>xt(e),getCurrentScope:()=>wt().getScope(),getIsolationScope:()=>wt().getIsolationScope()}}function Et(t){return wt().withScope(t)}function $t(t,e){const n=wt();return n.withScope((()=>(n.getStackTop().scope=t,e(t))))}function xt(t){return wt().withScope((()=>t(wt().getIsolationScope())))}function Nt(){return St(ut()).getCurrentScope().getClient()}const Ct="sentry.source",kt="sentry.sample_rate",At="sentry.op",Tt="sentry.origin",Dt=0,jt=1,Ot=1;function Rt(t){const{spanId:e,traceId:n}=t.spanContext(),{data:r,op:s,parent_span_id:o,status:i,origin:c}=Ut(t);return j({data:r,op:s,parent_span_id:o,span_id:e,status:i,trace_id:n,origin:c})}function It(t){return"number"==typeof t?Pt(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Pt(t.getTime()):Z()}function Pt(t){return t>9999999999?t/1e3:t}function Ut(t){if(function(t){return"function"==typeof t.getSpanJSON}(t))return t.getSpanJSON();try{const{spanId:e,traceId:n}=t.spanContext();if(function(t){const e=t;return!!(e.attributes&&e.startTime&&e.name&&e.endTime&&e.status)}(t)){const{attributes:r,startTime:s,name:o,endTime:i,parentSpanId:c,status:u}=t;return j({span_id:e,trace_id:n,data:r,description:o,parent_span_id:c,start_timestamp:It(s),timestamp:It(i)||void 0,status:Mt(u),op:r[At],origin:r[Tt],K:void 0})}return{span_id:e,trace_id:n}}catch(t){return{}}}function Mt(t){if(t&&t.code!==Dt)return t.code===jt?"ok":t.message||"unknown_error"}const Bt="_sentryRootSpan";function Lt(t){return t[Bt]||t}const Gt="_frozenDsc";function Jt(t){const e=Nt();if(!e)return{};const n=function(t,e){const n=e.getOptions(),{publicKey:r}=e.getDsn()||{},s=j({environment:n.environment||ft,release:n.release,public_key:r,trace_id:t});return e.emit("createDsc",s),s}(Ut(t).trace_id||"",e),r=Lt(t);if(!r)return n;const s=r[Gt];if(s)return s;const o=Ut(r),i=o.data||{},c=i[kt];null!=c&&(n.sample_rate=`${c}`);const u=i[Ct];return u&&"url"!==u&&(n.transaction=o.description),n.sampled=String(function(t){const{traceFlags:e}=t.spanContext();return e===Ot}(r)),e.emit("createDsc",n),n}const zt="__SENTRY_SUPPRESS_TRACING__";function Ht(t){const e=St(ut());return e.suppressTracing?e.suppressTracing(t):function(...t){const e=St(ut());if(2===t.length){const[n,r]=t;return n?e.withSetScope(n,r):e.withScope(r)}return e.withScope(t[0])}((e=>(e.setSDKProcessingMetadata({[zt]:!0}),t())))}function Wt(t,e,n,r){const s=st(n),o=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 s=t.sdkProcessingMetadata&&t.sdkProcessingMetadata.dynamicSamplingContext;return{event_id:t.event_id,sent_at:(new Date).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:C(r)},...s&&{trace:j({...s})}}}(t,s,r,e);delete t.sdkProcessingMetadata;return Q(i,[[{type:o},t]])}function Yt(t,e){const{fingerprint:n,span:r,breadcrumbs:s,sdkProcessingMetadata:o}=e;!function(t,e){const{extra:n,tags:r,user:s,contexts:o,level:i,transactionName:c}=e,u=j(n);u&&Object.keys(u).length&&(t.extra={...u,...t.extra});const a=j(r);a&&Object.keys(a).length&&(t.tags={...a,...t.tags});const f=j(s);f&&Object.keys(f).length&&(t.user={...f,...t.user});const h=j(o);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:Rt(e),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:Jt(e),...t.sdkProcessingMetadata};const n=Lt(e),r=Ut(n).description;r&&!t.transaction&&"transaction"===t.type&&(t.transaction=r)}(t,r),function(t,e){t.fingerprint=t.fingerprint?function(t){return Array.isArray(t)?t:[t]}(t.fingerprint):[],e&&(t.fingerprint=t.fingerprint.concat(e));t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,n),function(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}(t,s),function(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}(t,o)}const Ft="7";function qt(t,e){return n={sentry_key:t.publicKey,sentry_version:Ft,...e&&{sentry_client:`${e.name}/${e.version}`}},Object.keys(n).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(n[t])}`)).join("&");var n}const Kt=30;function Vt(t,e,n=F(t.bufferSize||Kt)){let r={};return{send:function(s){const o=[];if(X(s,((e,n)=>{const s=rt(n);if(function(t,e,n=Date.now()){return function(t,e){return t[e]||t.all||0}(t,e)>n}(r,s)){const r=Zt(e,n);t.recordDroppedEvent("ratelimit_backoff",s,r)}else o.push(e)})),0===o.length)return W({});const i=Q(s[0],o),c=e=>{X(i,((n,r)=>{const s=Zt(n,r);t.recordDroppedEvent(e,rt(r),s)}))};return n.add((()=>e({body:et(i)}).then((t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&ct&&N.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=it(r,t),t)),(t=>{throw c("network_error"),t})))).then((t=>t),(t=>{if(t instanceof k)return ct&&N.error("Skipped sending event because buffer is full."),c("queue_overflow"),W({});throw t}))},flush:t=>n.drain(t)}}function Zt(t,e){if("event"===e||"transaction"===e)return Array.isArray(t)?t[1]:void 0}function Qt(t,e){return null!=t?t:e()}const Xt=Symbol("AgentBaseInternalState");class te extends h.Agent{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: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((s=>{if(s instanceof h.Agent)return s.addRequest(t,r);this[Xt].currentSocket=s,super.createSocket(t,e,n)}),n)}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 Qt(this[Xt].defaultPort,(()=>"https:"===this.protocol?443:80))}set defaultPort(t){this[Xt]&&(this[Xt].defaultPort=t)}get protocol(){return Qt(this[Xt].protocol,(()=>this.isSecureEndpoint()?"https:":"http:"))}set protocol(t){this[Xt]&&(this[Xt].protocol=t)}}function ee(...t){N.log("[https-proxy-agent:parse-proxy-response]",...t)}function ne(t){return new Promise(((e,n)=>{let r=0;const s=[];function o(){const c=t.read();c?function(c){s.push(c),r+=c.length;const u=Buffer.concat(s,r),a=u.indexOf("\r\n\r\n");if(-1===a)return ee("have not received end of HTTP headers yet..."),void o();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 l=h.split(" "),p=+l[1],d=l.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 s=e.slice(0,r).toLowerCase(),o=e.slice(r+1).trimStart(),i=m[s];"string"==typeof i?m[s]=[i,o]:Array.isArray(i)?i.push(o):m[s]=o}ee("got proxy server response: %o %o",h,m),i(),e({connect:{statusCode:p,statusText:d,headers:m},buffered:u})}(c):t.once("readable",o)}function i(){t.removeListener("end",c),t.removeListener("error",u),t.removeListener("readable",o)}function c(){i(),ee("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function u(t){i(),ee("onerror %o",t),n(t)}t.on("error",u),t.on("end",c),o()}))}function re(...t){N.log("[https-proxy-agent]",...t)}class se extends te{static __initStatic(){this.protocols=["http","https"]}constructor(t,e){var n,r;super(e),this.options={},this.proxy="string"==typeof t?new URL(t):t,this.proxyHeaders=(n=function(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],o=t[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(e=n,n=o(n)):"call"!==s&&"optionalCall"!==s||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}([e,"optionalAccess",t=>t.headers]),r=()=>({}),null!=n?n:r()),re("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const s=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),o=this.proxy.port?parseInt(this.proxy.port,10):"https:"===this.proxy.protocol?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...e?ie(e,"headers"):null,host:s,port:o}}async connect(t,e){const{proxy:n}=this;if(!e.host)throw new TypeError('No "host" provided');let r;if("https:"===n.protocol){re("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 re("Creating `net.Socket`: %o",this.connectOpts),r=a.connect(this.connectOpts);const s="function"==typeof this.proxyHeaders?this.proxyHeaders():{...this.proxyHeaders},o=a.isIPv6(e.host)?`[${e.host}]`:e.host;let i=`CONNECT ${o}:${e.port} HTTP/1.1\r\n`;if(n.username||n.password){const t=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;s["Proxy-Authorization"]=`Basic ${Buffer.from(t).toString("base64")}`}s.Host=`${o}:${e.port}`,s["Proxy-Connection"]||(s["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(const t of Object.keys(s))i+=`${t}: ${s[t]}\r\n`;const c=ne(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",oe),e.secureEndpoint){re("Upgrading socket connection to TLS");const t=e.servername||e.host;return f.connect({...ie(e,"host","path","port"),socket:r,servername:a.isIP(t)?void 0:t})}return r}r.destroy();const l=new a.Socket({writable:!1});return l.readable=!0,t.once("socket",(t=>{re("Replaying proxy buffer for failed request"),t.push(h),t.push(null)})),l}}function oe(t){t.resume()}function ie(t,...e){const n={};let r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}function ce(t,e){return null!=t?t:e()}se.__initStatic();const ue=32768;function ae(t){return t.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}function fe(t){let e,n=t[0],r=1;for(;r<t.length;){const s=t[r],o=t[r+1];if(r+=2,("optionalAccess"===s||"optionalCall"===s)&&null==n)return;"access"===s||"optionalAccess"===s?(e=n,n=o(n)):"call"!==s&&"optionalCall"!==s||(n=o(((...t)=>n.call(e,...t))),e=void 0)}return n}const he=e;let le,pe=!1;function de(t){he.debug&&console.log(`[ANR Worker] ${t}`)}var me,ge,ye;const be=function(t){let e;try{e=new URL(t.url)}catch(e){return x((()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.")})),Vt(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),s=n?i:o,a=void 0!==t.keepAlive&&t.keepAlive,f=r?new se(r):new s.Agent({keepAlive:a,maxSockets:30,timeout:2e3});return Ht((()=>{const e=function(t,e,n){const{hostname:r,pathname:s,port:o,protocol:i,search:a}=new URL(t.url);return function(f){return new Promise(((h,l)=>{let p=function(t){return new c({read(){this.push(t),this.push(null)}})}(f.body);const d={...t.headers};f.body.length>ue&&(d["content-encoding"]="gzip",p=p.pipe(u()));const m=e.request({method:"POST",agent:n,headers:d,hostname:r,path:`${s}${a}`,port:o,protocol:i,ca:t.caCerts},(t=>{t.on("data",(()=>{})),t.on("end",(()=>{})),t.setEncoding("utf8");const e=ce(t.headers["retry-after"],(()=>null)),n=ce(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",l),p.pipe(m)}))}}(t,ce(t.httpModule,(()=>s)),f);return Vt(t,e)}))}({url:(me=he.dsn,ge=he.tunnel,ye=he.sdkMetadata.sdk,ge||`${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/`}(me)}?${qt(me,ye)}`),recordDroppedEvent:()=>{}});async function ve(){if(le){de("Sending abnormal session"),lt(le,{status:"abnormal",abnormal_mechanism:"anr_foreground"});const t=function(t,e,n,r){const s=st(n);return Q({sent_at:(new Date).toISOString(),...s&&{sdk:s},...!!r&&e&&{dsn:C(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(le,he.dsn,he.sdkMetadata,he.tunnel);de(JSON.stringify(t)),await be.send(t);try{fe([n,"optionalAccess",t=>t.postMessage,"call",t=>t("session-ended")])}catch(t){}}}function _e(t){if(!t)return;const e=function(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(e[e.length-1].function||"")&&e.pop(),e.reverse(),P.test(e[e.length-1].function||"")&&(e.pop(),P.test(e[e.length-1].function||"")&&e.pop()),e.slice(0,R).map((t=>({...t,filename:t.filename||e[e.length-1].filename,function:t.function||I})))}(t);if(he.appRootPath)for(const t of e)t.filename&&(t.filename=G(t.filename,he.appRootPath));return e}async function we(t,e){if(pe)return;pe=!0,await ve(),de("Sending event");const n={event_id:M(),contexts:he.contexts,release:he.release,environment:he.environment,dist:he.dist,platform:"node",level:"error",exception:{values:[{type:"ApplicationNotResponding",value:`Application Not Responding for at least ${he.anrThreshold} ms`,stacktrace:{frames:_e(t)},mechanism:{type:"ANR"}}]},tags:he.staticTags};e&&function(t,e){if(Yt(t,e),!fe([t,"access",t=>t.contexts,"optionalAccess",t=>t.trace])){const{traceId:n,spanId:r,parentSpanId:s}=e.propagationContext;t.contexts={trace:{trace_id:n,span_id:r,parent_span_id:s},...t.contexts}}}(n,e);const r=Wt(n,he.dsn,he.sdkMetadata,he.tunnel);de(JSON.stringify(r)),await be.send(r),await be.flush(2e3),setTimeout((()=>{process.exit(0)}),5e3)}let Se;if(de("Started"),he.captureStackTrace){de("Connecting to debugger");const e=new t;e.connectToMainThread(),de("Connected to debugger");const n=new Map;e.on("Debugger.scriptParsed",(t=>{n.set(t.params.scriptId,t.params.url)})),e.on("Debugger.paused",(t=>{if("other"===t.params.reason)try{de("Debugger paused");const o=[...t.params.callFrames],i=he.appRootPath?function(t=(process.argv[1]?z(process.argv[1]):process.cwd()),e="\\"===s){const n=e?ae(t):t;return t=>{if(!t)return;const s=e?ae(t):t;let{dir:o,base:i,ext:c}=r.parse(s);".js"!==c&&".mjs"!==c&&".cjs"!==c||(i=i.slice(0,-1*c.length)),o||(o=".");const u=o.lastIndexOf("/node_modules");if(u>-1)return`${o.slice(u+14).replace(/\//g,".")}:${i}`;if(o.startsWith(n)){let t=o.slice(n.length+1).replace(/\//g,".");return t&&(t+=":"),t+=i,t}return i}}(he.appRootPath):()=>{},c=o.map((t=>function(t,e,n){const r=e?e.replace(/^file:\/\//,""):void 0,s=t.location.columnNumber?t.location.columnNumber+1:void 0,o=t.location.lineNumber?t.location.lineNumber+1:void 0;return j({filename:r,module:n(r),function:t.functionName||I,colno:s,lineno:o,in_app:r?q(r):void 0})}(t,n.get(t.location.scriptId),i))),u=setTimeout((()=>{we(c).then(null,(()=>{de("Sending ANR event failed.")}))}),5e3);e.post("Runtime.evaluate",{expression:"global.__SENTRY_GET_SCOPES__();",silent:!0,returnByValue:!0},((t,n)=>{t&&de(`Error executing script: '${t.message}'`),clearTimeout(u);const r=n&&n.result?n.result.value:void 0;e.post("Debugger.resume"),e.post("Debugger.disable"),we(c,r).then(null,(()=>{de("Sending ANR event failed.")}))}))}catch(t){throw e.post("Debugger.resume"),e.post("Debugger.disable"),t}})),Se=()=>{try{e.post("Debugger.enable",(()=>{e.post("Debugger.pause")}))}catch(t){}}}const{poll:Ee}=function(t,e,n,r){const s=t();let o=!1,i=!0;return setInterval((()=>{const t=s.getTimeMs();!1===o&&t>e+n&&(o=!0,i&&r()),t<e+n&&(o=!1)}),20),{poll:()=>{s.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()}}}),he.pollInterval,he.anrThreshold,(function(){de("Watchdog timeout"),Se?(de("Pausing debugger to capture stack trace"),Se()):(de("Capturing event without a stack trace"),we().then(null,(()=>{de("Sending ANR event failed on watchdog timeout.")})))}));fe([n,"optionalAccess",t=>t.on,"call",t=>t("message",(t=>{t.session&&(le=ht(t.session)),Ee()}))]);
1
+ /*! @sentry/node 8.0.0-beta.3 (36b5e87) | https://github.com/getsentry/sentry-javascript */
2
+ import{Session as t}from"inspector";import{parentPort as n,workerData as e}from"worker_threads";import{posix as r,sep as o}from"path";import*as s from"node:http";import*as i from"node:https";import{Readable as c}from"stream";import{createGzip as u}from"zlib";import*as a from"net";import*as f from"tls";import*as h from"http";const p=Object.prototype.toString;function l(t,n){return p.call(t)===`[object ${n}]`}function d(t){return l(t,"Object")}function m(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function g(t,n){try{return t instanceof n}catch(t){return!1}}const y=globalThis;function b(t,n,e){const r=e||y,o=r.__SENTRY__=r.__SENTRY__||{};return o[t]||(o[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&&l(o,"String"))for(s=o.split(/\s+/),u=0;u<s.length;u++)r.push(`.${s[u]}`);const f=["aria-label","type","name","title","alt"];for(u=0;u<f.length;u++)i=f[u],c=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(p.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return g(t,Error)}}(t))return{message:t.message,name:t.name,stack:t.stack,...O(t)};if(n=t,"undefined"!=typeof Event&&g(n,Event)){const n={type:t.type,target:T(t.target),currentTarget:T(t.currentTarget),...O(t)};return"undefined"!=typeof CustomEvent&&g(t,CustomEvent)&&(n.detail=t.detail),n}return t;var n}function T(t){try{return n=t,"undefined"!=typeof Element&&g(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(!d(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>";function M(){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 L(t,n=100,e=1/0){try{return B("",t,n,e)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function B(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 d(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 B("",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]=B(t,n,u-1,r,o),h++}return i(n),f}function G(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 J=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function z(t){const n=function(t){const n=t.length>1024?`<truncated>${t.slice(-1024)}`:t,e=J.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 H;function W(t){return new Y((n=>{n(t)}))}!function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(H||(H={}));class Y{constructor(t){Y.prototype.__init.call(this),Y.prototype.__init2.call(this),Y.prototype.__init3.call(this),Y.prototype.__init4.call(this),this.i=H.PENDING,this.u=[];try{t(this.h,this.p)}catch(t){this.p(t)}}then(t,n){return new Y(((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 Y(((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(H.RESOLVED,t)}}__init2(){this.p=t=>{this.m(H.REJECTED,t)}}__init3(){this.m=(t,n)=>{this.i===H.PENDING&&(m(n)?n.then(this.h,this.p):(this.i=t,this.v=n,this.l()))}}__init4(){this.l=()=>{if(this.i===H.PENDING)return;const t=this.u.slice();this.u=[],t.forEach((t=>{t[0]||(this.i===H.RESOLVED&&t[1](this.v),this.i===H.REJECTED&&t[2](this.v),t[0]=!0)}))}}}function q(t){const 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 Y(((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 Y(((e,r)=>{let o=n.length;if(!o)return e(!0);const s=setTimeout((()=>{t&&t>0&&e(!1)}),t);n.forEach((t=>{W(t).then((()=>{--o||(clearTimeout(s),e(!0))}),r)}))}))}}}function F(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/")}const K=1e3;function V(){return Date.now()/K}const Z=function(){const{performance:t}=y;if(!t||!t.now)return V;const n=Date.now()-t.now(),e=null==t.timeOrigin?n:t.timeOrigin;return()=>(e+t.now())/K}();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(L(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{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 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}const ct="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__;function ut(){return at(y),y}function at(t){return t.__SENTRY__||(t.__SENTRY__={extensions:{}}),t.__SENTRY__}function ft(t){const n=Z(),e={sid:M(),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&&ht(e,t),e}function ht(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||Z(),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:M()),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 pt="_sentrySpan";function lt(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,pt,n):delete t[pt]}function dt(t){return t[pt]}class mt{constructor(){this._=!1,this.S=[],this.N=[],this.k=[],this.C=[],this.D={},this.T={},this.O={},this.j={},this.R={},this.A=gt()}clone(){const t=new mt;return t.k=[...this.k],t.T={...this.T},t.O={...this.O},t.j={...this.j},t.D=this.D,t.I=this.I,t.P=this.P,t.U=this.U,t.M=this.M,t.N=[...this.N],t.L=this.L,t.C=[...this.C],t.R={...this.R},t.A={...this.A},t.B=this.B,lt(t,dt(this)),t}setClient(t){this.B=t}getClient(){return this.B}addScopeListener(t){this.S.push(t)}addEventProcessor(t){return this.N.push(t),this}setUser(t){return this.D=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.P&&ht(this.P,{user:t}),this.G(),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.G(),this}setTag(t,n){return this.T={...this.T,[t]:n},this.G(),this}setExtras(t){return this.O={...this.O,...t},this.G(),this}setExtra(t,n){return this.O={...this.O,[t]:n},this.G(),this}setFingerprint(t){return this.M=t,this.G(),this}setLevel(t){return this.I=t,this.G(),this}setTransactionName(t){return this.U=t,this.G(),this}setContext(t,n){return null===n?delete this.j[t]:this.j[t]=n,this.G(),this}setSession(t){return t?this.P=t:delete this.P,this.G(),this}getSession(){return this.P}update(t){if(!t)return this;const n="function"==typeof t?t(this):t,[e,r]=n instanceof mt?[n.getScopeData(),n.getRequestSession()]:d(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,lt(this,void 0),this.C=[],this.A=gt(),this.G(),this}addBreadcrumb(t,n){const e="number"==typeof n?n:100;if(e<=0)return this;const r={timestamp:V(),...t},o=this.k;return o.push(r),this.k=o.length>e?o.slice(-e):o,this.G(),this}getLastBreadcrumb(){return this.k[this.k.length-1]}clearBreadcrumbs(){return this.k=[],this.G(),this}addAttachment(t){return this.C.push(t),this}clearAttachments(){return this.C=[],this}getScopeData(){return{breadcrumbs:this.k,attachments:this.C,contexts:this.j,tags:this.T,extra:this.O,user:this.D,level:this.I,fingerprint:this.M||[],eventProcessors:this.N,propagationContext:this.A,sdkProcessingMetadata:this.R,transactionName:this.U,span:dt(this)}}setSDKProcessingMetadata(t){return this.R={...this.R,...t},this}setPropagationContext(t){return this.A=t,this}getPropagationContext(){return this.A}captureException(t,n){const e=n&&n.event_id?n.event_id:M();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:M();if(!this.B)return N.warn("No client configured on scope - will not capture message!"),r;const o=new Error(t);return this.B.captureMessage(t,n,{originalException:t,syntheticException:o,...e,event_id:r},this),r}captureEvent(t,n){const e=n&&n.event_id?n.event_id:M();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)}G(){this._||(this._=!0,this.S.forEach((t=>{t(this)})),this._=!1)}}function gt(){return{traceId:M(),spanId:M().substring(16)}}function yt(){return $t(ut()).getCurrentScope().getClient()}class bt{constructor(t,n){let e,r;e=t||new mt,r=n||new mt,this.J=[{scope:e}],this.H=r}withScope(t){const n=this.W();let e;try{e=t(n)}catch(t){throw this.Y(),t}return m(e)?e.then((t=>(this.Y(),t)),(t=>{throw this.Y(),t})):(this.Y(),e)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.H}getStack(){return this.J}getStackTop(){return this.J[this.J.length-1]}W(){const t=this.getScope().clone();return this.getStack().push({client:this.getClient(),scope:t}),t}Y(){return!(this.getStack().length<=1)&&!!this.getStack().pop()}}function vt(){const t=at(ut());return t.hub||(t.hub=new bt(b("defaultCurrentScope",(()=>new mt)),b("defaultIsolationScope",(()=>new mt)))),t.hub}function _t(t){return vt().withScope(t)}function wt(t,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=at(t);return n.acs?n.acs:{withIsolationScope:St,withScope:_t,withSetScope:wt,withSetIsolationScope:(t,n)=>St(n),getCurrentScope:()=>vt().getScope(),getIsolationScope:()=>vt().getIsolationScope()}}const Et="sentry.source",xt="sentry.sample_rate",Nt="sentry.op",kt="sentry.origin",Ct=0,Dt=1,Tt=1;function Ot(t){const{spanId:n,traceId:e}=t.spanContext(),{data:r,op:o,parent_span_id:s,status:i,origin:c}=At(t);return j({data:r,op:o,parent_span_id:s,span_id:n,status:i,trace_id:e,origin:c})}function jt(t){return"number"==typeof t?Rt(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?Rt(t.getTime()):Z()}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: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:jt(o),timestamp:jt(i)||void 0,status:It(u),op:r[Nt],origin:r[kt],q:void 0})}return{span_id:n,trace_id:e}}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 n=yt();if(!n)return{};const e=function(t,n){const e=n.getOptions(),{publicKey:r}=n.getDsn()||{},o=j({environment:e.environment||Mt,release:e.release,public_key:r,trace_id:t});return n.emit("createDsc",o),o}(At(t).trace_id||"",n),r=Ut(t);if(!r)return e;const o=r[Lt];if(o)return o;const s=At(r),i=s.data||{},c=i[xt];null!=c&&(e.sample_rate=`${c}`);const u=i[Et];return u&&"url"!==u&&(e.transaction=s.description),e.sampled=String(function(t){const{traceFlags:n}=t.spanContext();return n===Tt}(r)),n.emit("createDsc",e),e}const Gt="__SENTRY_SUPPRESS_TRACING__";function Jt(t){const n=$t(ut());return n.suppressTracing?n.suppressTracing(t):function(...t){const n=$t(ut());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({[Gt]:!0}),t())))}function zt(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]])}function Ht(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:Ot(n),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:Bt(n),...t.sdkProcessingMetadata};const e=Ut(n),r=At(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 Wt="7";function Yt(t,n){return e={sentry_key:t.publicKey,sentry_version:Wt,...n&&{sentry_client:`${n.name}/${n.version}`}},Object.keys(e).map((t=>`${encodeURIComponent(t)}=${encodeURIComponent(e[t])}`)).join("&");var e}const qt=30;function Ft(t,n,e=q(t.bufferSize||qt)){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=Kt(n,e);t.recordDroppedEvent("ratelimit_backoff",o,r)}else s.push(n)})),0===s.length)return W({});const i=Q(o[0],s),c=n=>{X(i,((e,r)=>{const o=Kt(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)&&ct&&N.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=it(r,t),t)),(t=>{throw c("network_error"),t})))).then((t=>t),(t=>{if(t instanceof C)return ct&&N.error("Skipped sending event because buffer is full."),c("queue_overflow"),W({});throw t}))},flush:t=>e.drain(t)}}function Kt(t,n){if("event"===n||"transaction"===n)return Array.isArray(t)?t[1]:void 0}const Vt=Symbol("AgentBaseInternalState");class Zt extends h.Agent{[Vt];options;keepAlive;constructor(t){super(t),this[Vt]={}}isSecureEndpoint(t){if(t){if("boolean"==typeof t.secureEndpoint)return t.secureEndpoint;if("string"==typeof t.protocol)return"https:"===t.protocol}const{stack: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 h.Agent)return o.addRequest(t,r);this[Vt].currentSocket=o,super.createSocket(t,n,e)}),e)}createConnection(){const t=this[Vt].currentSocket;if(this[Vt].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[Vt].defaultPort??("https:"===this.protocol?443:80)}set defaultPort(t){this[Vt]&&(this[Vt].defaultPort=t)}get protocol(){return this[Vt].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[Vt]&&(this[Vt].protocol=t)}}function Qt(...t){N.log("[https-proxy-agent:parse-proxy-response]",...t)}function Xt(t){return new Promise(((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 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(),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}Qt("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(),Qt("onend"),e(new Error("Proxy connection ended before receiving CONNECT response"))}function u(t){i(),Qt("onerror %o",t),e(t)}t.on("error",u),t.on("end",c),s()}))}function tn(...t){N.log("[https-proxy-agent]",...t)}class nn extends Zt{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??{},tn("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?rn(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){tn("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 tn("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=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",en),n.secureEndpoint){tn("Upgrading socket connection to TLS");const t=n.servername||n.host;return f.connect({...rn(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=>{tn("Replaying proxy buffer for failed request"),t.push(h),t.push(null)})),p}}function en(t){t.resume()}function rn(t,...n){const e={};let r;for(r in t)n.includes(r)||(e[r]=t[r]);return e}const on=32768;function sn(t){return t.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}const cn=e;let un,an=!1;function fn(t){cn.debug&&console.log(`[ANR Worker] ${t}`)}var hn,pn,ln;const dn=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.")})),Ft(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 nn(r):new o.Agent({keepAlive:a,maxSockets:30,timeout:2e3});return Jt((()=>{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>on&&(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 Ft(t,n)}))}({url:(hn=cn.dsn,pn=cn.tunnel,ln=cn.sdkMetadata.sdk,pn||`${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/`}(hn)}?${Yt(hn,ln)}`),recordDroppedEvent:()=>{}});async function mn(){if(un){fn("Sending abnormal session"),ht(un,{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()]])}(un,cn.dsn,cn.sdkMetadata,cn.tunnel);fn(JSON.stringify(t)),await dn.send(t);try{n?.postMessage("session-ended")}catch(t){}}}function gn(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(cn.appRootPath)for(const t of n)t.filename&&(t.filename=G(t.filename,cn.appRootPath));return n}async function yn(t,n){if(an)return;an=!0,await mn(),fn("Sending event");const e={event_id:M(),contexts:cn.contexts,release:cn.release,environment:cn.environment,dist:cn.dist,platform:"node",level:"error",exception:{values:[{type:"ApplicationNotResponding",value:`Application Not Responding for at least ${cn.anrThreshold} ms`,stacktrace:{frames:gn(t)},mechanism:{type:"ANR"}}]},tags:cn.staticTags};n&&function(t,n){if(Ht(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=zt(e,cn.dsn,cn.sdkMetadata,cn.tunnel);fn(JSON.stringify(r)),await dn.send(r),await dn.flush(2e3),setTimeout((()=>{process.exit(0)}),5e3)}let bn;if(fn("Started"),cn.captureStackTrace){fn("Connecting to debugger");const n=new t;n.connectToMainThread(),fn("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{fn("Debugger paused");const s=[...t.params.callFrames],i=cn.appRootPath?function(t=(process.argv[1]?z(process.argv[1]):process.cwd()),n="\\"===o){const e=n?sn(t):t;return t=>{if(!t)return;const o=n?sn(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}}(cn.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?F(r):void 0})}(t,e.get(t.location.scriptId),i))),u=setTimeout((()=>{yn(c).then(null,(()=>{fn("Sending ANR event failed.")}))}),5e3);n.post("Runtime.evaluate",{expression:"global.__SENTRY_GET_SCOPES__();",silent:!0,returnByValue:!0},((t,e)=>{t&&fn(`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"),yn(c,r).then(null,(()=>{fn("Sending ANR event failed.")}))}))}catch(t){throw n.post("Debugger.resume"),n.post("Debugger.disable"),t}})),bn=()=>{try{n.post("Debugger.enable",(()=>{n.post("Debugger.pause")}))}catch(t){}}}const{poll:vn}=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()}}}),cn.pollInterval,cn.anrThreshold,(function(){fn("Watchdog timeout"),bn?(fn("Pausing debugger to capture stack trace"),bn()):(fn("Capturing event without a stack trace"),yn().then(null,(()=>{fn("Sending ANR event failed on watchdog timeout.")})))}));n?.on("message",(t=>{t.session&&(un=ft(t.session)),vn()}));
@@ -0,0 +1,2 @@
1
+ /*! @sentry/node 8.0.0-beta.3 (36b5e87) | https://github.com/getsentry/sentry-javascript */
2
+ import{Session as e}from"node:inspector/promises";import{workerData as n,parentPort as t}from"worker_threads";import{posix as o,sep as r}from"path";const i=50,s="?",c=/\(error: (.*)\)/,a=/captureMessage|captureException/;const u=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function f(e){const n=function(e){const n=e.length>1024?`<truncated>${e.slice(-1024)}`:e,t=u.exec(n);return t?t.slice(1):[]}(e),t=n[0];let o=n[1];return t||o?(o&&(o=o.slice(0,o.length-1)),t+o):"."}function l(e,n=!1){return!(n||e&&!e.startsWith("/")&&!e.match(/^[A-Z]:/)&&!e.startsWith(".")&&!e.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&void 0!==e&&!e.includes("node_modules/")}function d(e){const n=/^\s*[-]{4,}$/,t=/at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;return o=>{const r=o.match(t);if(r){let n,t,o,i,c;if(r[1]){o=r[1];let e=o.lastIndexOf(".");if("."===o[e-1]&&e--,e>0){n=o.slice(0,e),t=o.slice(e+1);const r=n.indexOf(".Module");r>0&&(o=o.slice(r+1),n=n.slice(0,r))}i=void 0}t&&(i=n,c=t),"<anonymous>"===t&&(c=void 0,o=void 0),void 0===o&&(c=c||s,o=i?`${i}.${c}`:c);let a=r[2]&&r[2].startsWith("file://")?r[2].slice(7):r[2];const u="native"===r[5];return a&&a.match(/\/[A-Z]:/)&&(a=a.slice(1)),a||!r[5]||u||(a=r[5]),{filename:a,module:e?e(a):void 0,function:o,lineno:parseInt(r[3],10)||void 0,colno:parseInt(r[4],10)||void 0,in_app:l(a,u)}}if(o.match(n))return{filename:o}}}function p(e){return e.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}const g=n,m=function(...e){const n=e.sort(((e,n)=>e[0]-n[0])).map((e=>e[1]));return(e,t=0,o=0)=>{const r=[],u=e.split("\n");for(let e=t;e<u.length;e++){const t=u[e];if(t.length>1024)continue;const s=c.test(t)?t.replace(c,"$1"):t;if(!s.match(/\S*Error: /)){for(const e of n){const n=e(s);if(n){r.push(n);break}}if(r.length>=i+o)break}}return function(e){if(!e.length)return[];const n=Array.from(e);/sentryWrapped/.test(n[n.length-1].function||"")&&n.pop();n.reverse(),a.test(n[n.length-1].function||"")&&(n.pop(),a.test(n[n.length-1].function||"")&&n.pop());return n.slice(0,i).map((e=>({...e,filename:e.filename||n[n.length-1].filename,function:e.function||s})))}(r.slice(o))}}([90,d(function(e=(process.argv[1]?f(process.argv[1]):process.cwd()),n="\\"===r){const t=n?p(e):e;return e=>{if(!e)return;const r=n?p(e):e;let{dir:i,base:s,ext:c}=o.parse(r);".js"!==c&&".mjs"!==c&&".cjs"!==c||(s=s.slice(0,-1*c.length)),i||(i=".");const a=i.lastIndexOf("/node_modules");if(a>-1)return`${i.slice(a+14).replace(/\//g,".")}:${s}`;if(i.startsWith(t)){let e=i.slice(t.length+1).replace(/\//g,".");return e&&(e+=":"),e+=s,e}return s}}(g.basePath))]);function b(...e){g.debug&&console.log("[LocalVariables Worker]",...e)}async function v(e,n,t,o){const r=await e.post("Runtime.getProperties",{objectId:n,ownProperties:!0});o[t]=r.result.filter((e=>"length"!==e.name&&!isNaN(parseInt(e.name,10)))).sort(((e,n)=>parseInt(e.name,10)-parseInt(n.name,10))).map((e=>e.value?.value))}async function $(e,n,t,o){const r=await e.post("Runtime.getProperties",{objectId:n,ownProperties:!0});o[t]=r.result.map((e=>[e.name,e.value?.value])).reduce(((e,[n,t])=>(e[n]=t,e)),{})}function w(e,n){e.value&&("value"in e.value?void 0===e.value.value||null===e.value.value?n[e.name]=`<${e.value.value}>`:n[e.name]=e.value.value:"description"in e.value&&"function"!==e.value.type?n[e.name]=`<${e.value.description}>`:"undefined"===e.value.type&&(n[e.name]="<undefined>"))}async function y(e,n){const t=await e.post("Runtime.getProperties",{objectId:n,ownProperties:!0}),o={};for(const n of t.result)if(n?.value?.objectId&&"Array"===n?.value.className){const t=n.value.objectId;await v(e,t,n.name,o)}else if(n?.value?.objectId&&"Object"===n?.value?.className){const t=n.value.objectId;await $(e,t,n.name,o)}else n?.value&&w(n,o);return o}let h;(async function(){const n=new e;n.connectToMainThread(),b("Connected to main thread");let o=!1;n.on("Debugger.resumed",(()=>{o=!1})),n.on("Debugger.paused",(e=>{o=!0,async function(e,n,{reason:o,data:r,callFrames:i}){if("exception"!==o&&"promiseRejection"!==o)return;h?.();const s=function(e,n){if(void 0!==n)return function(e){if(void 0!==e)return e.slice(-10).reduce(((e,n)=>`${e},${n.function},${n.lineno},${n.colno}`),"")}(e(n,1))}(n,r?.description);if(null==s)return;const c=[];for(let n=0;n<i.length;n++){const{scopeChain:t,functionName:o,this:r}=i[n],s=t.find((e=>"local"===e.type)),a="global"!==r.className&&r.className?`${r.className}.${o}`:o;if(void 0===s?.object.objectId)c[n]={function:a};else{const t=await y(e,s.object.objectId);c[n]={function:a,vars:t}}}t?.postMessage({exceptionHash:s,frames:c})}(n,m,e.params).then((()=>o?n.post("Debugger.resume"):Promise.resolve()),(e=>{}))})),await n.post("Debugger.enable");const r=!1!==g.captureAllExceptions;if(await n.post("Debugger.setPauseOnExceptions",{state:r?"all":"uncaught"}),r){const e=g.maxExceptionsPerSecond||50;h=function(e,n,t){let o=0,r=5,i=0;return setInterval((()=>{0===i?o>e&&(r*=2,t(r),r>86400&&(r=86400),i=r):(i-=1,0===i&&n()),o=0}),1e3).unref(),()=>{o+=1}}(e,(async()=>{b("Rate-limit lifted."),await n.post("Debugger.setPauseOnExceptions",{state:"all"})}),(async e=>{b(`Rate-limit exceeded. Disabling capturing of caught exceptions for ${e} seconds.`),await n.post("Debugger.setPauseOnExceptions",{state:"uncaught"})}))}})().catch((e=>{b("Failed to start debugger",e)})),setInterval((()=>{}),1e4);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/node",
3
- "version": "8.0.0-beta.1",
3
+ "version": "8.0.0-beta.3",
4
4
  "description": "Sentry Node SDK using OpenTelemetry for performance instrumentation",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/node",
@@ -53,30 +53,31 @@
53
53
  "access": "public"
54
54
  },
55
55
  "dependencies": {
56
- "@opentelemetry/api": "1.7.0",
57
- "@opentelemetry/context-async-hooks": "1.21.0",
58
- "@opentelemetry/core": "1.21.0",
56
+ "@opentelemetry/api": "^1.8.0",
57
+ "@opentelemetry/context-async-hooks": "^1.23.0",
58
+ "@opentelemetry/core": "^1.23.0",
59
59
  "@opentelemetry/instrumentation": "0.48.0",
60
+ "@opentelemetry/instrumentation-connect": "0.35.0",
60
61
  "@opentelemetry/instrumentation-express": "0.35.0",
61
62
  "@opentelemetry/instrumentation-fastify": "0.33.0",
62
63
  "@opentelemetry/instrumentation-graphql": "0.37.0",
63
- "@opentelemetry/instrumentation-hapi": "0.34.0",
64
+ "@opentelemetry/instrumentation-hapi": "0.36.0",
64
65
  "@opentelemetry/instrumentation-http": "0.48.0",
65
- "@opentelemetry/instrumentation-koa": "0.37.0",
66
+ "@opentelemetry/instrumentation-koa": "0.39.0",
66
67
  "@opentelemetry/instrumentation-mongodb": "0.39.0",
67
68
  "@opentelemetry/instrumentation-mongoose": "0.35.0",
68
69
  "@opentelemetry/instrumentation-mysql": "0.35.0",
69
70
  "@opentelemetry/instrumentation-mysql2": "0.35.0",
70
71
  "@opentelemetry/instrumentation-nestjs-core": "0.34.0",
71
- "@opentelemetry/instrumentation-pg": "0.38.0",
72
- "@opentelemetry/resources": "1.21.0",
73
- "@opentelemetry/sdk-trace-base": "1.21.0",
74
- "@opentelemetry/semantic-conventions": "1.21.0",
72
+ "@opentelemetry/instrumentation-pg": "0.40.0",
73
+ "@opentelemetry/resources": "^1.23.0",
74
+ "@opentelemetry/sdk-trace-base": "^1.23.0",
75
+ "@opentelemetry/semantic-conventions": "^1.23.0",
75
76
  "@prisma/instrumentation": "5.9.0",
76
- "@sentry/core": "8.0.0-beta.1",
77
- "@sentry/opentelemetry": "8.0.0-beta.1",
78
- "@sentry/types": "8.0.0-beta.1",
79
- "@sentry/utils": "8.0.0-beta.1"
77
+ "@sentry/core": "8.0.0-beta.3",
78
+ "@sentry/opentelemetry": "8.0.0-beta.3",
79
+ "@sentry/types": "8.0.0-beta.3",
80
+ "@sentry/utils": "8.0.0-beta.3"
80
81
  },
81
82
  "devDependencies": {
82
83
  "@types/node": "^14.18.0"
package/types/index.d.ts CHANGED
@@ -20,6 +20,7 @@ export { postgresIntegration } from './integrations/tracing/postgres';
20
20
  export { prismaIntegration } from './integrations/tracing/prisma';
21
21
  export { hapiIntegration, setupHapiErrorHandler } from './integrations/tracing/hapi';
22
22
  export { koaIntegration, setupKoaErrorHandler } from './integrations/tracing/koa';
23
+ export { connectIntegration, setupConnectErrorHandler } from './integrations/tracing/connect';
23
24
  export { spotlightIntegration } from './integrations/spotlight';
24
25
  export { init, getDefaultIntegrations } from './sdk/init';
25
26
  export { initOpenTelemetry } from './sdk/initOtel';
@@ -31,7 +32,7 @@ export { NodeClient } from './sdk/client';
31
32
  export { cron } from './cron';
32
33
  export type { NodeOptions } from './types';
33
34
  export { addRequestDataToEvent, DEFAULT_USER_INCLUDES, extractRequestData } from '@sentry/utils';
34
- export { continueTrace } from '@sentry/opentelemetry';
35
+ export { addOpenTelemetryInstrumentation, continueTrace, setOpenTelemetryContextAsyncContextStrategy as setNodeAsyncContextStrategy, } from '@sentry/opentelemetry';
35
36
  export { addBreadcrumb, isInitialized, getGlobalScope, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setUser, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentHub, getCurrentScope, getIsolationScope, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureConsoleIntegration, debugIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, metricsDefault as metrics, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, trpcMiddleware, } from '@sentry/core';
36
- export type { Breadcrumb, BreadcrumbHint, PolymorphicRequest, Request, SdkInfo, Event, EventHint, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, } from '@sentry/types';
37
+ export type { Breadcrumb, BreadcrumbHint, PolymorphicRequest, Request, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, } from '@sentry/types';
37
38
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"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"}
@@ -1,5 +1,6 @@
1
1
  import type { Integration } from '@sentry/types';
2
2
  import type { AnrIntegrationOptions } from './common';
3
+ export declare const base64WorkerScript = "###AnrWorkerScript###";
3
4
  type AnrInternal = {
4
5
  startWorker: () => void;
5
6
  stopWorker: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/anr/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA8B,WAAW,EAA4B,MAAM,eAAe,CAAC;AAOvG,OAAO,KAAK,EAAE,qBAAqB,EAAmB,MAAM,UAAU,CAAC;AA6CvE,KAAK,WAAW,GAAG;IAAE,WAAW,EAAE,MAAM,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AA6CvE,KAAK,SAAS,GAAG,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,KAAK,WAAW,GAAG,WAAW,CAAC;AAEzF,eAAO,MAAM,cAAc,WAAkD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/anr/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA8B,WAAW,EAA4B,MAAM,eAAe,CAAC;AAOvG,OAAO,KAAK,EAAE,qBAAqB,EAAmB,MAAM,UAAU,CAAC;AAGvE,eAAO,MAAM,kBAAkB,0BAA0B,CAAC;AA4C1D,KAAK,WAAW,GAAG;IAAE,WAAW,EAAE,MAAM,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AA6CvE,KAAK,SAAS,GAAG,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,KAAK,WAAW,GAAG,WAAW,CAAC;AAEzF,eAAO,MAAM,cAAc,WAAkD,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';
1
2
  interface HttpOptions {
2
3
  /**
3
4
  * Whether breadcrumbs should be recorded for requests.
@@ -14,6 +15,8 @@ interface HttpOptions {
14
15
  * This controls both span & breadcrumb creation - spans will be non recording if tracing is disabled.
15
16
  */
16
17
  ignoreIncomingRequests?: (url: string) => boolean;
18
+ /** Allows to pass a custom version of HttpInstrumentation. We use this for Next.js. */
19
+ _instrumentation?: typeof HttpInstrumentation;
17
20
  }
18
21
  /**
19
22
  * The http integration instruments Node's internal http and https modules.
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/integrations/http.ts"],"names":[],"mappings":"AA0BA,UAAU,WAAW;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAElD;;;OAGG;IACH,sBAAsB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CACnD;AA4GD;;;GAGG;AACH,eAAO,MAAM,eAAe,4EAAsC,CAAC"}
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../../../src/integrations/http.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAuB1E,UAAU,WAAW;IACnB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAElD;;;OAGG;IACH,sBAAsB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IAElD,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,OAAO,mBAAmB,CAAC;CAC/C;AAyGD;;;GAGG;AACH,eAAO,MAAM,eAAe,4EAAsC,CAAC"}
@@ -54,4 +54,16 @@ export interface LocalVariablesIntegrationOptions {
54
54
  */
55
55
  maxExceptionsPerSecond?: number;
56
56
  }
57
+ export interface LocalVariablesWorkerArgs extends LocalVariablesIntegrationOptions {
58
+ /**
59
+ * Whether to enable debug logging.
60
+ */
61
+ debug: boolean;
62
+ /**
63
+ * Base path used to calculate module name.
64
+ *
65
+ * Defaults to `dirname(process.argv[1])` and falls back to `process.cwd()`
66
+ */
67
+ basePath?: string;
68
+ }
57
69
  //# sourceMappingURL=common.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/integrations/local-variables/common.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEhD,MAAM,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC;AAE5C;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,IAAI,EAClB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GACjC,kBAAkB,CA+BpB;AAGD,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,mBAAmB,GAAG;IAChE,IAAI,EAAE;QAEJ,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,CAAC;AAEF,2CAA2C;AAC3C,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAE7D;AAED,6CAA6C;AAC7C,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAExF;AAED,8CAA8C;AAC9C,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAO/E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAMrG;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,gCAAgC;IAC/C;;;;;;;;;;;;;;OAcG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC"}
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/integrations/local-variables/common.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEhD,MAAM,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC;AAE5C;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,IAAI,EAClB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GACjC,kBAAkB,CA+BpB;AAGD,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,mBAAmB,GAAG;IAChE,IAAI,EAAE;QAEJ,WAAW,EAAE,MAAM,CAAC;KACrB,CAAC;CACH,CAAC;AAEF,2CAA2C;AAC3C,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAE7D;AAED,6CAA6C;AAC7C,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAExF;AAED,8CAA8C;AAC9C,wBAAgB,UAAU,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAO/E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAMrG;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,gCAAgC;IAC/C;;;;;;;;;;;;;;OAcG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,wBAAyB,SAAQ,gCAAgC;IAChF;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -1,2 +1,4 @@
1
- export declare const localVariablesIntegration: (options?: import("./common").LocalVariablesIntegrationOptions | undefined, session?: import("./local-variables-sync").DebugSession | undefined) => import("@sentry/types").Integration;
1
+ import type { Integration } from '@sentry/types';
2
+ import type { LocalVariablesIntegrationOptions } from './common';
3
+ export declare const localVariablesIntegration: (options?: LocalVariablesIntegrationOptions) => Integration;
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/local-variables/index.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,yBAAyB,yLAAgC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/local-variables/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAIjE,eAAO,MAAM,yBAAyB,aAAa,gCAAgC,KAAQ,WAE1F,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { LocalVariablesIntegrationOptions } from './common';
2
+ export declare const base64WorkerScript = "###LocalVariablesWorkerScript###";
3
+ /**
4
+ * Adds local variables to exception frames
5
+ */
6
+ export declare const localVariablesAsyncIntegration: (integrationOptions?: LocalVariablesIntegrationOptions | undefined) => import("@sentry/types").Integration;
7
+ //# sourceMappingURL=local-variables-async.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-variables-async.d.ts","sourceRoot":"","sources":["../../../../src/integrations/local-variables/local-variables-async.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAkB,gCAAgC,EAA4B,MAAM,UAAU,CAAC;AAI3G,eAAO,MAAM,kBAAkB,qCAAqC,CAAC;AAMrE;;GAEG;AACH,eAAO,MAAM,8BAA8B,4GAyHhB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=worker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../../../src/integrations/local-variables/worker.ts"],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"node-fetch.d.ts","sourceRoot":"","sources":["../../../src/integrations/node-fetch.ts"],"names":[],"mappings":"AAaA,UAAU,gBAAgB;IACxB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CACnD;AAoDD,eAAO,MAAM,0BAA0B,iFAAiD,CAAC"}
1
+ {"version":3,"file":"node-fetch.d.ts","sourceRoot":"","sources":["../../../src/integrations/node-fetch.ts"],"names":[],"mappings":"AAcA,UAAU,gBAAgB;IACxB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CACnD;AAgDD,eAAO,MAAM,0BAA0B,iFAAiD,CAAC"}
@@ -0,0 +1,7 @@
1
+ type ConnectApp = {
2
+ use: (middleware: any) => void;
3
+ };
4
+ export declare const connectIntegration: () => import("@sentry/types").Integration;
5
+ export declare const setupConnectErrorHandler: (app: ConnectApp) => void;
6
+ export {};
7
+ //# sourceMappingURL=connect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"connect.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/connect.ts"],"names":[],"mappings":"AAKA,KAAK,UAAU,GAAG;IAEhB,GAAG,EAAE,CAAC,UAAU,EAAE,GAAG,KAAK,IAAI,CAAC;CAChC,CAAC;AAWF,eAAO,MAAM,kBAAkB,2CAAyC,CAAC;AAQzE,eAAO,MAAM,wBAAwB,QAAS,UAAU,KAAG,IAE1D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"express.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/express.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,IAAI,MAAM,MAAM,CAAC;AA2ClC;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,2CAAyC,CAAC;AAEzE,UAAU,eAAgB,SAAQ,KAAK;IACrC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,MAAM,CAAC,EAAE;QACP,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KAC9B,CAAC;CACH;AAED,KAAK,iBAAiB,GAAG,CACvB,KAAK,EAAE,eAAe,EACtB,GAAG,EAAE,IAAI,CAAC,eAAe,EACzB,GAAG,EAAE,IAAI,CAAC,cAAc,EACxB,IAAI,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,KACnC,IAAI,CAAC;AAEV;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE;IAC5C;;;OAGG;IACH,iBAAiB,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC;CACjE,GAAG,iBAAiB,CAqCpB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE;IAAE,GAAG,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,OAAO,CAAA;CAAE,GAAG,IAAI,CAEvG"}
1
+ {"version":3,"file":"express.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/express.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,KAAK,IAAI,MAAM,MAAM,CAAC;AAyClC;;;;;GAKG;AACH,eAAO,MAAM,kBAAkB,2CAAyC,CAAC;AAEzE,UAAU,eAAgB,SAAQ,KAAK;IACrC,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC7B,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAC9B,MAAM,CAAC,EAAE;QACP,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;KAC9B,CAAC;CACH;AAED,KAAK,iBAAiB,GAAG,CACvB,KAAK,EAAE,eAAe,EACtB,GAAG,EAAE,IAAI,CAAC,eAAe,EACzB,GAAG,EAAE,IAAI,CAAC,cAAc,EACxB,IAAI,EAAE,CAAC,KAAK,EAAE,eAAe,KAAK,IAAI,KACnC,IAAI,CAAC;AAEV;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,CAAC,EAAE;IAC5C;;;OAGG;IACH,iBAAiB,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC;CACjE,GAAG,iBAAiB,CAqCpB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,GAAG,EAAE;IAAE,GAAG,EAAE,CAAC,UAAU,EAAE,iBAAiB,KAAK,OAAO,CAAA;CAAE,GAAG,IAAI,CAEvG"}
@@ -1 +1 @@
1
- {"version":3,"file":"fastify.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/fastify.ts"],"names":[],"mappings":"AAwBA;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,2CAAyC,CAAC;AAGzE,UAAU,OAAO;IAEf,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAEhC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,KAAK,IAAI,CAAC;CAC5F;AAeD;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8B/D"}
1
+ {"version":3,"file":"fastify.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/fastify.ts"],"names":[],"mappings":"AAsBA;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,2CAAyC,CAAC;AAGzE,UAAU,OAAO;IAEf,QAAQ,EAAE,CAAC,MAAM,EAAE,GAAG,KAAK,IAAI,CAAC;IAEhC,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,KAAK,IAAI,CAAC;CAC5F;AAeD;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CA8B/D"}
@@ -1 +1 @@
1
- {"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/graphql.ts"],"names":[],"mappings":"AAyBA;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,2CAAyC,CAAC"}
1
+ {"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/graphql.ts"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,2CAAyC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/hapi/index.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAsC,MAAM,EAAE,MAAM,SAAS,CAAC;AAa1E;;;;;GAKG;AACH,eAAO,MAAM,eAAe,2CAAsC,CAAC;AAsBnE,eAAO,MAAM,eAAe;;;0BAIW,OAAO,GAAG,EAAE,GAAG,CAAC;CA6BtD,CAAC;AAEF;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEzE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/hapi/index.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAsC,MAAM,EAAE,MAAM,SAAS,CAAC;AAW1E;;;;;GAKG;AACH,eAAO,MAAM,eAAe,2CAAsC,CAAC;AAsBnE,eAAO,MAAM,eAAe;;;0BAIW,OAAO,GAAG,EAAE,GAAG,CAAC;CA6BtD,CAAC;AAEF;;GAEG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEzE"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAcjD;;GAEG;AACH,wBAAgB,8BAA8B,IAAI,WAAW,EAAE,CAkB9D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAejD;;GAEG;AACH,wBAAgB,8BAA8B,IAAI,WAAW,EAAE,CAmB9D"}
@@ -1 +1 @@
1
- {"version":3,"file":"koa.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/koa.ts"],"names":[],"mappings":"AAyCA,eAAO,MAAM,cAAc,2CAAqC,CAAC;AAEjE,eAAO,MAAM,oBAAoB;sBAA6B,GAAG,QAAQ,GAAG,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI;MAAK,IAQ3G,CAAC"}
1
+ {"version":3,"file":"koa.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/koa.ts"],"names":[],"mappings":"AAuCA,eAAO,MAAM,cAAc,2CAAqC,CAAC;AAGjE,eAAO,MAAM,oBAAoB;sBAA6B,GAAG,QAAQ,GAAG,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI;MAAK,IAQ3G,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"mongo.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/mongo.ts"],"names":[],"mappings":"AAwBA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,2CAAuC,CAAC"}
1
+ {"version":3,"file":"mongo.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/mongo.ts"],"names":[],"mappings":"AAsBA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,2CAAuC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"mongoose.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/mongoose.ts"],"names":[],"mappings":"AAwBA;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,2CAA0C,CAAC"}
1
+ {"version":3,"file":"mongoose.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/mongoose.ts"],"names":[],"mappings":"AAsBA;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,2CAA0C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"mysql.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/mysql.ts"],"names":[],"mappings":"AAgBA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,2CAAuC,CAAC"}
1
+ {"version":3,"file":"mysql.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/mysql.ts"],"names":[],"mappings":"AAcA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,2CAAuC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"mysql2.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/mysql2.ts"],"names":[],"mappings":"AAwBA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,2CAAwC,CAAC"}
1
+ {"version":3,"file":"mysql2.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/mysql2.ts"],"names":[],"mappings":"AAsBA;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,2CAAwC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"nest.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/nest.ts"],"names":[],"mappings":"AAMA,UAAU,6BAA6B;IACrC,YAAY,EAAE,MAAM;QAIlB,UAAU,EAAE,MAAM;YAChB,KAAK,CAAC,EAAE;gBACN,IAAI,CAAC,EAAE,MAAM,CAAC;aACf,CAAC;YACF,MAAM,CAAC,EAAE,MAAM,CAAC;SACjB,CAAC;KACH,CAAC;CACH;AACD,UAAU,gBAAgB;IACxB,gBAAgB,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAAA;KAAE,KAAK,IAAI,CAAC;IACtE,qBAAqB,EAAE,CAAC,WAAW,EAAE;QACnC,SAAS,EAAE,CAAC,OAAO,EAAE,6BAA6B,EAAE,IAAI,EAAE;YAAE,MAAM,EAAE,MAAM,IAAI,CAAA;SAAE,KAAK,IAAI,CAAC;KAC3F,KAAK,IAAI,CAAC;CACZ;AAaD;;;;GAIG;AACH,eAAO,MAAM,eAAe,2CAAsC,CAAC;AAQnE;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,CAiBjE"}
1
+ {"version":3,"file":"nest.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/nest.ts"],"names":[],"mappings":"AAMA,UAAU,6BAA6B;IACrC,YAAY,EAAE,MAAM;QAIlB,UAAU,EAAE,MAAM;YAChB,KAAK,CAAC,EAAE;gBACN,IAAI,CAAC,EAAE,MAAM,CAAC;aACf,CAAC;YACF,MAAM,CAAC,EAAE,MAAM,CAAC;SACjB,CAAC;KACH,CAAC;CACH;AACD,UAAU,gBAAgB;IACxB,gBAAgB,EAAE,CAAC,IAAI,EAAE;QAAE,KAAK,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,CAAA;KAAE,KAAK,IAAI,CAAC;IACtE,qBAAqB,EAAE,CAAC,WAAW,EAAE;QACnC,SAAS,EAAE,CAAC,OAAO,EAAE,6BAA6B,EAAE,IAAI,EAAE;YAAE,MAAM,EAAE,MAAM,IAAI,CAAA;SAAE,KAAK,IAAI,CAAC;KAC3F,KAAK,IAAI,CAAC;CACZ;AAWD;;;;GAIG;AACH,eAAO,MAAM,eAAe,2CAAsC,CAAC;AAQnE;;GAEG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,gBAAgB,GAAG,IAAI,CAiBjE"}
@@ -1 +1 @@
1
- {"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/postgres.ts"],"names":[],"mappings":"AAyBA;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,2CAA0C,CAAC"}
1
+ {"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/postgres.ts"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,2CAA0C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/prisma.ts"],"names":[],"mappings":"AAoBA;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,2CAAwC,CAAC"}
1
+ {"version":3,"file":"prisma.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/prisma.ts"],"names":[],"mappings":"AAkBA;;;;;;;;GAQG;AACH,eAAO,MAAM,iBAAiB,2CAAwC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"initOtel.d.ts","sourceRoot":"","sources":["../../../src/sdk/initOtel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAOpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAgB1D;AAED,+BAA+B;AAC/B,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,mBAAmB,CAoBjE"}
1
+ {"version":3,"file":"initOtel.d.ts","sourceRoot":"","sources":["../../../src/sdk/initOtel.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAWpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAgB1D;AAED,+BAA+B;AAC/B,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,GAAG,mBAAmB,CAoBjE"}
@@ -20,6 +20,7 @@ export { postgresIntegration } from './integrations/tracing/postgres';
20
20
  export { prismaIntegration } from './integrations/tracing/prisma';
21
21
  export { hapiIntegration, setupHapiErrorHandler } from './integrations/tracing/hapi';
22
22
  export { koaIntegration, setupKoaErrorHandler } from './integrations/tracing/koa';
23
+ export { connectIntegration, setupConnectErrorHandler } from './integrations/tracing/connect';
23
24
  export { spotlightIntegration } from './integrations/spotlight';
24
25
  export { init, getDefaultIntegrations } from './sdk/init';
25
26
  export { initOpenTelemetry } from './sdk/initOtel';
@@ -31,7 +32,7 @@ export { NodeClient } from './sdk/client';
31
32
  export { cron } from './cron';
32
33
  export { NodeOptions } from './types';
33
34
  export { addRequestDataToEvent, DEFAULT_USER_INCLUDES, extractRequestData } from '@sentry/utils';
34
- export { continueTrace } from '@sentry/opentelemetry';
35
+ export { addOpenTelemetryInstrumentation, continueTrace, setOpenTelemetryContextAsyncContextStrategy as setNodeAsyncContextStrategy, } from '@sentry/opentelemetry';
35
36
  export { addBreadcrumb, isInitialized, getGlobalScope, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setUser, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentHub, getCurrentScope, getIsolationScope, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureConsoleIntegration, debugIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, sessionTimingIntegration, metricsDefault as metrics, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, trpcMiddleware, } from '@sentry/core';
36
- export { Breadcrumb, BreadcrumbHint, PolymorphicRequest, Request, SdkInfo, Event, EventHint, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, } from '@sentry/types';
37
+ export { Breadcrumb, BreadcrumbHint, PolymorphicRequest, Request, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, } from '@sentry/types';
37
38
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,6 @@
1
1
  import { Integration } from '@sentry/types';
2
2
  import { AnrIntegrationOptions } from './common';
3
+ export declare const base64WorkerScript = "###AnrWorkerScript###";
3
4
  type AnrInternal = {
4
5
  startWorker: () => void;
5
6
  stopWorker: () => void;
@@ -1,3 +1,4 @@
1
+ import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';
1
2
  interface HttpOptions {
2
3
  /**
3
4
  * Whether breadcrumbs should be recorded for requests.
@@ -14,6 +15,8 @@ interface HttpOptions {
14
15
  * This controls both span & breadcrumb creation - spans will be non recording if tracing is disabled.
15
16
  */
16
17
  ignoreIncomingRequests?: (url: string) => boolean;
18
+ /** Allows to pass a custom version of HttpInstrumentation. We use this for Next.js. */
19
+ _instrumentation?: typeof HttpInstrumentation;
17
20
  }
18
21
  /**
19
22
  * The http integration instruments Node's internal http and https modules.
@@ -54,4 +54,16 @@ export interface LocalVariablesIntegrationOptions {
54
54
  */
55
55
  maxExceptionsPerSecond?: number;
56
56
  }
57
+ export interface LocalVariablesWorkerArgs extends LocalVariablesIntegrationOptions {
58
+ /**
59
+ * Whether to enable debug logging.
60
+ */
61
+ debug: boolean;
62
+ /**
63
+ * Base path used to calculate module name.
64
+ *
65
+ * Defaults to `dirname(process.argv[1])` and falls back to `process.cwd()`
66
+ */
67
+ basePath?: string;
68
+ }
57
69
  //# sourceMappingURL=common.d.ts.map
@@ -1,2 +1,4 @@
1
- export declare const localVariablesIntegration: (options?: import("./common").LocalVariablesIntegrationOptions | undefined, session?: import("./local-variables-sync").DebugSession | undefined) => import("@sentry/types").Integration;
1
+ import { Integration } from '@sentry/types';
2
+ import { LocalVariablesIntegrationOptions } from './common';
3
+ export declare const localVariablesIntegration: (options?: LocalVariablesIntegrationOptions) => Integration;
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,7 @@
1
+ import { LocalVariablesIntegrationOptions } from './common';
2
+ export declare const base64WorkerScript = "###LocalVariablesWorkerScript###";
3
+ /**
4
+ * Adds local variables to exception frames
5
+ */
6
+ export declare const localVariablesAsyncIntegration: (integrationOptions?: LocalVariablesIntegrationOptions | undefined) => import("@sentry/types").Integration;
7
+ //# sourceMappingURL=local-variables-async.d.ts.map
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=worker.d.ts.map
@@ -0,0 +1,7 @@
1
+ type ConnectApp = {
2
+ use: (middleware: any) => void;
3
+ };
4
+ export declare const connectIntegration: () => import("@sentry/types").Integration;
5
+ export declare const setupConnectErrorHandler: (app: ConnectApp) => void;
6
+ export {};
7
+ //# sourceMappingURL=connect.d.ts.map
@@ -1,2 +0,0 @@
1
- export declare const base64WorkerScript = "###base64WorkerScript###";
2
- //# sourceMappingURL=worker-script.d.ts.map