Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@sentry/node

Package Overview
Dependencies
Maintainers
11
Versions
542
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@sentry/node - npm Package Compare versions

Comparing version 8.41.0-beta.1 to 8.41.0

18

build/cjs/integrations/anr/index.js

@@ -8,3 +8,2 @@ var {

const diagnosticsChannel = require('node:diagnostics_channel');
const node_worker_threads = require('node:worker_threads');

@@ -15,3 +14,3 @@ const core = require('@sentry/core');

// This string is a placeholder that gets overwritten with the worker code.
const base64WorkerScript = 'LyohIEBzZW50cnkvbm9kZSA4LjQxLjAtYmV0YS4xIChiNDQwMmFhKSB8IGh0dHBzOi8vZ2l0aHViLmNvbS9nZXRzZW50cnkvc2VudHJ5LWphdmFzY3JpcHQgKi8KaW1wb3J0e1Nlc3Npb24gYXMgdH1mcm9tIm5vZGU6aW5zcGVjdG9yIjtpbXBvcnR7cGFyZW50UG9ydCBhcyBuLHdvcmtlckRhdGEgYXMgZX1mcm9tIm5vZGU6d29ya2VyX3RocmVhZHMiO2ltcG9ydHtwb3NpeCBhcyByLHNlcCBhcyBvfWZyb20ibm9kZTpwYXRoIjtpbXBvcnQqYXMgcyBmcm9tIm5vZGU6aHR0cCI7aW1wb3J0KmFzIGkgZnJvbSJub2RlOmh0dHBzIjtpbXBvcnR7UmVhZGFibGUgYXMgY31mcm9tIm5vZGU6c3RyZWFtIjtpbXBvcnR7Y3JlYXRlR3ppcCBhcyB1fWZyb20ibm9kZTp6bGliIjtpbXBvcnQqYXMgYSBmcm9tIm5vZGU6bmV0IjtpbXBvcnQqYXMgZiBmcm9tIm5vZGU6dGxzIjtjb25zdCBoPSJ1bmRlZmluZWQiPT10eXBlb2YgX19TRU5UUllfREVCVUdfX3x8X19TRU5UUllfREVCVUdfXyxwPSI4LjQxLjAtYmV0YS4xIixsPWdsb2JhbFRoaXM7ZnVuY3Rpb24gZCh0LG4sZSl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XJue2dldFRpbWVNczooKT0+e2NvbnN0W24sZV09cHJvY2Vzcy5ocnRpbWUodCk7cmV0dXJuIE1hdGguZmxvb3IoMWUzKm4rZS8xZTYpfSxyZXNldDooKT0+e3Q9cHJvY2Vzcy5ocnRpbWUoKX19fSksZG4ucG9sbEludGVydmFsLGRuLmFuclRocmVzaG9sZCwoZnVuY3Rpb24oKXtibigiV2F0Y2hkb2cgdGltZW91dCIpLE5uPyhibigiUGF1c2luZyBkZWJ1Z2dlciB0byBjYXB0dXJlIHN0YWNrIHRyYWNlIiksTm4oKSk6KGJuKCJDYXB0dXJpbmcgZXZlbnQgd2l0aG91dCBhIHN0YWNrIHRyYWNlIikseG4oKS50aGVuKG51bGwsKCgpPT57Ym4oIlNlbmRpbmcgQU5SIGV2ZW50IGZhaWxlZCBvbiB3YXRjaGRvZyB0aW1lb3V0LiIpfSkpKX0pKTtuPy5vbigibWVzc2FnZSIsKHQ9Pnt0LnNlc3Npb24mJihtbj1LKHQuc2Vzc2lvbikpLHQuZGVidWdJbWFnZXMmJih5bj10LmRlYnVnSW1hZ2VzKSxUbigpfSkpOw==';

@@ -105,9 +104,2 @@ const DEFAULT_INTERVAL = 50;

function onModuleLoad(callback) {
// eslint-disable-next-line deprecation/deprecation
diagnosticsChannel.channel('module.require.end').subscribe(() => callback());
// eslint-disable-next-line deprecation/deprecation
diagnosticsChannel.channel('module.import.asyncEnd').subscribe(() => callback());
}
/**

@@ -166,8 +158,2 @@ * Starts the ANR worker thread

let debugImages = core.getFilenameToDebugIdMap(initOptions.stackParser);
onModuleLoad(() => {
debugImages = core.getFilenameToDebugIdMap(initOptions.stackParser);
});
const worker = new node_worker_threads.Worker(new URL(`data:application/javascript;base64,${base64WorkerScript}`), {

@@ -191,3 +177,3 @@ workerData: options,

// message the worker to tell it the main event loop is still running
worker.postMessage({ session, debugImages });
worker.postMessage({ session, debugImages: core.getFilenameToDebugIdMap(initOptions.stackParser) });
} catch (_) {

@@ -194,0 +180,0 @@ //

2

build/cjs/integrations/local-variables/local-variables-async.js

@@ -12,3 +12,3 @@ var {

// This string is a placeholder that gets overwritten with the worker code.
const base64WorkerScript = 'LyohIEBzZW50cnkvbm9kZSA4LjQxLjAtYmV0YS4xIChiNDQwMmFhKSB8IGh0dHBzOi8vZ2l0aHViLmNvbS9nZXRzZW50cnkvc2VudHJ5LWphdmFzY3JpcHQgKi8KaW1wb3J0e1Nlc3Npb24gYXMgZX1mcm9tIm5vZGU6aW5zcGVjdG9yL3Byb21pc2VzIjtpbXBvcnR7d29ya2VyRGF0YSBhcyB0fWZyb20ibm9kZTp3b3JrZXJfdGhyZWFkcyI7Y29uc3Qgbj0iOC40MS4wLWJldGEuMSIsbz1nbG9iYWxUaGlzO2NvbnN0IGk9InVuZGVmaW5lZCI9PXR5cGVvZiBfX1NFTlRSWV9ERUJVR19ffHxfX1NFTlRSWV9ERUJVR19fLGE9WyJkZWJ1ZyIsImluZm8iLCJ3YXJuIiwiZXJyb3IiLCJsb2ciLCJhc3NlcnQiLCJ0cmFjZSJdLHM9e307ZnVuY3Rpb24gYyhlKXtpZighKCJjb25zb2xlImluIG8pKXJldHVybiBlKCk7Y29uc3QgdD1vLmNvbnNvbGUsbj17fSxpPU9iamVjdC5rZXlzKHMpO2kuZm9yRWFjaCgoZT0+e2NvbnN0IG89c1tlXTtuW2VdPXRbZV0sdFtlXT1vfSkpO3RyeXtyZXR1cm4gZSgpfWZpbmFsbHl7aS5mb3JFYWNoKChlPT57dFtlXT1uW2VdfSkpfX0hZnVuY3Rpb24oZSx0LGkpe2NvbnN0IGE9byxzPWEuX19TRU5UUllfXz1hLl9fU0VOVFJZX198fHt9LGM9c1tuXT1zW25dfHx7fTtjW2VdfHwoY1tlXT10KCkpfSgibG9nZ2VyIiwoZnVuY3Rpb24oKXtsZXQgZT0hMTtjb25zdCB0PXtlbmFibGU6KCk9PntlPSEwfSxkaXNhYmxlOigpPT57ZT0hMX0saXNFbmFibGVkOigpPT5lfTtyZXR1cm4gaT9hLmZv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lvbnMgZm9yICR7ZX0gc2Vjb25kcy5gKSxhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6InVuY2F1Z2h0In0pfSkpfX0pKCkuY2F0Y2goKGU9PntsKCJGYWlsZWQgdG8gc3RhcnQgZGVidWdnZXIiLGUpfSkpLHNldEludGVydmFsKCgoKT0+e30pLDFlNCk7';

@@ -15,0 +15,0 @@ function log(...args) {

@@ -10,3 +10,5 @@ var {

const api = require('@opentelemetry/api');
const instrumentation = require('@opentelemetry/instrumentation');
const core = require('@sentry/core');
const opentelemetry = require('@sentry/opentelemetry');
const worker_threads = require('worker_threads');

@@ -28,2 +30,8 @@ const debugBuild = require('../debug-build.js');

if (options.openTelemetryInstrumentations) {
instrumentation.registerInstrumentations({
instrumentations: options.openTelemetryInstrumentations,
});
}
core.applySdkMetadata(clientOptions, 'node');

@@ -118,2 +126,13 @@

}
/** Custom implementation for OTEL, so we can handle scope-span linking. */
_getTraceInfoFromScope(
scope,
) {
if (!scope) {
return [undefined, undefined];
}
return opentelemetry.getTraceContextForScope(this, scope);
}
}

@@ -120,0 +139,0 @@

@@ -33,2 +33,3 @@ var {

function getRegisterOptions(esmHookConfig) {
// TODO(v9): Make onlyIncludeInstrumentedModules: true the default behavior.
if (_optionalChain([esmHookConfig, 'optionalAccess', _ => _.onlyIncludeInstrumentedModules])) {

@@ -38,2 +39,3 @@ const { addHookMessagePort } = importInTheMiddle.createAddHookMessageChannel();

// are wrapped if they are not hooked
// eslint-disable-next-line deprecation/deprecation
return { data: { addHookMessagePort, include: esmHookConfig.include || [] }, transferList: [addHookMessagePort] };

@@ -68,3 +70,3 @@ }

console.warn(
'[Sentry] You are using Node.js in ESM mode ("import syntax"). The Sentry Node.js SDK is not compatible with ESM in Node.js versions before 18.19.0 or before 20.6.0. Please either build your application with CommonJS ("require() syntax"), or use version 7.x of the Sentry Node.js SDK.',
'[Sentry] You are using Node.js in ESM mode ("import syntax"). The Sentry Node.js SDK is not compatible with ESM in Node.js versions before 18.19.0 or before 20.6.0. Please either build your application with CommonJS ("require() syntax"), or upgrade your Node.js version.',
);

@@ -71,0 +73,0 @@ });

import { _optionalChain, _optionalChainDelete } from '@sentry/core';
import * as diagnosticsChannel from 'node:diagnostics_channel';
import { Worker } from 'node:worker_threads';

@@ -8,3 +7,3 @@ import { defineIntegration, getGlobalScope, mergeScopeData, getIsolationScope, getCurrentScope, logger, getFilenameToDebugIdMap, GLOBAL_OBJ } from '@sentry/core';

// This string is a placeholder that gets overwritten with the worker code.
const base64WorkerScript = 'LyohIEBzZW50cnkvbm9kZSA4LjQxLjAtYmV0YS4xIChiNDQwMmFhKSB8IGh0dHBzOi8vZ2l0aHViLmNvbS9nZXRzZW50cnkvc2VudHJ5LWphdmFzY3JpcHQgKi8KaW1wb3J0e1Nlc3Npb24gYXMgdH1mcm9tIm5vZGU6aW5zcGVjdG9yIjtpbXBvcnR7cGFyZW50UG9ydCBhcyBuLHdvcmtlckRhdGEgYXMgZX1mcm9tIm5vZGU6d29ya2VyX3RocmVhZHMiO2ltcG9ydHtwb3NpeCBhcyByLHNlcCBhcyBvfWZyb20ibm9kZTpwYXRoIjtpbXBvcnQqYXMgcyBmcm9tIm5vZGU6aHR0cCI7aW1wb3J0KmFzIGkgZnJvbSJub2RlOmh0dHBzIjtpbXBvcnR7UmVhZGFibGUgYXMgY31mcm9tIm5vZGU6c3RyZWFtIjtpbXBvcnR7Y3JlYXRlR3ppcCBhcyB1fWZyb20ibm9kZTp6bGliIjtpbXBvcnQqYXMgYSBmcm9tIm5vZGU6bmV0IjtpbXBvcnQqYXMgZiBmcm9tIm5vZGU6dGxzIjtjb25zdCBoPSJ1bmRlZmluZWQiPT10eXBlb2YgX19TRU5UUllfREVCVUdfX3x8X19TRU5UUllfREVCVUdfXyxwPSI4LjQxLjAtYmV0YS4xIixsPWdsb2JhbFRoaXM7ZnVuY3Rpb24gZCh0LG4sZSl7Y29uc3Qgcj1sLG89ci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e2NvbnN0W24sZV09cHJvY2Vzcy5ocnRpbWUodCk7cmV0dXJuIE1hdGguZmxvb3IoMWUzKm4rZS8xZTYpfSxyZXNldDooKT0+e3Q9cHJvY2Vzcy5ocnRpbWUoKX19fSksZG4ucG9sbEludGVydmFsLGRuLmFuclRocmVzaG9sZCwoZnVuY3Rpb24oKXtibigiV2F0Y2hkb2cgdGltZW91dCIpLE5uPyhibigiUGF1c2luZyBkZWJ1Z2dlciB0byBjYXB0dXJlIHN0YWNrIHRyYWNlIiksTm4oKSk6KGJuKCJDYXB0dXJpbmcgZXZlbnQgd2l0aG91dCBhIHN0YWNrIHRyYWNlIikseG4oKS50aGVuKG51bGwsKCgpPT57Ym4oIlNlbmRpbmcgQU5SIGV2ZW50IGZhaWxlZCBvbiB3YXRjaGRvZyB0aW1lb3V0LiIpfSkpKX0pKTtuPy5vbigibWVzc2FnZSIsKHQ9Pnt0LnNlc3Npb24mJihtbj1LKHQuc2Vzc2lvbikpLHQuZGVidWdJbWFnZXMmJih5bj10LmRlYnVnSW1hZ2VzKSxUbigpfSkpOw==';

@@ -98,9 +97,2 @@ const DEFAULT_INTERVAL = 50;

function onModuleLoad(callback) {
// eslint-disable-next-line deprecation/deprecation
diagnosticsChannel.channel('module.require.end').subscribe(() => callback());
// eslint-disable-next-line deprecation/deprecation
diagnosticsChannel.channel('module.import.asyncEnd').subscribe(() => callback());
}
/**

@@ -159,8 +151,2 @@ * Starts the ANR worker thread

let debugImages = getFilenameToDebugIdMap(initOptions.stackParser);
onModuleLoad(() => {
debugImages = getFilenameToDebugIdMap(initOptions.stackParser);
});
const worker = new Worker(new URL(`data:application/javascript;base64,${base64WorkerScript}`), {

@@ -184,3 +170,3 @@ workerData: options,

// message the worker to tell it the main event loop is still running
worker.postMessage({ session, debugImages });
worker.postMessage({ session, debugImages: getFilenameToDebugIdMap(initOptions.stackParser) });
} catch (_) {

@@ -187,0 +173,0 @@ //

@@ -1,2 +0,2 @@

/*! @sentry/node 8.41.0-beta.1 (b4402aa) | https://github.com/getsentry/sentry-javascript */
import{Session as t}from"node:inspector";import{parentPort as n,workerData as e}from"node:worker_threads";import{posix as r,sep as o}from"node:path";import*as s from"node:http";import*as i from"node:https";import{Readable as c}from"node:stream";import{createGzip as u}from"node:zlib";import*as a from"node:net";import*as f from"node:tls";const h="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,p="8.41.0-beta.1",l=globalThis;function d(t,n,e){const r=l,o=r.__SENTRY__=r.__SENTRY__||{},s=o[p]=o[p]||{};return s[t]||(s[t]=n())}const m="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,g=["debug","info","warn","error","log","assert","trace"],y={};function b(t){if(!("console"in l))return t();const n=l.console,e={},r=Object.keys(y);r.forEach((t=>{const r=y[t];e[t]=n[t],n[t]=r}));try{return t()}finally{r.forEach((t=>{n[t]=e[t]}))}}const _=d("logger",(function(){let t=!1;const n={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return m?g.forEach((e=>{n[e]=(...n)=>{t&&b((()=>{l.console[e](`Sentry Logger [${e}]:`,...n)}))}})):g.forEach((t=>{n[t]=()=>{}})),n})),v=50,w="?",S=/captureMessage|captureException/;function $(t){return t[t.length-1]||{}}const E="<anonymous>";function x(){return N(l),l}function N(t){const n=t.__SENTRY__=t.__SENTRY__||{};return n.version=n.version||p,n[p]=n[p]||{}}const T=Object.prototype.toString;function j(t,n){return T.call(t)===`[object ${n}]`}function k(t){return j(t,"String")}function C(t){return j(t,"Object")}function O(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function D(t,n){try{return t instanceof n}catch(t){return!1}}const R=l,A=80;function I(t,n){const e=t,r=[];if(!e||!e.tagName)return"";if(R.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 o=n&&n.length?n.filter((t=>e.getAttribute(t))).map((t=>[t,e.getAttribute(t)])):null;if(o&&o.length)o.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else{e.id&&r.push(`#${e.id}`);const t=e.className;if(t&&k(t)){const n=t.split(/\s+/);for(const t of n)r.push(`.${t}`)}}const s=["aria-label","type","name","title","alt"];for(const t of s){const n=e.getAttribute(t);n&&r.push(`[${t}="${n}"]`)}return r.join("")}function P(t){if(function(t){switch(T.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return D(t,Error)}}(t))return{message:t.message,name:t.name,stack:t.stack,...U(t)};if(n=t,"undefined"!=typeof Event&&D(n,Event)){const n={type:t.type,target:M(t.target),currentTarget:M(t.currentTarget),...U(t)};return"undefined"!=typeof CustomEvent&&D(t,CustomEvent)&&(n.detail=t.detail),n}return t;var n}function M(t){try{return n=t,"undefined"!=typeof Element&&D(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||A;for(;e&&s++<r&&(a=I(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 U(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 L(t){return B(t,new Map)}function B(t,n){if(function(t){if(!C(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.getOwnPropertyNames(t))void 0!==t[e]&&(r[e]=B(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(B(t,n))})),r}return t}const G=1e3;function J(){return Date.now()/G}const Y=function(){const{performance:t}=l;if(!t||!t.now)return J;const n=Date.now()-t.now(),e=null==t.timeOrigin?n:t.timeOrigin;return()=>(e+t.now())/G}();function z(){const t=l,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)))}var H;function W(t){return new F((n=>{n(t)}))}(()=>{const{performance:t}=l;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)})(),function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(H||(H={}));class F{constructor(t){F.prototype.__init.call(this),F.prototype.__init2.call(this),F.prototype.__init3.call(this),F.prototype.__init4.call(this),this.t=H.PENDING,this.o=[];try{t(this.i,this.u)}catch(t){this.u(t)}}then(t,n){return new F(((e,r)=>{this.o.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.h()}))}catch(t){return this.then((t=>t),t)}finally(t){return new F(((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.i=t=>{this.p(H.RESOLVED,t)}}__init2(){this.u=t=>{this.p(H.REJECTED,t)}}__init3(){this.p=(t,n)=>{this.t===H.PENDING&&(O(n)?n.then(this.i,this.u):(this.t=t,this.l=n,this.h()))}}__init4(){this.h=()=>{if(this.t===H.PENDING)return;const t=this.o.slice();this.o=[],t.forEach((t=>{t[0]||(this.t===H.RESOLVED&&t[1](this.l),this.t===H.REJECTED&&t[2](this.l),t[0]=!0)}))}}}function K(t){const n=Y(),e={sid:z(),init:!0,timestamp:n,started:n,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return L({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&&V(e,t),e}function V(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||Y(),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:z()),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)}function Z(){return{traceId:z(),spanId:z().substring(16)}}function q(t,n,e=2){if(!n||"object"!=typeof n||e<=0)return n;if(t&&n&&0===Object.keys(n).length)return t;const r={...t};for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=q(r[t],n[t],e-1));return r}const Q="_sentrySpan";function X(t,n){n?function(t,n,e){try{Object.defineProperty(t,n,{value:e,writable:!0,configurable:!0})}catch(e){m&&_.log(`Failed to add non-enumerable property "${n}" to object`,t)}}(t,Q,n):delete t[Q]}function tt(t){return t[Q]}class nt{constructor(){this.m=!1,this._=[],this.v=[],this.S=[],this.N=[],this.T={},this.j={},this.k={},this.C={},this.O={},this.D=Z()}clone(){const t=new nt;return t.S=[...this.S],t.j={...this.j},t.k={...this.k},t.C={...this.C},this.C.flags&&(t.C.flags={values:[...this.C.flags.values]}),t.T=this.T,t.R=this.R,t.A=this.A,t.I=this.I,t.P=this.P,t.v=[...this.v],t.M=this.M,t.N=[...this.N],t.O={...this.O},t.D={...this.D},t.U=this.U,t.L=this.L,X(t,tt(this)),t}setClient(t){this.U=t}setLastEventId(t){this.L=t}getClient(){return this.U}lastEventId(){return this.L}addScopeListener(t){this._.push(t)}addEventProcessor(t){return this.v.push(t),this}setUser(t){return this.T=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.A&&V(this.A,{user:t}),this.B(),this}getUser(){return this.T}getRequestSession(){return this.M}setRequestSession(t){return this.M=t,this}setTags(t){return this.j={...this.j,...t},this.B(),this}setTag(t,n){return this.j={...this.j,[t]:n},this.B(),this}setExtras(t){return this.k={...this.k,...t},this.B(),this}setExtra(t,n){return this.k={...this.k,[t]:n},this.B(),this}setFingerprint(t){return this.P=t,this.B(),this}setLevel(t){return this.R=t,this.B(),this}setTransactionName(t){return this.I=t,this.B(),this}setContext(t,n){return null===n?delete this.C[t]:this.C[t]=n,this.B(),this}setSession(t){return t?this.A=t:delete this.A,this.B(),this}getSession(){return this.A}update(t){if(!t)return this;const n="function"==typeof t?t(this):t,[e,r]=n instanceof et?[n.getScopeData(),n.getRequestSession()]:C(n)?[t,t.requestSession]:[],{tags:o,extra:s,user:i,contexts:c,level:u,fingerprint:a=[],propagationContext:f}=e||{};return this.j={...this.j,...o},this.k={...this.k,...s},this.C={...this.C,...c},i&&Object.keys(i).length&&(this.T=i),u&&(this.R=u),a.length&&(this.P=a),f&&(this.D=f),r&&(this.M=r),this}clear(){return this.S=[],this.j={},this.k={},this.T={},this.C={},this.R=void 0,this.I=void 0,this.P=void 0,this.M=void 0,this.A=void 0,X(this,void 0),this.N=[],this.D=Z(),this.B(),this}addBreadcrumb(t,n){const e="number"==typeof n?n:100;if(e<=0)return this;const r={timestamp:J(),...t},o=this.S;return o.push(r),this.S=o.length>e?o.slice(-e):o,this.B(),this}getLastBreadcrumb(){return this.S[this.S.length-1]}clearBreadcrumbs(){return this.S=[],this.B(),this}addAttachment(t){return this.N.push(t),this}clearAttachments(){return this.N=[],this}getScopeData(){return{breadcrumbs:this.S,attachments:this.N,contexts:this.C,tags:this.j,extra:this.k,user:this.T,level:this.R,fingerprint:this.P||[],eventProcessors:this.v,propagationContext:this.D,sdkProcessingMetadata:this.O,transactionName:this.I,span:tt(this)}}setSDKProcessingMetadata(t){return this.O=q(this.O,t,2),this}setPropagationContext(t){return this.D=t,this}getPropagationContext(){return this.D}captureException(t,n){const e=n&&n.event_id?n.event_id:z();if(!this.U)return _.warn("No client configured on scope - will not capture exception!"),e;const r=new Error("Sentry syntheticException");return this.U.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:z();if(!this.U)return _.warn("No client configured on scope - will not capture message!"),r;const o=new Error(t);return this.U.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:z();return this.U?(this.U.captureEvent(t,{...n,event_id:e},this),e):(_.warn("No client configured on scope - will not capture event!"),e)}B(){this.m||(this.m=!0,this._.forEach((t=>{t(this)})),this.m=!1)}}const et=nt;class rt{constructor(t,n){let e,r;e=t||new et,r=n||new et,this.G=[{scope:e}],this.J=r}withScope(t){const n=this.Y();let e;try{e=t(n)}catch(t){throw this.H(),t}return O(e)?e.then((t=>(this.H(),t)),(t=>{throw this.H(),t})):(this.H(),e)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.J}getStackTop(){return this.G[this.G.length-1]}Y(){const t=this.getScope().clone();return this.G.push({client:this.getClient(),scope:t}),t}H(){return!(this.G.length<=1)&&!!this.G.pop()}}function ot(){const t=N(x());return t.stack=t.stack||new rt(d("defaultCurrentScope",(()=>new et)),d("defaultIsolationScope",(()=>new et)))}function st(t){return ot().withScope(t)}function it(t,n){const e=ot();return e.withScope((()=>(e.getStackTop().scope=t,n(t))))}function ct(t){return ot().withScope((()=>t(ot().getIsolationScope())))}function ut(t){const n=N(t);return n.acs?n.acs:{withIsolationScope:ct,withScope:st,withSetScope:it,withSetIsolationScope:(t,n)=>ct(n),getCurrentScope:()=>ot().getScope(),getIsolationScope:()=>ot().getIsolationScope()}}function at(){return ut(x()).getCurrentScope().getClient()}const ft="_sentryMetrics";function ht(t){const n=t[ft];if(!n)return;const e={};for(const[,[t,r]]of n){(e[t]||(e[t]=[])).push(L(r))}return e}const pt="sentry.source",lt="sentry.sample_rate",dt="sentry.op",mt="sentry.origin",gt=0,yt=1,bt="sentry-",_t=/^sentry-/;function vt(t){const n=function(t){if(!t||!k(t)&&!Array.isArray(t))return;if(Array.isArray(t))return t.reduce(((t,n)=>{const e=wt(n);return Object.entries(e).forEach((([n,e])=>{t[n]=e})),t}),{});return wt(t)}(t);if(!n)return;const e=Object.entries(n).reduce(((t,[n,e])=>{if(n.match(_t)){t[n.slice(bt.length)]=e}return t}),{});return Object.keys(e).length>0?e:void 0}function wt(t){return t.split(",").map((t=>t.split("=").map((t=>decodeURIComponent(t.trim()))))).reduce(((t,[n,e])=>(n&&e&&(t[n]=e),t)),{})}const St=1;function $t(t){const{spanId:n,traceId:e}=t.spanContext(),{parent_span_id:r}=Nt(t);return L({parent_span_id:r,span_id:n,trace_id:e})}function Et(t){return"number"==typeof t?xt(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?xt(t.getTime()):Y()}function xt(t){return t>9999999999?t/1e3:t}function Nt(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 L({span_id:n,trace_id:e,data:r,description:s,parent_span_id:c,start_timestamp:Et(o),timestamp:Et(i)||void 0,status:Tt(u),op:r[dt],origin:r[mt],_metrics_summary:ht(t)})}return{span_id:n,trace_id:e}}catch(t){return{}}}function Tt(t){if(t&&t.code!==gt)return t.code===yt?"ok":t.message||"unknown_error"}const jt="_sentryRootSpan";function kt(t){return t[jt]||t}const Ct="production",Ot="_frozenDsc";function Dt(t){const n=at();if(!n)return{};const e=function(t,n){const e=n.getOptions(),{publicKey:r}=n.getDsn()||{},o=L({environment:e.environment||Ct,release:e.release,public_key:r,trace_id:t});return n.emit("createDsc",o),o}(Nt(t).trace_id||"",n),r=kt(t),o=r[Ot];if(o)return o;const s=r.spanContext().traceState,i=s&&s.get("sentry.dsc"),c=i&&vt(i);if(c)return c;const u=Nt(r),a=u.data||{},f=a[lt];null!=f&&(e.sample_rate=`${f}`);const h=a[pt],p=u.description;return"url"!==h&&p&&(e.transaction=p),function(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const n=at(),e=n&&n.getOptions();return!!e&&(e.enableTracing||"tracesSampleRate"in e||"tracesSampler"in e)}()&&(e.sampled=String(function(t){const{traceFlags:n}=t.spanContext();return n===St}(r))),n.emit("createDsc",e,r),e}function Rt(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}`}function At(t,n=100,e=1/0){try{return It("",t,n,e)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function It(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||["boolean","string"].includes(typeof n)||"number"==typeof n&&Number.isFinite(n))return n;const c=function(t,n){try{if("domain"===t&&n&&"object"==typeof n&&n.W)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.F))return"[VueViewModel]";if(function(t){return C(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}(n))return"[SyntheticEvent]";if("number"==typeof n&&!Number.isFinite(n))return`[${n}]`;if("function"==typeof n)return`[Function: ${function(t){try{return t&&"function"==typeof t&&t.name||E}catch(t){return E}}(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 It("",a.toJSON(),u-1,r,o)}catch(t){}const f=Array.isArray(n)?[]:{};let h=0;const p=P(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]=It(t,n,u-1,r,o),h++}return i(n),f}function Pt(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:///")}function Mt(t,n=[]){return[t,n]}function Ut(t,n){const e=t[1];for(const t of e){if(n(t,t[0].type))return!0}return!1}function Lt(t){return l.__SENTRY__&&l.__SENTRY__.encodePolyfill?l.__SENTRY__.encodePolyfill(t):(new TextEncoder).encode(t)}function Bt(t){const[n,e]=t;let r=JSON.stringify(n);function o(t){"string"==typeof r?r="string"==typeof t?r+t:[Lt(r),t]:r.push("string"==typeof t?Lt(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(At(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 Gt={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Jt(t){if(!t||!t.sdk)return;const{name:n,version:e}=t.sdk;return{name:n,version:e}}function Yt(t,n,e,r){const o=Jt(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:Rt(r)},...o&&{trace:L({...o})}}}(t,o,r,n);delete t.sdkProcessingMetadata;return Mt(i,[[{type:s},t]])}const zt="__SENTRY_SUPPRESS_TRACING__";function Ht(t){const n=ut(x());return n.suppressTracing?n.suppressTracing(t):function(...t){const n=ut(x());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({[zt]:!0}),t())))}function Wt(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=L(e);u&&Object.keys(u).length&&(t.extra={...u,...t.extra});const a=L(r);a&&Object.keys(a).length&&(t.tags={...a,...t.tags});const f=L(o);f&&Object.keys(f).length&&(t.user={...f,...t.user});const h=L(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:$t(n),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:Dt(n),...t.sdkProcessingMetadata};const e=kt(n),r=Nt(e).description;r&&!t.transaction&&"transaction"===t.type&&(t.transaction=r)}(t,r),function(t,n){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],n&&(t.fingerprint=t.fingerprint.concat(n));t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,e),function(t,n){const e=[...t.breadcrumbs||[],...n];t.breadcrumbs=e.length?e:void 0}(t,o),function(t,n){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...n}}(t,s)}const Ft="7";class Kt 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 Vt(t){const n=[];function e(t){return n.splice(n.indexOf(t),1)[0]||Promise.resolve(void 0)}return{$:n,add:function(r){if(!(void 0===t||n.length<t))return o=new Kt("Not adding Promise because buffer limit was reached."),new F(((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 F(((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)}))}))}}}const Zt=6e4;function qt(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)?Zt:r-n}(i,r):429===n&&(o.all=r+6e4);return o}const Qt=64;function Xt(t,n,e=Vt(t.bufferSize||Qt)){let r={};return{send:function(t){const o=[];if(Ut(t,((t,n)=>{const e=function(t){return Gt[t]}(n);(function(t,n,e=Date.now()){return function(t,n){return t[n]||t.all||0}(t,n)>e})(r,e)||o.push(t)})),0===o.length)return W({});const s=Mt(t[0],o),i=t=>{Ut(s,((t,n)=>{}))};return e.add((()=>n({body:Bt(s)}).then((t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&h&&_.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=qt(r,t),t)),(t=>{throw i(),t})))).then((t=>t),(t=>{if(t instanceof Kt)return h&&_.error("Skipped sending event because buffer is full."),i(),W({});throw t}))},flush:t=>e.drain(t)}}const tn=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function nn(t){const n=function(t){const n=t.length>1024?`<truncated>${t.slice(-1024)}`:t,e=tn.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):"."}function en(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 rn=Symbol("AgentBaseInternalState");class on extends s.Agent{[rn];options;keepAlive;constructor(t){super(t),this[rn]={}}isSecureEndpoint(t){if(t){if("boolean"==typeof t.secureEndpoint)return t.secureEndpoint;if("string"==typeof t.protocol)return"https:"===t.protocol}const{stack:n}=new Error;return"string"==typeof n&&n.split("\n").some((t=>-1!==t.indexOf("(https.js:")||-1!==t.indexOf("node:https:")))}createSocket(t,n,e){const r={...n,secureEndpoint:this.isSecureEndpoint(n)};Promise.resolve().then((()=>this.connect(t,r))).then((o=>{if(o instanceof s.Agent)return o.addRequest(t,r);this[rn].currentSocket=o,super.createSocket(t,n,e)}),e)}createConnection(){const t=this[rn].currentSocket;if(this[rn].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[rn].defaultPort??("https:"===this.protocol?443:80)}set defaultPort(t){this[rn]&&(this[rn].defaultPort=t)}get protocol(){return this[rn].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[rn]&&(this[rn].protocol=t)}}function sn(...t){_.log("[https-proxy-agent:parse-proxy-response]",...t)}function cn(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 sn("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]||0),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}sn("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(),sn("onend"),e(new Error("Proxy connection ended before receiving CONNECT response"))}function u(t){i(),sn("onerror %o",t),e(t)}t.on("error",u),t.on("end",c),s()}))}function un(...t){_.log("[https-proxy-agent]",...t)}class an extends on{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??{},un("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?hn(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){un("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 un("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=cn(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",fn),n.secureEndpoint){un("Upgrading socket connection to TLS");const t=n.servername||n.host;return f.connect({...hn(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=>{un("Replaying proxy buffer for failed request"),t.push(h),t.push(null)})),p}}function fn(t){t.resume()}function hn(t,...n){const e={};let r;for(r in t)n.includes(r)||(e[r]=t[r]);return e}const pn=32768;function ln(t){return t.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}const dn=e;let mn,gn=!1,yn={};function bn(t){dn.debug&&console.log(`[ANR Worker] ${t}`)}var _n,vn,wn;const Sn=function(t){let n;try{n=new URL(t.url)}catch(n){return b((()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.")})),Xt(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 an(r):new o.Agent({keepAlive:a,maxSockets:30,timeout:2e3}),h=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)=>{Ht((()=>{let l=function(t){return new c({read(){this.push(t),this.push(null)}})}(f.body);const d={...t.headers};f.body.length>pn&&(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]||null:e}})}));m.on("error",p),l.pipe(m)}))}))}}(t,t.httpModule??o,f);return Xt(t,h)}({url:(_n=dn.dsn,vn=dn.tunnel,wn=dn.sdkMetadata.sdk,vn||`${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/`}(_n)}?${function(t,n){const e={sentry_version:Ft};return t.publicKey&&(e.sentry_key=t.publicKey),n&&(e.sentry_client=`${n.name}/${n.version}`),new URLSearchParams(e).toString()}(_n,wn)}`),recordDroppedEvent:()=>{}});async function $n(){if(mn){bn("Sending abnormal session"),V(mn,{status:"abnormal",abnormal_mechanism:"anr_foreground"});const t=function(t,n,e,r){const o=Jt(e);return Mt({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&n&&{dsn:Rt(n)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(mn,dn.dsn,dn.sdkMetadata,dn.tunnel);bn(JSON.stringify(t)),await Sn.send(t);try{n?.postMessage("session-ended")}catch(t){}}}function En(t){if(!t)return;const n=function(t){if(!t.length)return[];const n=Array.from(t);return/sentryWrapped/.test($(n).function||"")&&n.pop(),n.reverse(),S.test($(n).function||"")&&(n.pop(),S.test($(n).function||"")&&n.pop()),n.slice(0,v).map((t=>({...t,filename:t.filename||$(n).filename,function:t.function||w})))}(t);if(dn.appRootPath)for(const t of n)t.filename&&(t.filename=Pt(t.filename,dn.appRootPath));return n}async function xn(t,n){if(gn)return;gn=!0,await $n(),bn("Sending event");const e={event_id:z(),contexts:dn.contexts,release:dn.release,environment:dn.environment,dist:dn.dist,platform:"node",level:"error",exception:{values:[{type:"ApplicationNotResponding",value:`Application Not Responding for at least ${dn.anrThreshold} ms`,stacktrace:{frames:En(t)},mechanism:{type:"ANR"}}]},tags:dn.staticTags};n&&function(t,n){if(Wt(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),function(t){if(0===Object.keys(yn).length)return;const n=new Map;for(const e of t.exception?.values||[])for(const t of e.stacktrace?.frames||[]){const e=t.abs_path||t.filename;e&&yn[e]&&n.set(e,yn[e])}if(n.size>0){const e=[];for(const[t,r]of n.entries())e.push({type:"sourcemap",code_file:t,debug_id:r});t.debug_meta={images:e}}}(e);const r=Yt(e,dn.dsn,dn.sdkMetadata,dn.tunnel);bn(JSON.stringify(r)),await Sn.send(r),await Sn.flush(2e3),setTimeout((()=>{process.exit(0)}),5e3)}let Nn;if(bn("Started"),dn.captureStackTrace){bn("Connecting to debugger");const n=new t;n.connectToMainThread(),bn("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{bn("Debugger paused");const s=[...t.params.callFrames],i=dn.appRootPath?function(t=(process.argv[1]?nn(process.argv[1]):process.cwd()),n="\\"===o){const e=n?ln(t):t;return t=>{if(!t)return;const o=n?ln(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}}(dn.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 L({filename:r,module:e(r),function:t.functionName||w,colno:o,lineno:s,in_app:r?en(r):void 0})}(t,e.get(t.location.scriptId),i))),u=setTimeout((()=>{xn(c).then(null,(()=>{bn("Sending ANR event failed.")}))}),5e3);n.post("Runtime.evaluate",{expression:"global.__SENTRY_GET_SCOPES__();",silent:!0,returnByValue:!0},((t,e)=>{t&&bn(`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"),xn(c,r).then(null,(()=>{bn("Sending ANR event failed.")}))}))}catch(t){throw n.post("Debugger.resume"),n.post("Debugger.disable"),t}})),Nn=()=>{try{n.post("Debugger.enable",(()=>{n.post("Debugger.pause")}))}catch(t){}}}const{poll:Tn}=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()}}}),dn.pollInterval,dn.anrThreshold,(function(){bn("Watchdog timeout"),Nn?(bn("Pausing debugger to capture stack trace"),Nn()):(bn("Capturing event without a stack trace"),xn().then(null,(()=>{bn("Sending ANR event failed on watchdog timeout.")})))}));n?.on("message",(t=>{t.session&&(mn=K(t.session)),t.debugImages&&(yn=t.debugImages),Tn()}));
/*! @sentry/node 8.41.0 (df843cc) | https://github.com/getsentry/sentry-javascript */
import{Session as t}from"node:inspector";import{parentPort as n,workerData as e}from"node:worker_threads";import{posix as r,sep as o}from"node:path";import*as s from"node:http";import*as i from"node:https";import{Readable as c}from"node:stream";import{createGzip as u}from"node:zlib";import*as a from"node:net";import*as f from"node:tls";const h="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,p="8.41.0",l=globalThis;function d(t,n,e){const r=l,o=r.__SENTRY__=r.__SENTRY__||{},s=o[p]=o[p]||{};return s[t]||(s[t]=n())}const m="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,g=["debug","info","warn","error","log","assert","trace"],y={};function b(t){if(!("console"in l))return t();const n=l.console,e={},r=Object.keys(y);r.forEach((t=>{const r=y[t];e[t]=n[t],n[t]=r}));try{return t()}finally{r.forEach((t=>{n[t]=e[t]}))}}const _=d("logger",(function(){let t=!1;const n={enable:()=>{t=!0},disable:()=>{t=!1},isEnabled:()=>t};return m?g.forEach((e=>{n[e]=(...n)=>{t&&b((()=>{l.console[e](`Sentry Logger [${e}]:`,...n)}))}})):g.forEach((t=>{n[t]=()=>{}})),n})),v=50,w="?",S=/captureMessage|captureException/;function $(t){return t[t.length-1]||{}}const E="<anonymous>";function x(){return N(l),l}function N(t){const n=t.__SENTRY__=t.__SENTRY__||{};return n.version=n.version||p,n[p]=n[p]||{}}const T=Object.prototype.toString;function j(t,n){return T.call(t)===`[object ${n}]`}function k(t){return j(t,"String")}function C(t){return j(t,"Object")}function O(t){return Boolean(t&&t.then&&"function"==typeof t.then)}function D(t,n){try{return t instanceof n}catch(t){return!1}}const R=l,A=80;function I(t,n){const e=t,r=[];if(!e||!e.tagName)return"";if(R.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 o=n&&n.length?n.filter((t=>e.getAttribute(t))).map((t=>[t,e.getAttribute(t)])):null;if(o&&o.length)o.forEach((t=>{r.push(`[${t[0]}="${t[1]}"]`)}));else{e.id&&r.push(`#${e.id}`);const t=e.className;if(t&&k(t)){const n=t.split(/\s+/);for(const t of n)r.push(`.${t}`)}}const s=["aria-label","type","name","title","alt"];for(const t of s){const n=e.getAttribute(t);n&&r.push(`[${t}="${n}"]`)}return r.join("")}function P(t){if(function(t){switch(T.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return D(t,Error)}}(t))return{message:t.message,name:t.name,stack:t.stack,...U(t)};if(n=t,"undefined"!=typeof Event&&D(n,Event)){const n={type:t.type,target:M(t.target),currentTarget:M(t.currentTarget),...U(t)};return"undefined"!=typeof CustomEvent&&D(t,CustomEvent)&&(n.detail=t.detail),n}return t;var n}function M(t){try{return n=t,"undefined"!=typeof Element&&D(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||A;for(;e&&s++<r&&(a=I(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 U(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 L(t){return B(t,new Map)}function B(t,n){if(function(t){if(!C(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.getOwnPropertyNames(t))void 0!==t[e]&&(r[e]=B(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(B(t,n))})),r}return t}const G=1e3;function J(){return Date.now()/G}const Y=function(){const{performance:t}=l;if(!t||!t.now)return J;const n=Date.now()-t.now(),e=null==t.timeOrigin?n:t.timeOrigin;return()=>(e+t.now())/G}();function z(){const t=l,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)))}var H;function W(t){return new F((n=>{n(t)}))}(()=>{const{performance:t}=l;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)})(),function(t){t[t.PENDING=0]="PENDING";t[t.RESOLVED=1]="RESOLVED";t[t.REJECTED=2]="REJECTED"}(H||(H={}));class F{constructor(t){F.prototype.__init.call(this),F.prototype.__init2.call(this),F.prototype.__init3.call(this),F.prototype.__init4.call(this),this.t=H.PENDING,this.o=[];try{t(this.i,this.u)}catch(t){this.u(t)}}then(t,n){return new F(((e,r)=>{this.o.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.h()}))}catch(t){return this.then((t=>t),t)}finally(t){return new F(((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.i=t=>{this.p(H.RESOLVED,t)}}__init2(){this.u=t=>{this.p(H.REJECTED,t)}}__init3(){this.p=(t,n)=>{this.t===H.PENDING&&(O(n)?n.then(this.i,this.u):(this.t=t,this.l=n,this.h()))}}__init4(){this.h=()=>{if(this.t===H.PENDING)return;const t=this.o.slice();this.o=[],t.forEach((t=>{t[0]||(this.t===H.RESOLVED&&t[1](this.l),this.t===H.REJECTED&&t[2](this.l),t[0]=!0)}))}}}function K(t){const n=Y(),e={sid:z(),init:!0,timestamp:n,started:n,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return L({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&&V(e,t),e}function V(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||Y(),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:z()),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)}function Z(){return{traceId:z(),spanId:z().substring(16)}}function q(t,n,e=2){if(!n||"object"!=typeof n||e<=0)return n;if(t&&n&&0===Object.keys(n).length)return t;const r={...t};for(const t in n)Object.prototype.hasOwnProperty.call(n,t)&&(r[t]=q(r[t],n[t],e-1));return r}const Q="_sentrySpan";function X(t,n){n?function(t,n,e){try{Object.defineProperty(t,n,{value:e,writable:!0,configurable:!0})}catch(e){m&&_.log(`Failed to add non-enumerable property "${n}" to object`,t)}}(t,Q,n):delete t[Q]}function tt(t){return t[Q]}class nt{constructor(){this.m=!1,this._=[],this.v=[],this.S=[],this.N=[],this.T={},this.j={},this.k={},this.C={},this.O={},this.D=Z()}clone(){const t=new nt;return t.S=[...this.S],t.j={...this.j},t.k={...this.k},t.C={...this.C},t.T=this.T,t.R=this.R,t.A=this.A,t.I=this.I,t.P=this.P,t.v=[...this.v],t.M=this.M,t.N=[...this.N],t.O={...this.O},t.D={...this.D},t.U=this.U,t.L=this.L,X(t,tt(this)),t}setClient(t){this.U=t}setLastEventId(t){this.L=t}getClient(){return this.U}lastEventId(){return this.L}addScopeListener(t){this._.push(t)}addEventProcessor(t){return this.v.push(t),this}setUser(t){return this.T=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.A&&V(this.A,{user:t}),this.B(),this}getUser(){return this.T}getRequestSession(){return this.M}setRequestSession(t){return this.M=t,this}setTags(t){return this.j={...this.j,...t},this.B(),this}setTag(t,n){return this.j={...this.j,[t]:n},this.B(),this}setExtras(t){return this.k={...this.k,...t},this.B(),this}setExtra(t,n){return this.k={...this.k,[t]:n},this.B(),this}setFingerprint(t){return this.P=t,this.B(),this}setLevel(t){return this.R=t,this.B(),this}setTransactionName(t){return this.I=t,this.B(),this}setContext(t,n){return null===n?delete this.C[t]:this.C[t]=n,this.B(),this}setSession(t){return t?this.A=t:delete this.A,this.B(),this}getSession(){return this.A}update(t){if(!t)return this;const n="function"==typeof t?t(this):t,[e,r]=n instanceof et?[n.getScopeData(),n.getRequestSession()]:C(n)?[t,t.requestSession]:[],{tags:o,extra:s,user:i,contexts:c,level:u,fingerprint:a=[],propagationContext:f}=e||{};return this.j={...this.j,...o},this.k={...this.k,...s},this.C={...this.C,...c},i&&Object.keys(i).length&&(this.T=i),u&&(this.R=u),a.length&&(this.P=a),f&&(this.D=f),r&&(this.M=r),this}clear(){return this.S=[],this.j={},this.k={},this.T={},this.C={},this.R=void 0,this.I=void 0,this.P=void 0,this.M=void 0,this.A=void 0,X(this,void 0),this.N=[],this.D=Z(),this.B(),this}addBreadcrumb(t,n){const e="number"==typeof n?n:100;if(e<=0)return this;const r={timestamp:J(),...t},o=this.S;return o.push(r),this.S=o.length>e?o.slice(-e):o,this.B(),this}getLastBreadcrumb(){return this.S[this.S.length-1]}clearBreadcrumbs(){return this.S=[],this.B(),this}addAttachment(t){return this.N.push(t),this}clearAttachments(){return this.N=[],this}getScopeData(){return{breadcrumbs:this.S,attachments:this.N,contexts:this.C,tags:this.j,extra:this.k,user:this.T,level:this.R,fingerprint:this.P||[],eventProcessors:this.v,propagationContext:this.D,sdkProcessingMetadata:this.O,transactionName:this.I,span:tt(this)}}setSDKProcessingMetadata(t){return this.O=q(this.O,t,2),this}setPropagationContext(t){return this.D=t,this}getPropagationContext(){return this.D}captureException(t,n){const e=n&&n.event_id?n.event_id:z();if(!this.U)return _.warn("No client configured on scope - will not capture exception!"),e;const r=new Error("Sentry syntheticException");return this.U.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:z();if(!this.U)return _.warn("No client configured on scope - will not capture message!"),r;const o=new Error(t);return this.U.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:z();return this.U?(this.U.captureEvent(t,{...n,event_id:e},this),e):(_.warn("No client configured on scope - will not capture event!"),e)}B(){this.m||(this.m=!0,this._.forEach((t=>{t(this)})),this.m=!1)}}const et=nt;class rt{constructor(t,n){let e,r;e=t||new et,r=n||new et,this.G=[{scope:e}],this.J=r}withScope(t){const n=this.Y();let e;try{e=t(n)}catch(t){throw this.H(),t}return O(e)?e.then((t=>(this.H(),t)),(t=>{throw this.H(),t})):(this.H(),e)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.J}getStackTop(){return this.G[this.G.length-1]}Y(){const t=this.getScope().clone();return this.G.push({client:this.getClient(),scope:t}),t}H(){return!(this.G.length<=1)&&!!this.G.pop()}}function ot(){const t=N(x());return t.stack=t.stack||new rt(d("defaultCurrentScope",(()=>new et)),d("defaultIsolationScope",(()=>new et)))}function st(t){return ot().withScope(t)}function it(t,n){const e=ot();return e.withScope((()=>(e.getStackTop().scope=t,n(t))))}function ct(t){return ot().withScope((()=>t(ot().getIsolationScope())))}function ut(t){const n=N(t);return n.acs?n.acs:{withIsolationScope:ct,withScope:st,withSetScope:it,withSetIsolationScope:(t,n)=>ct(n),getCurrentScope:()=>ot().getScope(),getIsolationScope:()=>ot().getIsolationScope()}}function at(){return ut(x()).getCurrentScope().getClient()}const ft="_sentryMetrics";function ht(t){const n=t[ft];if(!n)return;const e={};for(const[,[t,r]]of n){(e[t]||(e[t]=[])).push(L(r))}return e}const pt="sentry.source",lt="sentry.sample_rate",dt="sentry.op",mt="sentry.origin",gt=0,yt=1,bt="sentry-",_t=/^sentry-/;function vt(t){const n=function(t){if(!t||!k(t)&&!Array.isArray(t))return;if(Array.isArray(t))return t.reduce(((t,n)=>{const e=wt(n);return Object.entries(e).forEach((([n,e])=>{t[n]=e})),t}),{});return wt(t)}(t);if(!n)return;const e=Object.entries(n).reduce(((t,[n,e])=>{if(n.match(_t)){t[n.slice(bt.length)]=e}return t}),{});return Object.keys(e).length>0?e:void 0}function wt(t){return t.split(",").map((t=>t.split("=").map((t=>decodeURIComponent(t.trim()))))).reduce(((t,[n,e])=>(n&&e&&(t[n]=e),t)),{})}const St=1;function $t(t){const{spanId:n,traceId:e}=t.spanContext(),{parent_span_id:r}=Nt(t);return L({parent_span_id:r,span_id:n,trace_id:e})}function Et(t){return"number"==typeof t?xt(t):Array.isArray(t)?t[0]+t[1]/1e9:t instanceof Date?xt(t.getTime()):Y()}function xt(t){return t>9999999999?t/1e3:t}function Nt(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 L({span_id:n,trace_id:e,data:r,description:s,parent_span_id:c,start_timestamp:Et(o),timestamp:Et(i)||void 0,status:Tt(u),op:r[dt],origin:r[mt],_metrics_summary:ht(t)})}return{span_id:n,trace_id:e}}catch(t){return{}}}function Tt(t){if(t&&t.code!==gt)return t.code===yt?"ok":t.message||"unknown_error"}const jt="_sentryRootSpan";function kt(t){return t[jt]||t}const Ct="production",Ot="_frozenDsc";function Dt(t){const n=at();if(!n)return{};const e=kt(t),r=e[Ot];if(r)return r;const o=e.spanContext().traceState,s=o&&o.get("sentry.dsc"),i=s&&vt(s);if(i)return i;const c=function(t,n){const e=n.getOptions(),{publicKey:r}=n.getDsn()||{},o=L({environment:e.environment||Ct,release:e.release,public_key:r,trace_id:t});return n.emit("createDsc",o),o}(t.spanContext().traceId,n),u=Nt(e),a=u.data||{},f=a[lt];null!=f&&(c.sample_rate=`${f}`);const h=a[pt],p=u.description;return"url"!==h&&p&&(c.transaction=p),function(t){if("boolean"==typeof __SENTRY_TRACING__&&!__SENTRY_TRACING__)return!1;const n=at(),e=n&&n.getOptions();return!!e&&(e.enableTracing||"tracesSampleRate"in e||"tracesSampler"in e)}()&&(c.sampled=String(function(t){const{traceFlags:n}=t.spanContext();return n===St}(e))),n.emit("createDsc",c,e),c}function Rt(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}`}function At(t,n=100,e=1/0){try{return It("",t,n,e)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function It(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||["boolean","string"].includes(typeof n)||"number"==typeof n&&Number.isFinite(n))return n;const c=function(t,n){try{if("domain"===t&&n&&"object"==typeof n&&n.W)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.F))return"[VueViewModel]";if(function(t){return C(t)&&"nativeEvent"in t&&"preventDefault"in t&&"stopPropagation"in t}(n))return"[SyntheticEvent]";if("number"==typeof n&&!Number.isFinite(n))return`[${n}]`;if("function"==typeof n)return`[Function: ${function(t){try{return t&&"function"==typeof t&&t.name||E}catch(t){return E}}(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 It("",a.toJSON(),u-1,r,o)}catch(t){}const f=Array.isArray(n)?[]:{};let h=0;const p=P(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]=It(t,n,u-1,r,o),h++}return i(n),f}function Pt(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:///")}function Mt(t,n=[]){return[t,n]}function Ut(t,n){const e=t[1];for(const t of e){if(n(t,t[0].type))return!0}return!1}function Lt(t){return l.__SENTRY__&&l.__SENTRY__.encodePolyfill?l.__SENTRY__.encodePolyfill(t):(new TextEncoder).encode(t)}function Bt(t){const[n,e]=t;let r=JSON.stringify(n);function o(t){"string"==typeof r?r="string"==typeof t?r+t:[Lt(r),t]:r.push("string"==typeof t?Lt(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(At(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 Gt={session:"session",sessions:"session",attachment:"attachment",transaction:"transaction",event:"error",client_report:"internal",user_report:"default",profile:"profile",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",feedback:"feedback",span:"span",statsd:"metric_bucket"};function Jt(t){if(!t||!t.sdk)return;const{name:n,version:e}=t.sdk;return{name:n,version:e}}function Yt(t,n,e,r){const o=Jt(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:Rt(r)},...o&&{trace:L({...o})}}}(t,o,r,n);delete t.sdkProcessingMetadata;return Mt(i,[[{type:s},t]])}const zt="__SENTRY_SUPPRESS_TRACING__";function Ht(t){const n=ut(x());return n.suppressTracing?n.suppressTracing(t):function(...t){const n=ut(x());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({[zt]:!0}),t())))}function Wt(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=L(e);u&&Object.keys(u).length&&(t.extra={...u,...t.extra});const a=L(r);a&&Object.keys(a).length&&(t.tags={...a,...t.tags});const f=L(o);f&&Object.keys(f).length&&(t.user={...f,...t.user});const h=L(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:$t(n),...t.contexts},t.sdkProcessingMetadata={dynamicSamplingContext:Dt(n),...t.sdkProcessingMetadata};const e=kt(n),r=Nt(e).description;r&&!t.transaction&&"transaction"===t.type&&(t.transaction=r)}(t,r),function(t,n){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],n&&(t.fingerprint=t.fingerprint.concat(n));t.fingerprint&&!t.fingerprint.length&&delete t.fingerprint}(t,e),function(t,n){const e=[...t.breadcrumbs||[],...n];t.breadcrumbs=e.length?e:void 0}(t,o),function(t,n){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...n}}(t,s)}const Ft="7";class Kt 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 Vt(t){const n=[];function e(t){return n.splice(n.indexOf(t),1)[0]||Promise.resolve(void 0)}return{$:n,add:function(r){if(!(void 0===t||n.length<t))return o=new Kt("Not adding Promise because buffer limit was reached."),new F(((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 F(((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)}))}))}}}const Zt=6e4;function qt(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)?Zt:r-n}(i,r):429===n&&(o.all=r+6e4);return o}const Qt=64;function Xt(t,n,e=Vt(t.bufferSize||Qt)){let r={};return{send:function(t){const o=[];if(Ut(t,((t,n)=>{const e=function(t){return Gt[t]}(n);(function(t,n,e=Date.now()){return function(t,n){return t[n]||t.all||0}(t,n)>e})(r,e)||o.push(t)})),0===o.length)return W({});const s=Mt(t[0],o),i=t=>{Ut(s,((t,n)=>{}))};return e.add((()=>n({body:Bt(s)}).then((t=>(void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&h&&_.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=qt(r,t),t)),(t=>{throw i(),t})))).then((t=>t),(t=>{if(t instanceof Kt)return h&&_.error("Skipped sending event because buffer is full."),i(),W({});throw t}))},flush:t=>e.drain(t)}}const tn=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function nn(t){const n=function(t){const n=t.length>1024?`<truncated>${t.slice(-1024)}`:t,e=tn.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):"."}function en(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 rn=Symbol("AgentBaseInternalState");class on extends s.Agent{[rn];options;keepAlive;constructor(t){super(t),this[rn]={}}isSecureEndpoint(t){if(t){if("boolean"==typeof t.secureEndpoint)return t.secureEndpoint;if("string"==typeof t.protocol)return"https:"===t.protocol}const{stack:n}=new Error;return"string"==typeof n&&n.split("\n").some((t=>-1!==t.indexOf("(https.js:")||-1!==t.indexOf("node:https:")))}createSocket(t,n,e){const r={...n,secureEndpoint:this.isSecureEndpoint(n)};Promise.resolve().then((()=>this.connect(t,r))).then((o=>{if(o instanceof s.Agent)return o.addRequest(t,r);this[rn].currentSocket=o,super.createSocket(t,n,e)}),e)}createConnection(){const t=this[rn].currentSocket;if(this[rn].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[rn].defaultPort??("https:"===this.protocol?443:80)}set defaultPort(t){this[rn]&&(this[rn].defaultPort=t)}get protocol(){return this[rn].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[rn]&&(this[rn].protocol=t)}}function sn(...t){_.log("[https-proxy-agent:parse-proxy-response]",...t)}function cn(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 sn("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]||0),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}sn("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(),sn("onend"),e(new Error("Proxy connection ended before receiving CONNECT response"))}function u(t){i(),sn("onerror %o",t),e(t)}t.on("error",u),t.on("end",c),s()}))}function un(...t){_.log("[https-proxy-agent]",...t)}class an extends on{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??{},un("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?hn(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){un("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 un("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=cn(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",fn),n.secureEndpoint){un("Upgrading socket connection to TLS");const t=n.servername||n.host;return f.connect({...hn(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=>{un("Replaying proxy buffer for failed request"),t.push(h),t.push(null)})),p}}function fn(t){t.resume()}function hn(t,...n){const e={};let r;for(r in t)n.includes(r)||(e[r]=t[r]);return e}const pn=32768;function ln(t){return t.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}const dn=e;let mn,gn=!1,yn={};function bn(t){dn.debug&&console.log(`[ANR Worker] ${t}`)}var _n,vn,wn;const Sn=function(t){let n;try{n=new URL(t.url)}catch(n){return b((()=>{console.warn("[@sentry/node]: Invalid dsn or tunnel option, will not send any events. The tunnel option must be a full URL when used.")})),Xt(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 an(r):new o.Agent({keepAlive:a,maxSockets:30,timeout:2e3}),h=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)=>{Ht((()=>{let l=function(t){return new c({read(){this.push(t),this.push(null)}})}(f.body);const d={...t.headers};f.body.length>pn&&(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]||null:e}})}));m.on("error",p),l.pipe(m)}))}))}}(t,t.httpModule??o,f);return Xt(t,h)}({url:(_n=dn.dsn,vn=dn.tunnel,wn=dn.sdkMetadata.sdk,vn||`${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/`}(_n)}?${function(t,n){const e={sentry_version:Ft};return t.publicKey&&(e.sentry_key=t.publicKey),n&&(e.sentry_client=`${n.name}/${n.version}`),new URLSearchParams(e).toString()}(_n,wn)}`),recordDroppedEvent:()=>{}});async function $n(){if(mn){bn("Sending abnormal session"),V(mn,{status:"abnormal",abnormal_mechanism:"anr_foreground"});const t=function(t,n,e,r){const o=Jt(e);return Mt({sent_at:(new Date).toISOString(),...o&&{sdk:o},...!!r&&n&&{dsn:Rt(n)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(mn,dn.dsn,dn.sdkMetadata,dn.tunnel);bn(JSON.stringify(t)),await Sn.send(t);try{n?.postMessage("session-ended")}catch(t){}}}function En(t){if(!t)return;const n=function(t){if(!t.length)return[];const n=Array.from(t);return/sentryWrapped/.test($(n).function||"")&&n.pop(),n.reverse(),S.test($(n).function||"")&&(n.pop(),S.test($(n).function||"")&&n.pop()),n.slice(0,v).map((t=>({...t,filename:t.filename||$(n).filename,function:t.function||w})))}(t);if(dn.appRootPath)for(const t of n)t.filename&&(t.filename=Pt(t.filename,dn.appRootPath));return n}async function xn(t,n){if(gn)return;gn=!0,await $n(),bn("Sending event");const e={event_id:z(),contexts:dn.contexts,release:dn.release,environment:dn.environment,dist:dn.dist,platform:"node",level:"error",exception:{values:[{type:"ApplicationNotResponding",value:`Application Not Responding for at least ${dn.anrThreshold} ms`,stacktrace:{frames:En(t)},mechanism:{type:"ANR"}}]},tags:dn.staticTags};n&&function(t,n){if(Wt(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),function(t){if(0===Object.keys(yn).length)return;const n=new Map;for(const e of t.exception?.values||[])for(const t of e.stacktrace?.frames||[]){const e=t.abs_path||t.filename;e&&yn[e]&&n.set(e,yn[e])}if(n.size>0){const e=[];for(const[t,r]of n.entries())e.push({type:"sourcemap",code_file:t,debug_id:r});t.debug_meta={images:e}}}(e);const r=Yt(e,dn.dsn,dn.sdkMetadata,dn.tunnel);bn(JSON.stringify(r)),await Sn.send(r),await Sn.flush(2e3),setTimeout((()=>{process.exit(0)}),5e3)}let Nn;if(bn("Started"),dn.captureStackTrace){bn("Connecting to debugger");const n=new t;n.connectToMainThread(),bn("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{bn("Debugger paused");const s=[...t.params.callFrames],i=dn.appRootPath?function(t=(process.argv[1]?nn(process.argv[1]):process.cwd()),n="\\"===o){const e=n?ln(t):t;return t=>{if(!t)return;const o=n?ln(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}}(dn.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 L({filename:r,module:e(r),function:t.functionName||w,colno:o,lineno:s,in_app:r?en(r):void 0})}(t,e.get(t.location.scriptId),i))),u=setTimeout((()=>{xn(c).then(null,(()=>{bn("Sending ANR event failed.")}))}),5e3);n.post("Runtime.evaluate",{expression:"global.__SENTRY_GET_SCOPES__();",silent:!0,returnByValue:!0},((t,e)=>{t&&bn(`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"),xn(c,r).then(null,(()=>{bn("Sending ANR event failed.")}))}))}catch(t){throw n.post("Debugger.resume"),n.post("Debugger.disable"),t}})),Nn=()=>{try{n.post("Debugger.enable",(()=>{n.post("Debugger.pause")}))}catch(t){}}}const{poll:Tn}=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()}}}),dn.pollInterval,dn.anrThreshold,(function(){bn("Watchdog timeout"),Nn?(bn("Pausing debugger to capture stack trace"),Nn()):(bn("Capturing event without a stack trace"),xn().then(null,(()=>{bn("Sending ANR event failed on watchdog timeout.")})))}));n?.on("message",(t=>{t.session&&(mn=K(t.session)),t.debugImages&&(yn=t.debugImages),Tn()}));

@@ -7,3 +7,3 @@ import { _optionalChain } from '@sentry/core';

// This string is a placeholder that gets overwritten with the worker code.
const base64WorkerScript = 'LyohIEBzZW50cnkvbm9kZSA4LjQxLjAtYmV0YS4xIChiNDQwMmFhKSB8IGh0dHBzOi8vZ2l0aHViLmNvbS9nZXRzZW50cnkvc2VudHJ5LWphdmFzY3JpcHQgKi8KaW1wb3J0e1Nlc3Npb24gYXMgZX1mcm9tIm5vZGU6aW5zcGVjdG9yL3Byb21pc2VzIjtpbXBvcnR7d29ya2VyRGF0YSBhcyB0fWZyb20ibm9kZTp3b3JrZXJfdGhyZWFkcyI7Y29uc3Qgbj0iOC40MS4wLWJldGEuMSIsbz1nbG9iYWxUaGlzO2NvbnN0IGk9InVuZGVmaW5lZCI9PXR5cGVvZiBfX1NFTlRSWV9ERUJVR19ffHxfX1NFTlRSWV9ERUJVR19fLGE9WyJkZWJ1ZyIsImluZm8iLCJ3YXJuIiwiZXJyb3IiLCJsb2ciLCJhc3NlcnQiLCJ0cmFjZSJdLHM9e307ZnVuY3Rpb24gYyhlKXtpZighKCJjb25zb2xlImluIG8pKXJldHVybiBlKCk7Y29uc3QgdD1vLmNvbnNvbGUsbj17fSxpPU9iamVjdC5rZXlzKHMpO2kuZm9yRWFjaCgoZT0+e2NvbnN0IG89c1tlXTtuW2VdPXRbZV0sdFtlXT1vfSkpO3RyeXtyZXR1cm4gZSgpfWZpbmFsbHl7aS5mb3JFYWNoKChlPT57dFtlXT1uW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CkpLG89MH0pLDFlMykudW5yZWYoKSwoKT0+e28rPTF9fShlLChhc3luYygpPT57bCgiUmF0ZS1saW1pdCBsaWZ0ZWQuIiksYXdhaXQgdC5wb3N0KCJEZWJ1Z2dlci5zZXRQYXVzZU9uRXhjZXB0aW9ucyIse3N0YXRlOiJhbGwifSl9KSwoYXN5bmMgZT0+e2woYFJhdGUtbGltaXQgZXhjZWVkZWQuIERpc2FibGluZyBjYXB0dXJpbmcgb2YgY2F1Z2h0IGV4Y2VwdGlvbnMgZm9yICR7ZX0gc2Vjb25kcy5gKSxhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6InVuY2F1Z2h0In0pfSkpfX0pKCkuY2F0Y2goKGU9PntsKCJGYWlsZWQgdG8gc3RhcnQgZGVidWdnZXIiLGUpfSkpLHNldEludGVydmFsKCgoKT0+e30pLDFlNCk7';

@@ -10,0 +10,0 @@ function log(...args) {

@@ -1,2 +0,2 @@

/*! @sentry/node 8.41.0-beta.1 (b4402aa) | https://github.com/getsentry/sentry-javascript */
import{Session as e}from"node:inspector/promises";import{workerData as t}from"node:worker_threads";const n="8.41.0-beta.1",o=globalThis;const i="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,a=["debug","info","warn","error","log","assert","trace"],s={};function c(e){if(!("console"in o))return e();const t=o.console,n={},i=Object.keys(s);i.forEach((e=>{const o=s[e];n[e]=t[e],t[e]=o}));try{return e()}finally{i.forEach((e=>{t[e]=n[e]}))}}!function(e,t,i){const a=o,s=a.__SENTRY__=a.__SENTRY__||{},c=s[n]=s[n]||{};c[e]||(c[e]=t())}("logger",(function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return i?a.forEach((n=>{t[n]=(...t)=>{e&&c((()=>{o.console[n](`Sentry Logger [${n}]:`,...t)}))}})):a.forEach((e=>{t[e]=()=>{}})),t}));const r="__SENTRY_ERROR_LOCAL_VARIABLES__";const u=t;function l(...e){u.debug&&c((()=>console.log("[LocalVariables Worker]",...e)))}async function f(e,t,n,o){const i=await e.post("Runtime.getProperties",{objectId:t,ownProperties:!0});o[n]=i.result.filter((e=>"length"!==e.name&&!isNaN(parseInt(e.name,10)))).sort(((e,t)=>parseInt(e.name,10)-parseInt(t.name,10))).map((e=>e.value?.value))}async function g(e,t,n,o){const i=await e.post("Runtime.getProperties",{objectId:t,ownProperties:!0});o[n]=i.result.map((e=>[e.name,e.value?.value])).reduce(((e,[t,n])=>(e[t]=n,e)),{})}function d(e,t){e.value&&("value"in e.value?void 0===e.value.value||null===e.value.value?t[e.name]=`<${e.value.value}>`:t[e.name]=e.value.value:"description"in e.value&&"function"!==e.value.type?t[e.name]=`<${e.value.description}>`:"undefined"===e.value.type&&(t[e.name]="<undefined>"))}async function b(e,t){const n=await e.post("Runtime.getProperties",{objectId:t,ownProperties:!0}),o={};for(const t of n.result)if(t?.value?.objectId&&"Array"===t?.value.className){const n=t.value.objectId;await f(e,n,t.name,o)}else if(t?.value?.objectId&&"Object"===t?.value?.className){const n=t.value.objectId;await g(e,n,t.name,o)}else t?.value&&d(t,o);return o}let p;(async function(){const t=new e;t.connectToMainThread(),l("Connected to main thread");let n=!1;t.on("Debugger.resumed",(()=>{n=!1})),t.on("Debugger.paused",(e=>{n=!0,async function(e,{reason:t,data:{objectId:n},callFrames:o}){if("exception"!==t&&"promiseRejection"!==t)return;if(p?.(),null==n)return;const i=[];for(let t=0;t<o.length;t++){const{scopeChain:n,functionName:a,this:s}=o[t],c=n.find((e=>"local"===e.type)),r="global"!==s.className&&s.className?`${s.className}.${a}`:a;if(void 0===c?.object.objectId)i[t]={function:r};else{const n=await b(e,c.object.objectId);i[t]={function:r,vars:n}}}await e.post("Runtime.callFunctionOn",{functionDeclaration:`function() { this.${r} = this.${r} || ${JSON.stringify(i)}; }`,silent:!0,objectId:n}),await e.post("Runtime.releaseObject",{objectId:n})}(t,e.params).then((async()=>{n&&await t.post("Debugger.resume")}),(async e=>{n&&await t.post("Debugger.resume")}))})),await t.post("Debugger.enable");const o=!1!==u.captureAllExceptions;if(await t.post("Debugger.setPauseOnExceptions",{state:o?"all":"uncaught"}),o){const e=u.maxExceptionsPerSecond||50;p=function(e,t,n){let o=0,i=5,a=0;return setInterval((()=>{0===a?o>e&&(i*=2,n(i),i>86400&&(i=86400),a=i):(a-=1,0===a&&t()),o=0}),1e3).unref(),()=>{o+=1}}(e,(async()=>{l("Rate-limit lifted."),await t.post("Debugger.setPauseOnExceptions",{state:"all"})}),(async e=>{l(`Rate-limit exceeded. Disabling capturing of caught exceptions for ${e} seconds.`),await t.post("Debugger.setPauseOnExceptions",{state:"uncaught"})}))}})().catch((e=>{l("Failed to start debugger",e)})),setInterval((()=>{}),1e4);
/*! @sentry/node 8.41.0 (df843cc) | https://github.com/getsentry/sentry-javascript */
import{Session as e}from"node:inspector/promises";import{workerData as t}from"node:worker_threads";const n="8.41.0",o=globalThis;const i="undefined"==typeof __SENTRY_DEBUG__||__SENTRY_DEBUG__,a=["debug","info","warn","error","log","assert","trace"],s={};function c(e){if(!("console"in o))return e();const t=o.console,n={},i=Object.keys(s);i.forEach((e=>{const o=s[e];n[e]=t[e],t[e]=o}));try{return e()}finally{i.forEach((e=>{t[e]=n[e]}))}}!function(e,t,i){const a=o,s=a.__SENTRY__=a.__SENTRY__||{},c=s[n]=s[n]||{};c[e]||(c[e]=t())}("logger",(function(){let e=!1;const t={enable:()=>{e=!0},disable:()=>{e=!1},isEnabled:()=>e};return i?a.forEach((n=>{t[n]=(...t)=>{e&&c((()=>{o.console[n](`Sentry Logger [${n}]:`,...t)}))}})):a.forEach((e=>{t[e]=()=>{}})),t}));const r="__SENTRY_ERROR_LOCAL_VARIABLES__";const u=t;function l(...e){u.debug&&c((()=>console.log("[LocalVariables Worker]",...e)))}async function f(e,t,n,o){const i=await e.post("Runtime.getProperties",{objectId:t,ownProperties:!0});o[n]=i.result.filter((e=>"length"!==e.name&&!isNaN(parseInt(e.name,10)))).sort(((e,t)=>parseInt(e.name,10)-parseInt(t.name,10))).map((e=>e.value?.value))}async function g(e,t,n,o){const i=await e.post("Runtime.getProperties",{objectId:t,ownProperties:!0});o[n]=i.result.map((e=>[e.name,e.value?.value])).reduce(((e,[t,n])=>(e[t]=n,e)),{})}function d(e,t){e.value&&("value"in e.value?void 0===e.value.value||null===e.value.value?t[e.name]=`<${e.value.value}>`:t[e.name]=e.value.value:"description"in e.value&&"function"!==e.value.type?t[e.name]=`<${e.value.description}>`:"undefined"===e.value.type&&(t[e.name]="<undefined>"))}async function b(e,t){const n=await e.post("Runtime.getProperties",{objectId:t,ownProperties:!0}),o={};for(const t of n.result)if(t?.value?.objectId&&"Array"===t?.value.className){const n=t.value.objectId;await f(e,n,t.name,o)}else if(t?.value?.objectId&&"Object"===t?.value?.className){const n=t.value.objectId;await g(e,n,t.name,o)}else t?.value&&d(t,o);return o}let p;(async function(){const t=new e;t.connectToMainThread(),l("Connected to main thread");let n=!1;t.on("Debugger.resumed",(()=>{n=!1})),t.on("Debugger.paused",(e=>{n=!0,async function(e,{reason:t,data:{objectId:n},callFrames:o}){if("exception"!==t&&"promiseRejection"!==t)return;if(p?.(),null==n)return;const i=[];for(let t=0;t<o.length;t++){const{scopeChain:n,functionName:a,this:s}=o[t],c=n.find((e=>"local"===e.type)),r="global"!==s.className&&s.className?`${s.className}.${a}`:a;if(void 0===c?.object.objectId)i[t]={function:r};else{const n=await b(e,c.object.objectId);i[t]={function:r,vars:n}}}await e.post("Runtime.callFunctionOn",{functionDeclaration:`function() { this.${r} = this.${r} || ${JSON.stringify(i)}; }`,silent:!0,objectId:n}),await e.post("Runtime.releaseObject",{objectId:n})}(t,e.params).then((async()=>{n&&await t.post("Debugger.resume")}),(async e=>{n&&await t.post("Debugger.resume")}))})),await t.post("Debugger.enable");const o=!1!==u.captureAllExceptions;if(await t.post("Debugger.setPauseOnExceptions",{state:o?"all":"uncaught"}),o){const e=u.maxExceptionsPerSecond||50;p=function(e,t,n){let o=0,i=5,a=0;return setInterval((()=>{0===a?o>e&&(i*=2,n(i),i>86400&&(i=86400),a=i):(a-=1,0===a&&t()),o=0}),1e3).unref(),()=>{o+=1}}(e,(async()=>{l("Rate-limit lifted."),await t.post("Debugger.setPauseOnExceptions",{state:"all"})}),(async e=>{l(`Rate-limit exceeded. Disabling capturing of caught exceptions for ${e} seconds.`),await t.post("Debugger.setPauseOnExceptions",{state:"uncaught"})}))}})().catch((e=>{l("Failed to start debugger",e)})),setInterval((()=>{}),1e4);

@@ -1,1 +0,1 @@

{"type":"module","version":"8.41.0-beta.1","sideEffects":false}
{"type":"module","version":"8.41.0","sideEffects":false}
import { _nullishCoalesce, _optionalChain } from '@sentry/core';
import * as os from 'node:os';
import { trace } from '@opentelemetry/api';
import { registerInstrumentations } from '@opentelemetry/instrumentation';
import { ServerRuntimeClient, applySdkMetadata, logger, SDK_VERSION } from '@sentry/core';
import { getTraceContextForScope } from '@sentry/opentelemetry';
import { isMainThread, threadId } from 'worker_threads';

@@ -21,2 +23,8 @@ import { DEBUG_BUILD } from '../debug-build.js';

if (options.openTelemetryInstrumentations) {
registerInstrumentations({
instrumentations: options.openTelemetryInstrumentations,
});
}
applySdkMetadata(clientOptions, 'node');

@@ -111,2 +119,13 @@

}
/** Custom implementation for OTEL, so we can handle scope-span linking. */
_getTraceInfoFromScope(
scope,
) {
if (!scope) {
return [undefined, undefined];
}
return getTraceContextForScope(this, scope);
}
}

@@ -113,0 +132,0 @@

@@ -27,2 +27,3 @@ import { _optionalChain } from '@sentry/core';

function getRegisterOptions(esmHookConfig) {
// TODO(v9): Make onlyIncludeInstrumentedModules: true the default behavior.
if (_optionalChain([esmHookConfig, 'optionalAccess', _ => _.onlyIncludeInstrumentedModules])) {

@@ -32,2 +33,3 @@ const { addHookMessagePort } = createAddHookMessageChannel();

// are wrapped if they are not hooked
// eslint-disable-next-line deprecation/deprecation
return { data: { addHookMessagePort, include: esmHookConfig.include || [] }, transferList: [addHookMessagePort] };

@@ -62,3 +64,3 @@ }

console.warn(
'[Sentry] You are using Node.js in ESM mode ("import syntax"). The Sentry Node.js SDK is not compatible with ESM in Node.js versions before 18.19.0 or before 20.6.0. Please either build your application with CommonJS ("require() syntax"), or use version 7.x of the Sentry Node.js SDK.',
'[Sentry] You are using Node.js in ESM mode ("import syntax"). The Sentry Node.js SDK is not compatible with ESM in Node.js versions before 18.19.0 or before 20.6.0. Please either build your application with CommonJS ("require() syntax"), or upgrade your Node.js version.',
);

@@ -65,0 +67,0 @@ });

import { Tracer } from '@opentelemetry/api';
import { BasicTracerProvider } from '@opentelemetry/sdk-trace-base';
import { Scope } from '@sentry/core';
import { ServerRuntimeClient } from '@sentry/core';
import { DynamicSamplingContext, TraceContext } from '@sentry/types';
import { NodeClientOptions } from '../types';

@@ -24,3 +26,8 @@ /** A client for using Sentry with Node & OpenTelemetry. */

startClientReportTracking(): void;
/** Custom implementation for OTEL, so we can handle scope-span linking. */
protected _getTraceInfoFromScope(scope: Scope | undefined): [
/*dynamicSamplingContext*/ Partial<DynamicSamplingContext> | undefined,
/*traceContext*/ TraceContext | undefined
];
}
//# sourceMappingURL=client.d.ts.map
import { Span as WriteableSpan } from '@opentelemetry/api';
import { Instrumentation } from '@opentelemetry/instrumentation';
import { ReadableSpan } from '@opentelemetry/sdk-trace-base';
import { ClientOptions, Options, SamplingContext, Scope, Span, TracePropagationTargets } from '@sentry/types';
import { NodeTransportOptions } from './transports';
/**
* Note: In the next major version of the Sentry SDK this interface will be removed and the SDK will by default only wrap
* ESM modules that are required to be wrapped by OpenTelemetry Instrumentation.
*/
export interface EsmLoaderHookOptions {
/**
* Provide a list of modules to wrap with `import-in-the-middle`.
*
* @deprecated It is recommended to use `onlyIncludeInstrumentedModules: true` instead of manually defining modules to include and exclude.
*/
include?: Array<string | RegExp>;
exclude?: Array<string | RegExp> /**
/**
* Provide a list of modules to prevent them from being wrapped with `import-in-the-middle`.
*
* @deprecated It is recommended to use `onlyIncludeInstrumentedModules: true` instead of manually defining modules to include and exclude.
*/
exclude?: Array<string | RegExp>;
/**
* When set to `true`, `import-in-the-middle` will only wrap ESM modules that are specifically instrumented by

@@ -17,3 +33,6 @@ * OpenTelemetry plugins. This is useful to avoid issues where `import-in-the-middle` is not compatible with some of

* Defaults to `false`.
*/;
*
* Note: In the next major version of the Sentry SDK this option will be removed and the SDK will by default only wrap
* ESM modules that are required to be wrapped by OpenTelemetry Instrumentation.
*/
onlyIncludeInstrumentedModules?: boolean;

@@ -82,5 +101,13 @@ }

* * The `SentrySampler`
*
* If you are registering your own OpenTelemetry Loader Hooks (or `import-in-the-middle` hooks), it is also recommended to set the `registerEsmLoaderHooks` option to false.
*/
skipOpenTelemetrySetup?: boolean;
/**
* Provide an array of OpenTelemetry Instrumentations that should be registered.
*
* Use this option if you want to register OpenTelemetry instrumentation that the Sentry SDK does not yet have support for.
*/
openTelemetryInstrumentations?: Instrumentation[];
/**
* The max. duration in seconds that the SDK will wait for parent spans to be finished before discarding a span.

@@ -111,2 +138,5 @@ * The SDK will automatically clean up spans that have no finished parent after this duration.

* Defaults to `true`.
*
* Note: In the next major version of the SDK, the possibility to provide fine-grained control will be removed from this option.
* This means that it will only be possible to pass `true` or `false`. The default value will continue to be `true`.
*/

@@ -146,3 +176,3 @@ registerEsmLoaderHooks?: boolean | EsmLoaderHookOptions;

* so in these cases we type this as `AbstractSpan` which could be either a regular `Span` or a `ReadableSpan`.
* You'll have to make sur to check revelant fields before accessing them.
* You'll have to make sur to check relevant fields before accessing them.
*

@@ -149,0 +179,0 @@ * Note that technically, the `Span` exported from `@opentelemetry/sdk-trace-base` matches this,

import type { Tracer } from '@opentelemetry/api';
import type { BasicTracerProvider } from '@opentelemetry/sdk-trace-base';
import type { Scope } from '@sentry/core';
import { ServerRuntimeClient } from '@sentry/core';
import type { DynamicSamplingContext, TraceContext } from '@sentry/types';
import type { NodeClientOptions } from '../types';

@@ -24,3 +26,5 @@ /** A client for using Sentry with Node & OpenTelemetry. */

startClientReportTracking(): void;
/** Custom implementation for OTEL, so we can handle scope-span linking. */
protected _getTraceInfoFromScope(scope: Scope | undefined): [dynamicSamplingContext: Partial<DynamicSamplingContext> | undefined, traceContext: TraceContext | undefined];
}
//# sourceMappingURL=client.d.ts.map
import type { Span as WriteableSpan } from '@opentelemetry/api';
import type { Instrumentation } from '@opentelemetry/instrumentation';
import type { ReadableSpan } from '@opentelemetry/sdk-trace-base';
import type { ClientOptions, Options, SamplingContext, Scope, Span, TracePropagationTargets } from '@sentry/types';
import type { NodeTransportOptions } from './transports';
/**
* Note: In the next major version of the Sentry SDK this interface will be removed and the SDK will by default only wrap
* ESM modules that are required to be wrapped by OpenTelemetry Instrumentation.
*/
export interface EsmLoaderHookOptions {
/**
* Provide a list of modules to wrap with `import-in-the-middle`.
*
* @deprecated It is recommended to use `onlyIncludeInstrumentedModules: true` instead of manually defining modules to include and exclude.
*/
include?: Array<string | RegExp>;
exclude?: Array<string | RegExp> /**
/**
* Provide a list of modules to prevent them from being wrapped with `import-in-the-middle`.
*
* @deprecated It is recommended to use `onlyIncludeInstrumentedModules: true` instead of manually defining modules to include and exclude.
*/
exclude?: Array<string | RegExp>;
/**
* When set to `true`, `import-in-the-middle` will only wrap ESM modules that are specifically instrumented by

@@ -17,3 +33,6 @@ * OpenTelemetry plugins. This is useful to avoid issues where `import-in-the-middle` is not compatible with some of

* Defaults to `false`.
*/;
*
* Note: In the next major version of the Sentry SDK this option will be removed and the SDK will by default only wrap
* ESM modules that are required to be wrapped by OpenTelemetry Instrumentation.
*/
onlyIncludeInstrumentedModules?: boolean;

@@ -82,5 +101,13 @@ }

* * The `SentrySampler`
*
* If you are registering your own OpenTelemetry Loader Hooks (or `import-in-the-middle` hooks), it is also recommended to set the `registerEsmLoaderHooks` option to false.
*/
skipOpenTelemetrySetup?: boolean;
/**
* Provide an array of OpenTelemetry Instrumentations that should be registered.
*
* Use this option if you want to register OpenTelemetry instrumentation that the Sentry SDK does not yet have support for.
*/
openTelemetryInstrumentations?: Instrumentation[];
/**
* The max. duration in seconds that the SDK will wait for parent spans to be finished before discarding a span.

@@ -111,2 +138,5 @@ * The SDK will automatically clean up spans that have no finished parent after this duration.

* Defaults to `true`.
*
* Note: In the next major version of the SDK, the possibility to provide fine-grained control will be removed from this option.
* This means that it will only be possible to pass `true` or `false`. The default value will continue to be `true`.
*/

@@ -146,3 +176,3 @@ registerEsmLoaderHooks?: boolean | EsmLoaderHookOptions;

* so in these cases we type this as `AbstractSpan` which could be either a regular `Span` or a `ReadableSpan`.
* You'll have to make sur to check revelant fields before accessing them.
* You'll have to make sur to check relevant fields before accessing them.
*

@@ -149,0 +179,0 @@ * Note that technically, the `Span` exported from `@opentelemetry/sdk-trace-base` matches this,

{
"name": "@sentry/node",
"version": "8.41.0-beta.1",
"version": "8.41.0",
"description": "Sentry Node SDK using OpenTelemetry for performance instrumentation",

@@ -100,5 +100,5 @@ "repository": "git://github.com/getsentry/sentry-javascript.git",

"@prisma/instrumentation": "5.19.1",
"@sentry/core": "8.41.0-beta.1",
"@sentry/opentelemetry": "8.41.0-beta.1",
"@sentry/types": "8.41.0-beta.1",
"@sentry/core": "8.41.0",
"@sentry/opentelemetry": "8.41.0",
"@sentry/types": "8.41.0",
"import-in-the-middle": "^1.11.2"

@@ -105,0 +105,0 @@ },

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc