@sentry/node 10.70.0 → 11.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/bundler-plugin/esbuild.js +19 -0
- package/build/cjs/bundler-plugin/esbuild.js.map +1 -0
- package/build/cjs/bundler-plugin/rollup.js +12 -0
- package/build/cjs/bundler-plugin/rollup.js.map +1 -0
- package/build/cjs/bundler-plugin/vite.js +12 -0
- package/build/cjs/bundler-plugin/vite.js.map +1 -0
- package/build/cjs/bundler-plugin/webpack.js +18 -0
- package/build/cjs/bundler-plugin/webpack.js.map +1 -0
- package/build/cjs/cron/common.js +52 -0
- package/build/cjs/cron/common.js.map +1 -0
- package/build/cjs/cron/cron.js +88 -0
- package/build/cjs/cron/cron.js.map +1 -0
- package/build/cjs/cron/index.js +14 -0
- package/build/cjs/cron/index.js.map +1 -0
- package/build/cjs/cron/node-cron.js +52 -0
- package/build/cjs/cron/node-cron.js.map +1 -0
- package/build/cjs/cron/node-schedule.js +41 -0
- package/build/cjs/cron/node-schedule.js.map +1 -0
- package/build/cjs/index.js +112 -123
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/integrations/anr/index.js +159 -0
- package/build/cjs/integrations/anr/index.js.map +1 -0
- package/build/cjs/integrations/childProcess.js +81 -0
- package/build/cjs/integrations/childProcess.js.map +1 -0
- package/build/cjs/integrations/console.js +95 -0
- package/build/cjs/integrations/console.js.map +1 -0
- package/build/cjs/integrations/context.js +391 -0
- package/build/cjs/integrations/context.js.map +1 -0
- package/build/cjs/integrations/contextlines.js +251 -0
- package/build/cjs/integrations/contextlines.js.map +1 -0
- package/build/cjs/integrations/fs/index.js +1 -1
- package/build/cjs/integrations/fs/index.js.map +1 -1
- package/build/cjs/integrations/fs/vendored/constants.js.map +1 -1
- package/build/cjs/integrations/http/SentryHttpInstrumentation.js +67 -0
- package/build/cjs/integrations/http/SentryHttpInstrumentation.js.map +1 -0
- package/build/cjs/integrations/http/httpServerIntegration.js +77 -0
- package/build/cjs/integrations/http/httpServerIntegration.js.map +1 -0
- package/build/cjs/integrations/http/httpServerSpansIntegration.js +241 -0
- package/build/cjs/integrations/http/httpServerSpansIntegration.js.map +1 -0
- package/build/cjs/integrations/http/index.js +71 -0
- package/build/cjs/integrations/http/index.js.map +1 -0
- package/build/cjs/integrations/local-variables/common.js +20 -0
- package/build/cjs/integrations/local-variables/common.js.map +1 -0
- package/build/cjs/integrations/local-variables/index.js +10 -0
- package/build/cjs/integrations/local-variables/index.js.map +1 -0
- package/build/cjs/integrations/local-variables/local-variables-async.js +106 -0
- package/build/cjs/integrations/local-variables/local-variables-async.js.map +1 -0
- package/build/cjs/integrations/modules.js +98 -0
- package/build/cjs/integrations/modules.js.map +1 -0
- package/build/cjs/integrations/node-fetch/index.js +24 -0
- package/build/cjs/integrations/node-fetch/index.js.map +1 -0
- package/build/cjs/integrations/node-fetch/undici-instrumentation.js +262 -0
- package/build/cjs/integrations/node-fetch/undici-instrumentation.js.map +1 -0
- package/build/cjs/integrations/nodeRuntimeMetrics.js +181 -0
- package/build/cjs/integrations/nodeRuntimeMetrics.js.map +1 -0
- package/build/cjs/integrations/onuncaughtexception.js +92 -0
- package/build/cjs/integrations/onuncaughtexception.js.map +1 -0
- package/build/cjs/integrations/onunhandledrejection.js +92 -0
- package/build/cjs/integrations/onunhandledrejection.js.map +1 -0
- package/build/cjs/integrations/pino.js +116 -0
- package/build/cjs/integrations/pino.js.map +1 -0
- package/build/cjs/integrations/processSession.js +22 -0
- package/build/cjs/integrations/processSession.js.map +1 -0
- package/build/cjs/integrations/spotlight.js +79 -0
- package/build/cjs/integrations/spotlight.js.map +1 -0
- package/build/cjs/integrations/systemError.js +54 -0
- package/build/cjs/integrations/systemError.js.map +1 -0
- package/build/cjs/integrations/tracing/express.js +0 -52
- package/build/cjs/integrations/tracing/express.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/index.js +1 -16
- package/build/cjs/integrations/tracing/fastify/index.js.map +1 -1
- package/build/cjs/integrations/tracing/hapi/index.js +0 -16
- package/build/cjs/integrations/tracing/hapi/index.js.map +1 -1
- package/build/cjs/integrations/tracing/index.js +29 -87
- package/build/cjs/integrations/tracing/index.js.map +1 -1
- package/build/cjs/integrations/tracing/koa/index.js +0 -24
- package/build/cjs/integrations/tracing/koa/index.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/cache.js +6 -4
- package/build/cjs/integrations/tracing/redis/cache.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/index.js +10 -26
- package/build/cjs/integrations/tracing/redis/index.js.map +1 -1
- package/build/cjs/integrations/winston.js +84 -0
- package/build/cjs/integrations/winston.js.map +1 -0
- package/build/cjs/logs/capture.js +26 -0
- package/build/cjs/logs/capture.js.map +1 -0
- package/build/cjs/logs/exports.js +32 -0
- package/build/cjs/logs/exports.js.map +1 -0
- package/build/cjs/nodeVersion.js +10 -0
- package/build/cjs/nodeVersion.js.map +1 -0
- package/build/cjs/otel/logger.js +21 -0
- package/build/cjs/otel/logger.js.map +1 -0
- package/build/cjs/proxy/base.js +69 -0
- package/build/cjs/proxy/base.js.map +1 -0
- package/build/cjs/proxy/index.js +112 -0
- package/build/cjs/proxy/index.js.map +1 -0
- package/build/cjs/proxy/parse-proxy-response.js +88 -0
- package/build/cjs/proxy/parse-proxy-response.js.map +1 -0
- package/build/cjs/sdk/api.js +61 -0
- package/build/cjs/sdk/api.js.map +1 -0
- package/build/cjs/sdk/client.js +113 -0
- package/build/cjs/sdk/client.js.map +1 -0
- package/build/cjs/sdk/index.js +183 -41
- package/build/cjs/sdk/index.js.map +1 -1
- package/build/cjs/sdk/initOtel.js +9 -95
- package/build/cjs/sdk/initOtel.js.map +1 -1
- package/build/cjs/transports/http.js +102 -0
- package/build/cjs/transports/http.js.map +1 -0
- package/build/cjs/utils/debug.js +17 -0
- package/build/cjs/utils/debug.js.map +1 -0
- package/build/cjs/utils/entry-point.js +36 -0
- package/build/cjs/utils/entry-point.js.map +1 -0
- package/build/cjs/utils/errorhandling.js +33 -0
- package/build/cjs/utils/errorhandling.js.map +1 -0
- package/build/cjs/utils/module.js +37 -0
- package/build/cjs/utils/module.js.map +1 -0
- package/build/cjs/utils/outgoingFetchRequest.js +178 -0
- package/build/cjs/utils/outgoingFetchRequest.js.map +1 -0
- package/build/cjs/utils/spotlight.js +18 -0
- package/build/cjs/utils/spotlight.js.map +1 -0
- package/build/esm/bundler-plugin/esbuild.js +17 -0
- package/build/esm/bundler-plugin/esbuild.js.map +1 -0
- package/build/esm/bundler-plugin/rollup.js +10 -0
- package/build/esm/bundler-plugin/rollup.js.map +1 -0
- package/build/esm/bundler-plugin/vite.js +10 -0
- package/build/esm/bundler-plugin/vite.js.map +1 -0
- package/build/esm/bundler-plugin/webpack.js +16 -0
- package/build/esm/bundler-plugin/webpack.js.map +1 -0
- package/build/esm/cron/common.js +50 -0
- package/build/esm/cron/common.js.map +1 -0
- package/build/esm/cron/cron.js +86 -0
- package/build/esm/cron/cron.js.map +1 -0
- package/build/esm/cron/index.js +12 -0
- package/build/esm/cron/index.js.map +1 -0
- package/build/esm/cron/node-cron.js +50 -0
- package/build/esm/cron/node-cron.js.map +1 -0
- package/build/esm/cron/node-schedule.js +39 -0
- package/build/esm/cron/node-schedule.js.map +1 -0
- package/build/esm/index.js +36 -36
- package/build/esm/integrations/anr/index.js +155 -0
- package/build/esm/integrations/anr/index.js.map +1 -0
- package/build/esm/integrations/anr/worker-script.js +2 -0
- package/build/esm/integrations/childProcess.js +79 -0
- package/build/esm/integrations/childProcess.js.map +1 -0
- package/build/esm/integrations/console.js +93 -0
- package/build/esm/integrations/console.js.map +1 -0
- package/build/esm/integrations/context.js +383 -0
- package/build/esm/integrations/context.js.map +1 -0
- package/build/esm/integrations/contextlines.js +245 -0
- package/build/esm/integrations/contextlines.js.map +1 -0
- package/build/esm/integrations/fs/index.js +1 -1
- package/build/esm/integrations/fs/index.js.map +1 -1
- package/build/esm/integrations/fs/vendored/constants.js.map +1 -1
- package/build/esm/integrations/http/SentryHttpInstrumentation.js +65 -0
- package/build/esm/integrations/http/SentryHttpInstrumentation.js.map +1 -0
- package/build/esm/integrations/http/httpServerIntegration.js +74 -0
- package/build/esm/integrations/http/httpServerIntegration.js.map +1 -0
- package/build/esm/integrations/http/httpServerSpansIntegration.js +238 -0
- package/build/esm/integrations/http/httpServerSpansIntegration.js.map +1 -0
- package/build/esm/integrations/http/index.js +69 -0
- package/build/esm/integrations/http/index.js.map +1 -0
- package/build/esm/integrations/local-variables/common.js +15 -0
- package/build/esm/integrations/local-variables/common.js.map +1 -0
- package/build/esm/integrations/local-variables/index.js +8 -0
- package/build/esm/integrations/local-variables/index.js.map +1 -0
- package/build/esm/integrations/local-variables/local-variables-async.js +103 -0
- package/build/esm/integrations/local-variables/local-variables-async.js.map +1 -0
- package/build/esm/integrations/local-variables/worker-script.js +2 -0
- package/build/esm/integrations/modules.js +57 -0
- package/build/esm/integrations/modules.js.map +1 -0
- package/build/esm/integrations/node-fetch/index.js +22 -0
- package/build/esm/integrations/node-fetch/index.js.map +1 -0
- package/build/esm/integrations/node-fetch/undici-instrumentation.js +260 -0
- package/build/esm/integrations/node-fetch/undici-instrumentation.js.map +1 -0
- package/build/esm/integrations/nodeRuntimeMetrics.js +178 -0
- package/build/esm/integrations/nodeRuntimeMetrics.js.map +1 -0
- package/build/esm/integrations/onuncaughtexception.js +89 -0
- package/build/esm/integrations/onuncaughtexception.js.map +1 -0
- package/build/esm/integrations/onunhandledrejection.js +89 -0
- package/build/esm/integrations/onunhandledrejection.js.map +1 -0
- package/build/esm/integrations/pino.js +114 -0
- package/build/esm/integrations/pino.js.map +1 -0
- package/build/esm/integrations/processSession.js +20 -0
- package/build/esm/integrations/processSession.js.map +1 -0
- package/build/esm/integrations/spotlight.js +76 -0
- package/build/esm/integrations/spotlight.js.map +1 -0
- package/build/esm/integrations/systemError.js +52 -0
- package/build/esm/integrations/systemError.js.map +1 -0
- package/build/esm/integrations/tracing/express.js +2 -51
- package/build/esm/integrations/tracing/express.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/index.js +3 -17
- package/build/esm/integrations/tracing/fastify/index.js.map +1 -1
- package/build/esm/integrations/tracing/hapi/index.js +2 -16
- package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
- package/build/esm/integrations/tracing/index.js +12 -69
- package/build/esm/integrations/tracing/index.js.map +1 -1
- package/build/esm/integrations/tracing/koa/index.js +2 -24
- package/build/esm/integrations/tracing/koa/index.js.map +1 -1
- package/build/esm/integrations/tracing/redis/cache.js +7 -5
- package/build/esm/integrations/tracing/redis/cache.js.map +1 -1
- package/build/esm/integrations/tracing/redis/index.js +11 -26
- package/build/esm/integrations/tracing/redis/index.js.map +1 -1
- package/build/esm/integrations/winston.js +82 -0
- package/build/esm/integrations/winston.js.map +1 -0
- package/build/esm/logs/capture.js +24 -0
- package/build/esm/logs/capture.js.map +1 -0
- package/build/esm/logs/exports.js +24 -0
- package/build/esm/logs/exports.js.map +1 -0
- package/build/esm/nodeVersion.js +8 -0
- package/build/esm/nodeVersion.js.map +1 -0
- package/build/esm/otel/logger.js +19 -0
- package/build/esm/otel/logger.js.map +1 -0
- package/build/esm/package.json +1 -1
- package/build/esm/proxy/base.js +67 -0
- package/build/esm/proxy/base.js.map +1 -0
- package/build/esm/proxy/index.js +110 -0
- package/build/esm/proxy/index.js.map +1 -0
- package/build/esm/proxy/parse-proxy-response.js +86 -0
- package/build/esm/proxy/parse-proxy-response.js.map +1 -0
- package/build/esm/sdk/api.js +58 -0
- package/build/esm/sdk/api.js.map +1 -0
- package/build/esm/sdk/client.js +111 -0
- package/build/esm/sdk/client.js.map +1 -0
- package/build/esm/sdk/index.js +184 -41
- package/build/esm/sdk/index.js.map +1 -1
- package/build/esm/sdk/initOtel.js +12 -96
- package/build/esm/sdk/initOtel.js.map +1 -1
- package/build/esm/transports/http.js +100 -0
- package/build/esm/transports/http.js.map +1 -0
- package/build/esm/utils/debug.js +15 -0
- package/build/esm/utils/debug.js.map +1 -0
- package/build/esm/utils/entry-point.js +33 -0
- package/build/esm/utils/entry-point.js.map +1 -0
- package/build/esm/utils/errorhandling.js +31 -0
- package/build/esm/utils/errorhandling.js.map +1 -0
- package/build/esm/utils/module.js +35 -0
- package/build/esm/utils/module.js.map +1 -0
- package/build/esm/utils/outgoingFetchRequest.js +174 -0
- package/build/esm/utils/outgoingFetchRequest.js.map +1 -0
- package/build/esm/utils/spotlight.js +16 -0
- package/build/esm/utils/spotlight.js.map +1 -0
- package/build/import-hook.mjs +0 -10
- package/build/types/bundler-plugin/esbuild.d.ts +34 -0
- package/build/types/bundler-plugin/esbuild.d.ts.map +1 -0
- package/build/types/bundler-plugin/rollup.d.ts +35 -0
- package/build/types/bundler-plugin/rollup.d.ts.map +1 -0
- package/build/types/bundler-plugin/vite.d.ts +36 -0
- package/build/types/bundler-plugin/vite.d.ts.map +1 -0
- package/build/types/bundler-plugin/webpack.d.ts +37 -0
- package/build/types/bundler-plugin/webpack.d.ts.map +1 -0
- package/build/types/cron/common.d.ts +5 -0
- package/build/types/cron/common.d.ts.map +1 -0
- package/build/types/cron/cron.d.ts +43 -0
- package/build/types/cron/cron.d.ts.map +1 -0
- package/build/types/cron/index.d.ts +10 -0
- package/build/types/cron/index.d.ts.map +1 -0
- package/build/types/cron/node-cron.d.ts +28 -0
- package/build/types/cron/node-cron.d.ts.map +1 -0
- package/build/types/cron/node-schedule.d.ts +19 -0
- package/build/types/cron/node-schedule.d.ts.map +1 -0
- package/build/types/index.d.ts +34 -34
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/anr/common.d.ts +79 -0
- package/build/types/integrations/anr/common.d.ts.map +1 -0
- package/build/types/integrations/anr/index.d.ts +59 -0
- package/build/types/integrations/anr/index.d.ts.map +1 -0
- package/build/types/integrations/anr/worker.d.ts +2 -0
- package/build/types/integrations/anr/worker.d.ts.map +1 -0
- package/build/types/integrations/childProcess.d.ts +22 -0
- package/build/types/integrations/childProcess.d.ts.map +1 -0
- package/build/types/integrations/console.d.ts +23 -0
- package/build/types/integrations/console.d.ts.map +1 -0
- package/build/types/integrations/context.d.ts +33 -0
- package/build/types/integrations/context.d.ts.map +1 -0
- package/build/types/integrations/contextlines.d.ts +35 -0
- package/build/types/integrations/contextlines.d.ts.map +1 -0
- package/build/types/integrations/featureFlagShims/openFeature.d.ts.map +1 -1
- package/build/types/integrations/fs/index.d.ts.map +1 -1
- package/build/types/integrations/http/SentryHttpInstrumentation.d.ts +102 -0
- package/build/types/integrations/http/SentryHttpInstrumentation.d.ts.map +1 -0
- package/build/types/integrations/http/httpServerIntegration.d.ts +67 -0
- package/build/types/integrations/http/httpServerIntegration.d.ts.map +1 -0
- package/build/types/integrations/http/httpServerSpansIntegration.d.ts +59 -0
- package/build/types/integrations/http/httpServerSpansIntegration.d.ts.map +1 -0
- package/build/types/integrations/http/index.d.ts +127 -0
- package/build/types/integrations/http/index.d.ts.map +1 -0
- package/build/types/integrations/local-variables/common.d.ts +79 -0
- package/build/types/integrations/local-variables/common.d.ts.map +1 -0
- package/build/types/integrations/local-variables/index.d.ts +4 -0
- package/build/types/integrations/local-variables/index.d.ts.map +1 -0
- package/build/types/integrations/local-variables/local-variables-async.d.ts +9 -0
- package/build/types/integrations/local-variables/local-variables-async.d.ts.map +1 -0
- package/build/types/integrations/local-variables/worker.d.ts +2 -0
- package/build/types/integrations/local-variables/worker.d.ts.map +1 -0
- package/build/types/integrations/modules.d.ts +17 -0
- package/build/types/integrations/modules.d.ts.map +1 -0
- package/build/types/integrations/node-fetch/index.d.ts +9 -0
- package/build/types/integrations/node-fetch/index.d.ts.map +1 -0
- package/build/types/integrations/node-fetch/types.d.ts +95 -0
- package/build/types/integrations/node-fetch/types.d.ts.map +1 -0
- package/build/types/integrations/node-fetch/undici-instrumentation.d.ts +17 -0
- package/build/types/integrations/node-fetch/undici-instrumentation.d.ts.map +1 -0
- package/build/types/integrations/nodeRuntimeMetrics.d.ts +66 -0
- package/build/types/integrations/nodeRuntimeMetrics.d.ts.map +1 -0
- package/build/types/integrations/onuncaughtexception.d.ts +33 -0
- package/build/types/integrations/onuncaughtexception.d.ts.map +1 -0
- package/build/types/integrations/onunhandledrejection.d.ts +22 -0
- package/build/types/integrations/onunhandledrejection.d.ts.map +1 -0
- package/build/types/integrations/pino.d.ts +61 -0
- package/build/types/integrations/pino.d.ts.map +1 -0
- package/build/types/integrations/processSession.d.ts +7 -0
- package/build/types/integrations/processSession.d.ts.map +1 -0
- package/build/types/integrations/spotlight.d.ts +18 -0
- package/build/types/integrations/spotlight.d.ts.map +1 -0
- package/build/types/integrations/systemError.d.ts +14 -0
- package/build/types/integrations/systemError.d.ts.map +1 -0
- package/build/types/integrations/tracing/express.d.ts +1 -14
- package/build/types/integrations/tracing/express.d.ts.map +1 -1
- package/build/types/integrations/tracing/fastify/index.d.ts +1 -5
- package/build/types/integrations/tracing/fastify/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/hapi/index.d.ts +0 -23
- package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/index.d.ts +0 -9
- package/build/types/integrations/tracing/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/koa/index.d.ts +0 -46
- package/build/types/integrations/tracing/koa/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/redis/cache.d.ts.map +1 -1
- package/build/types/integrations/tracing/redis/index.d.ts +0 -7
- package/build/types/integrations/tracing/redis/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/redis/vendored/types.d.ts +0 -15
- package/build/types/integrations/tracing/redis/vendored/types.d.ts.map +1 -1
- package/build/types/integrations/winston.d.ts +55 -0
- package/build/types/integrations/winston.d.ts.map +1 -0
- package/build/types/logs/capture.d.ts +29 -0
- package/build/types/logs/capture.d.ts.map +1 -0
- package/build/types/logs/exports.d.ts +150 -0
- package/build/types/logs/exports.d.ts.map +1 -0
- package/build/types/nodeVersion.d.ts +8 -0
- package/build/types/nodeVersion.d.ts.map +1 -0
- package/build/types/otel/logger.d.ts +5 -0
- package/build/types/otel/logger.d.ts.map +1 -0
- package/build/types/proxy/base.d.ts +61 -0
- package/build/types/proxy/base.d.ts.map +1 -0
- package/build/types/proxy/helpers.d.ts +37 -0
- package/build/types/proxy/helpers.d.ts.map +1 -0
- package/build/types/proxy/index.d.ts +70 -0
- package/build/types/proxy/index.d.ts.map +1 -0
- package/build/types/proxy/parse-proxy-response.d.ts +39 -0
- package/build/types/proxy/parse-proxy-response.d.ts.map +1 -0
- package/build/types/sdk/api.d.ts +8 -0
- package/build/types/sdk/api.d.ts.map +1 -0
- package/build/types/sdk/client.d.ts +31 -0
- package/build/types/sdk/client.d.ts.map +1 -0
- package/build/types/sdk/index.d.ts +1 -19
- package/build/types/sdk/index.d.ts.map +1 -1
- package/build/types/sdk/initOtel.d.ts +4 -22
- package/build/types/sdk/initOtel.d.ts.map +1 -1
- package/build/types/sdk/scope.d.ts +7 -0
- package/build/types/sdk/scope.d.ts.map +1 -0
- package/build/types/transports/http-module.d.ts +27 -0
- package/build/types/transports/http-module.d.ts.map +1 -0
- package/build/types/transports/http.d.ts +17 -0
- package/build/types/transports/http.d.ts.map +1 -0
- package/build/types/transports/index.d.ts +3 -0
- package/build/types/transports/index.d.ts.map +1 -0
- package/build/types/types.d.ts +23 -39
- package/build/types/types.d.ts.map +1 -1
- package/build/types/utils/addOriginToSpan.d.ts +5 -0
- package/build/types/utils/addOriginToSpan.d.ts.map +1 -0
- package/build/types/utils/debug.d.ts +5 -0
- package/build/types/utils/debug.d.ts.map +1 -0
- package/build/types/utils/entry-point.d.ts +24 -0
- package/build/types/utils/entry-point.d.ts.map +1 -0
- package/build/types/utils/errorhandling.d.ts +5 -0
- package/build/types/utils/errorhandling.d.ts.map +1 -0
- package/build/types/utils/module.d.ts +3 -0
- package/build/types/utils/module.d.ts.map +1 -0
- package/build/types/utils/outgoingFetchRequest.d.ts +20 -0
- package/build/types/utils/outgoingFetchRequest.d.ts.map +1 -0
- package/build/types/utils/prepareEvent.d.ts +17 -0
- package/build/types/utils/prepareEvent.d.ts.map +1 -0
- package/build/types/utils/spotlight.d.ts +8 -0
- package/build/types/utils/spotlight.d.ts.map +1 -0
- package/package.json +38 -32
- package/build/cjs/init.js +0 -4
- package/build/cjs/init.js.map +0 -1
- package/build/cjs/integrations/http.js +0 -69
- package/build/cjs/integrations/http.js.map +0 -1
- package/build/cjs/integrations/node-fetch.js +0 -24
- package/build/cjs/integrations/node-fetch.js.map +0 -1
- package/build/cjs/integrations/tracing/InstrumentationNodeModuleFile.js +0 -15
- package/build/cjs/integrations/tracing/InstrumentationNodeModuleFile.js.map +0 -1
- package/build/cjs/integrations/tracing/amqplib/index.js +0 -21
- package/build/cjs/integrations/tracing/amqplib/index.js.map +0 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js +0 -117
- package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/patches.js +0 -185
- package/build/cjs/integrations/tracing/amqplib/vendored/patches.js.map +0 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js +0 -26
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js.map +0 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/types.js +0 -17
- package/build/cjs/integrations/tracing/amqplib/vendored/types.js.map +0 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/utils.js +0 -129
- package/build/cjs/integrations/tracing/amqplib/vendored/utils.js.map +0 -1
- package/build/cjs/integrations/tracing/anthropic-ai/index.js +0 -24
- package/build/cjs/integrations/tracing/anthropic-ai/index.js.map +0 -1
- package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js +0 -72
- package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/connect/index.js +0 -35
- package/build/cjs/integrations/tracing/connect/index.js.map +0 -1
- package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js +0 -16
- package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +0 -1
- package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js +0 -137
- package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/connect/vendored/internal-types.js +0 -8
- package/build/cjs/integrations/tracing/connect/vendored/internal-types.js.map +0 -1
- package/build/cjs/integrations/tracing/connect/vendored/utils.js +0 -36
- package/build/cjs/integrations/tracing/connect/vendored/utils.js.map +0 -1
- package/build/cjs/integrations/tracing/dataloader/index.js +0 -26
- package/build/cjs/integrations/tracing/dataloader/index.js.map +0 -1
- package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js +0 -227
- package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/fastify/v3/constants.js +0 -6
- package/build/cjs/integrations/tracing/fastify/v3/constants.js.map +0 -1
- package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js +0 -24
- package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +0 -1
- package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js +0 -220
- package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/fastify/v3/utils.js +0 -64
- package/build/cjs/integrations/tracing/fastify/v3/utils.js.map +0 -1
- package/build/cjs/integrations/tracing/firebase/firebase.js +0 -21
- package/build/cjs/integrations/tracing/firebase/firebase.js.map +0 -1
- package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js +0 -28
- package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js +0 -155
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js.map +0 -1
- package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js +0 -141
- package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js.map +0 -1
- package/build/cjs/integrations/tracing/genericPool/index.js +0 -21
- package/build/cjs/integrations/tracing/genericPool/index.js.map +0 -1
- package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js +0 -122
- package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/google-genai/index.js +0 -23
- package/build/cjs/integrations/tracing/google-genai/index.js.map +0 -1
- package/build/cjs/integrations/tracing/google-genai/instrumentation.js +0 -68
- package/build/cjs/integrations/tracing/google-genai/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/graphql/index.js +0 -34
- package/build/cjs/integrations/tracing/graphql/index.js.map +0 -1
- package/build/cjs/integrations/tracing/graphql/vendored/enum.js +0 -47
- package/build/cjs/integrations/tracing/graphql/vendored/enum.js.map +0 -1
- package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js +0 -15
- package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +0 -1
- package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js +0 -329
- package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js +0 -6
- package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js.map +0 -1
- package/build/cjs/integrations/tracing/graphql/vendored/symbols.js +0 -8
- package/build/cjs/integrations/tracing/graphql/vendored/symbols.js.map +0 -1
- package/build/cjs/integrations/tracing/graphql/vendored/utils.js +0 -265
- package/build/cjs/integrations/tracing/graphql/vendored/utils.js.map +0 -1
- package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js +0 -11
- package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +0 -1
- package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js +0 -255
- package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js +0 -24
- package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js.map +0 -1
- package/build/cjs/integrations/tracing/hapi/vendored/utils.js +0 -85
- package/build/cjs/integrations/tracing/hapi/vendored/utils.js.map +0 -1
- package/build/cjs/integrations/tracing/hono/constants.js +0 -14
- package/build/cjs/integrations/tracing/hono/constants.js.map +0 -1
- package/build/cjs/integrations/tracing/hono/index.js +0 -86
- package/build/cjs/integrations/tracing/hono/index.js.map +0 -1
- package/build/cjs/integrations/tracing/hono/instrumentation.js +0 -201
- package/build/cjs/integrations/tracing/hono/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/kafka/index.js +0 -21
- package/build/cjs/integrations/tracing/kafka/index.js.map +0 -1
- package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js +0 -237
- package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/kafka/vendored/semconv.js +0 -22
- package/build/cjs/integrations/tracing/kafka/vendored/semconv.js.map +0 -1
- package/build/cjs/integrations/tracing/kafka/vendored/utils.js +0 -114
- package/build/cjs/integrations/tracing/kafka/vendored/utils.js.map +0 -1
- package/build/cjs/integrations/tracing/knex/index.js +0 -26
- package/build/cjs/integrations/tracing/knex/index.js.map +0 -1
- package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js +0 -135
- package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/knex/vendored/semconv.js +0 -10
- package/build/cjs/integrations/tracing/knex/vendored/semconv.js.map +0 -1
- package/build/cjs/integrations/tracing/knex/vendored/utils.js +0 -84
- package/build/cjs/integrations/tracing/knex/vendored/utils.js.map +0 -1
- package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js +0 -10
- package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +0 -1
- package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js +0 -127
- package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/koa/vendored/internal-types.js +0 -6
- package/build/cjs/integrations/tracing/koa/vendored/internal-types.js.map +0 -1
- package/build/cjs/integrations/tracing/koa/vendored/types.js +0 -10
- package/build/cjs/integrations/tracing/koa/vendored/types.js.map +0 -1
- package/build/cjs/integrations/tracing/koa/vendored/utils.js +0 -36
- package/build/cjs/integrations/tracing/koa/vendored/utils.js.map +0 -1
- package/build/cjs/integrations/tracing/langchain/index.js +0 -23
- package/build/cjs/integrations/tracing/langchain/index.js.map +0 -1
- package/build/cjs/integrations/tracing/langchain/instrumentation.js +0 -160
- package/build/cjs/integrations/tracing/langchain/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/langgraph/index.js +0 -23
- package/build/cjs/integrations/tracing/langgraph/index.js.map +0 -1
- package/build/cjs/integrations/tracing/langgraph/instrumentation.js +0 -96
- package/build/cjs/integrations/tracing/langgraph/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/lrumemoizer/index.js +0 -21
- package/build/cjs/integrations/tracing/lrumemoizer/index.js.map +0 -1
- package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js +0 -38
- package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/mongo/index.js +0 -21
- package/build/cjs/integrations/tracing/mongo/index.js.map +0 -1
- package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js +0 -129
- package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/mongo/vendored/patches.js +0 -150
- package/build/cjs/integrations/tracing/mongo/vendored/patches.js.map +0 -1
- package/build/cjs/integrations/tracing/mongo/vendored/utils.js +0 -40
- package/build/cjs/integrations/tracing/mongo/vendored/utils.js.map +0 -1
- package/build/cjs/integrations/tracing/mongoose/index.js +0 -22
- package/build/cjs/integrations/tracing/mongoose/index.js.map +0 -1
- package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js +0 -240
- package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js.map +0 -1
- package/build/cjs/integrations/tracing/mongoose/vendored/utils.js +0 -41
- package/build/cjs/integrations/tracing/mongoose/vendored/utils.js.map +0 -1
- package/build/cjs/integrations/tracing/mysql/index.js +0 -21
- package/build/cjs/integrations/tracing/mysql/index.js.map +0 -1
- package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js +0 -185
- package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/mysql/vendored/semconv.js +0 -8
- package/build/cjs/integrations/tracing/mysql/vendored/semconv.js.map +0 -1
- package/build/cjs/integrations/tracing/mysql/vendored/utils.js +0 -38
- package/build/cjs/integrations/tracing/mysql/vendored/utils.js.map +0 -1
- package/build/cjs/integrations/tracing/mysql2/index.js +0 -22
- package/build/cjs/integrations/tracing/mysql2/index.js.map +0 -1
- package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js +0 -138
- package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js +0 -8
- package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js.map +0 -1
- package/build/cjs/integrations/tracing/mysql2/vendored/utils.js +0 -81
- package/build/cjs/integrations/tracing/mysql2/vendored/utils.js.map +0 -1
- package/build/cjs/integrations/tracing/openai/index.js +0 -23
- package/build/cjs/integrations/tracing/openai/index.js.map +0 -1
- package/build/cjs/integrations/tracing/openai/instrumentation.js +0 -80
- package/build/cjs/integrations/tracing/openai/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/postgres/index.js +0 -27
- package/build/cjs/integrations/tracing/postgres/index.js.map +0 -1
- package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js +0 -11
- package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +0 -1
- package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js +0 -11
- package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +0 -1
- package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js +0 -225
- package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/postgres/vendored/semconv.js +0 -8
- package/build/cjs/integrations/tracing/postgres/vendored/semconv.js.map +0 -1
- package/build/cjs/integrations/tracing/postgres/vendored/utils.js +0 -151
- package/build/cjs/integrations/tracing/postgres/vendored/utils.js.map +0 -1
- package/build/cjs/integrations/tracing/postgresjs.js +0 -265
- package/build/cjs/integrations/tracing/postgresjs.js.map +0 -1
- package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js +0 -147
- package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js +0 -445
- package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/redis/vendored/semconv.js +0 -8
- package/build/cjs/integrations/tracing/redis/vendored/semconv.js.map +0 -1
- package/build/cjs/integrations/tracing/tedious/index.js +0 -21
- package/build/cjs/integrations/tracing/tedious/index.js.map +0 -1
- package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js +0 -154
- package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing/tedious/vendored/semconv.js +0 -8
- package/build/cjs/integrations/tracing/tedious/vendored/semconv.js.map +0 -1
- package/build/cjs/integrations/tracing/tedious/vendored/utils.js +0 -29
- package/build/cjs/integrations/tracing/tedious/vendored/utils.js.map +0 -1
- package/build/cjs/integrations/tracing/vercelai/constants.js +0 -6
- package/build/cjs/integrations/tracing/vercelai/constants.js.map +0 -1
- package/build/cjs/integrations/tracing/vercelai/index.js +0 -36
- package/build/cjs/integrations/tracing/vercelai/index.js.map +0 -1
- package/build/cjs/integrations/tracing/vercelai/instrumentation.js +0 -176
- package/build/cjs/integrations/tracing/vercelai/instrumentation.js.map +0 -1
- package/build/cjs/preload.js +0 -8
- package/build/cjs/preload.js.map +0 -1
- package/build/cjs/sdk/diagnosticsChannelInjection.js +0 -21
- package/build/cjs/sdk/diagnosticsChannelInjection.js.map +0 -1
- package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js +0 -33
- package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js.map +0 -1
- package/build/cjs/utils/setHttpServerSpanRouteAttribute.js +0 -21
- package/build/cjs/utils/setHttpServerSpanRouteAttribute.js.map +0 -1
- package/build/esm/init.js +0 -4
- package/build/esm/init.js.map +0 -1
- package/build/esm/integrations/http.js +0 -66
- package/build/esm/integrations/http.js.map +0 -1
- package/build/esm/integrations/node-fetch.js +0 -22
- package/build/esm/integrations/node-fetch.js.map +0 -1
- package/build/esm/integrations/tracing/InstrumentationNodeModuleFile.js +0 -13
- package/build/esm/integrations/tracing/InstrumentationNodeModuleFile.js.map +0 -1
- package/build/esm/integrations/tracing/amqplib/index.js +0 -18
- package/build/esm/integrations/tracing/amqplib/index.js.map +0 -1
- package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js +0 -115
- package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/amqplib/vendored/patches.js +0 -177
- package/build/esm/integrations/tracing/amqplib/vendored/patches.js.map +0 -1
- package/build/esm/integrations/tracing/amqplib/vendored/semconv.js +0 -14
- package/build/esm/integrations/tracing/amqplib/vendored/semconv.js.map +0 -1
- package/build/esm/integrations/tracing/amqplib/vendored/types.js +0 -15
- package/build/esm/integrations/tracing/amqplib/vendored/types.js.map +0 -1
- package/build/esm/integrations/tracing/amqplib/vendored/utils.js +0 -117
- package/build/esm/integrations/tracing/amqplib/vendored/utils.js.map +0 -1
- package/build/esm/integrations/tracing/anthropic-ai/index.js +0 -21
- package/build/esm/integrations/tracing/anthropic-ai/index.js.map +0 -1
- package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js +0 -70
- package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/connect/index.js +0 -31
- package/build/esm/integrations/tracing/connect/index.js.map +0 -1
- package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js +0 -13
- package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +0 -1
- package/build/esm/integrations/tracing/connect/vendored/instrumentation.js +0 -135
- package/build/esm/integrations/tracing/connect/vendored/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/connect/vendored/internal-types.js +0 -6
- package/build/esm/integrations/tracing/connect/vendored/internal-types.js.map +0 -1
- package/build/esm/integrations/tracing/connect/vendored/utils.js +0 -32
- package/build/esm/integrations/tracing/connect/vendored/utils.js.map +0 -1
- package/build/esm/integrations/tracing/dataloader/index.js +0 -23
- package/build/esm/integrations/tracing/dataloader/index.js.map +0 -1
- package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js +0 -225
- package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/fastify/v3/constants.js +0 -4
- package/build/esm/integrations/tracing/fastify/v3/constants.js.map +0 -1
- package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js +0 -20
- package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +0 -1
- package/build/esm/integrations/tracing/fastify/v3/instrumentation.js +0 -218
- package/build/esm/integrations/tracing/fastify/v3/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/fastify/v3/utils.js +0 -60
- package/build/esm/integrations/tracing/fastify/v3/utils.js.map +0 -1
- package/build/esm/integrations/tracing/firebase/firebase.js +0 -18
- package/build/esm/integrations/tracing/firebase/firebase.js.map +0 -1
- package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js +0 -26
- package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js +0 -152
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +0 -1
- package/build/esm/integrations/tracing/firebase/otel/patches/functions.js +0 -138
- package/build/esm/integrations/tracing/firebase/otel/patches/functions.js.map +0 -1
- package/build/esm/integrations/tracing/genericPool/index.js +0 -18
- package/build/esm/integrations/tracing/genericPool/index.js.map +0 -1
- package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js +0 -120
- package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/google-genai/index.js +0 -20
- package/build/esm/integrations/tracing/google-genai/index.js.map +0 -1
- package/build/esm/integrations/tracing/google-genai/instrumentation.js +0 -66
- package/build/esm/integrations/tracing/google-genai/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/graphql/index.js +0 -31
- package/build/esm/integrations/tracing/graphql/index.js.map +0 -1
- package/build/esm/integrations/tracing/graphql/vendored/enum.js +0 -43
- package/build/esm/integrations/tracing/graphql/vendored/enum.js.map +0 -1
- package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js +0 -13
- package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +0 -1
- package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js +0 -327
- package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/graphql/vendored/internal-types.js +0 -4
- package/build/esm/integrations/tracing/graphql/vendored/internal-types.js.map +0 -1
- package/build/esm/integrations/tracing/graphql/vendored/symbols.js +0 -5
- package/build/esm/integrations/tracing/graphql/vendored/symbols.js.map +0 -1
- package/build/esm/integrations/tracing/graphql/vendored/utils.js +0 -257
- package/build/esm/integrations/tracing/graphql/vendored/utils.js.map +0 -1
- package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js +0 -9
- package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +0 -1
- package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js +0 -253
- package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/hapi/vendored/internal-types.js +0 -19
- package/build/esm/integrations/tracing/hapi/vendored/internal-types.js.map +0 -1
- package/build/esm/integrations/tracing/hapi/vendored/utils.js +0 -76
- package/build/esm/integrations/tracing/hapi/vendored/utils.js.map +0 -1
- package/build/esm/integrations/tracing/hono/constants.js +0 -11
- package/build/esm/integrations/tracing/hono/constants.js.map +0 -1
- package/build/esm/integrations/tracing/hono/index.js +0 -82
- package/build/esm/integrations/tracing/hono/index.js.map +0 -1
- package/build/esm/integrations/tracing/hono/instrumentation.js +0 -199
- package/build/esm/integrations/tracing/hono/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/kafka/index.js +0 -18
- package/build/esm/integrations/tracing/kafka/index.js.map +0 -1
- package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js +0 -235
- package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/kafka/vendored/semconv.js +0 -12
- package/build/esm/integrations/tracing/kafka/vendored/semconv.js.map +0 -1
- package/build/esm/integrations/tracing/kafka/vendored/utils.js +0 -108
- package/build/esm/integrations/tracing/kafka/vendored/utils.js.map +0 -1
- package/build/esm/integrations/tracing/knex/index.js +0 -23
- package/build/esm/integrations/tracing/knex/index.js.map +0 -1
- package/build/esm/integrations/tracing/knex/vendored/instrumentation.js +0 -133
- package/build/esm/integrations/tracing/knex/vendored/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/knex/vendored/semconv.js +0 -6
- package/build/esm/integrations/tracing/knex/vendored/semconv.js.map +0 -1
- package/build/esm/integrations/tracing/knex/vendored/utils.js +0 -75
- package/build/esm/integrations/tracing/knex/vendored/utils.js.map +0 -1
- package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js +0 -8
- package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +0 -1
- package/build/esm/integrations/tracing/koa/vendored/instrumentation.js +0 -125
- package/build/esm/integrations/tracing/koa/vendored/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/koa/vendored/internal-types.js +0 -4
- package/build/esm/integrations/tracing/koa/vendored/internal-types.js.map +0 -1
- package/build/esm/integrations/tracing/koa/vendored/types.js +0 -8
- package/build/esm/integrations/tracing/koa/vendored/types.js.map +0 -1
- package/build/esm/integrations/tracing/koa/vendored/utils.js +0 -33
- package/build/esm/integrations/tracing/koa/vendored/utils.js.map +0 -1
- package/build/esm/integrations/tracing/langchain/index.js +0 -20
- package/build/esm/integrations/tracing/langchain/index.js.map +0 -1
- package/build/esm/integrations/tracing/langchain/instrumentation.js +0 -158
- package/build/esm/integrations/tracing/langchain/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/langgraph/index.js +0 -20
- package/build/esm/integrations/tracing/langgraph/index.js.map +0 -1
- package/build/esm/integrations/tracing/langgraph/instrumentation.js +0 -94
- package/build/esm/integrations/tracing/langgraph/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/lrumemoizer/index.js +0 -18
- package/build/esm/integrations/tracing/lrumemoizer/index.js.map +0 -1
- package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js +0 -36
- package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/mongo/index.js +0 -18
- package/build/esm/integrations/tracing/mongo/index.js.map +0 -1
- package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js +0 -127
- package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/mongo/vendored/patches.js +0 -142
- package/build/esm/integrations/tracing/mongo/vendored/patches.js.map +0 -1
- package/build/esm/integrations/tracing/mongo/vendored/utils.js +0 -34
- package/build/esm/integrations/tracing/mongo/vendored/utils.js.map +0 -1
- package/build/esm/integrations/tracing/mongoose/index.js +0 -19
- package/build/esm/integrations/tracing/mongoose/index.js.map +0 -1
- package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js +0 -236
- package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js.map +0 -1
- package/build/esm/integrations/tracing/mongoose/vendored/utils.js +0 -38
- package/build/esm/integrations/tracing/mongoose/vendored/utils.js.map +0 -1
- package/build/esm/integrations/tracing/mysql/index.js +0 -18
- package/build/esm/integrations/tracing/mysql/index.js.map +0 -1
- package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js +0 -183
- package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/mysql/vendored/semconv.js +0 -5
- package/build/esm/integrations/tracing/mysql/vendored/semconv.js.map +0 -1
- package/build/esm/integrations/tracing/mysql/vendored/utils.js +0 -33
- package/build/esm/integrations/tracing/mysql/vendored/utils.js.map +0 -1
- package/build/esm/integrations/tracing/mysql2/index.js +0 -19
- package/build/esm/integrations/tracing/mysql2/index.js.map +0 -1
- package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js +0 -136
- package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/mysql2/vendored/semconv.js +0 -5
- package/build/esm/integrations/tracing/mysql2/vendored/semconv.js.map +0 -1
- package/build/esm/integrations/tracing/mysql2/vendored/utils.js +0 -75
- package/build/esm/integrations/tracing/mysql2/vendored/utils.js.map +0 -1
- package/build/esm/integrations/tracing/openai/index.js +0 -20
- package/build/esm/integrations/tracing/openai/index.js.map +0 -1
- package/build/esm/integrations/tracing/openai/instrumentation.js +0 -78
- package/build/esm/integrations/tracing/openai/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/postgres/index.js +0 -24
- package/build/esm/integrations/tracing/postgres/index.js.map +0 -1
- package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js +0 -9
- package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +0 -1
- package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js +0 -9
- package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +0 -1
- package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js +0 -223
- package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/postgres/vendored/semconv.js +0 -5
- package/build/esm/integrations/tracing/postgres/vendored/semconv.js.map +0 -1
- package/build/esm/integrations/tracing/postgres/vendored/utils.js +0 -136
- package/build/esm/integrations/tracing/postgres/vendored/utils.js.map +0 -1
- package/build/esm/integrations/tracing/postgresjs.js +0 -261
- package/build/esm/integrations/tracing/postgresjs.js.map +0 -1
- package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js +0 -145
- package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js +0 -443
- package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/redis/vendored/semconv.js +0 -5
- package/build/esm/integrations/tracing/redis/vendored/semconv.js.map +0 -1
- package/build/esm/integrations/tracing/tedious/index.js +0 -18
- package/build/esm/integrations/tracing/tedious/index.js.map +0 -1
- package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js +0 -152
- package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing/tedious/vendored/semconv.js +0 -5
- package/build/esm/integrations/tracing/tedious/vendored/semconv.js.map +0 -1
- package/build/esm/integrations/tracing/tedious/vendored/utils.js +0 -26
- package/build/esm/integrations/tracing/tedious/vendored/utils.js.map +0 -1
- package/build/esm/integrations/tracing/vercelai/constants.js +0 -4
- package/build/esm/integrations/tracing/vercelai/constants.js.map +0 -1
- package/build/esm/integrations/tracing/vercelai/index.js +0 -33
- package/build/esm/integrations/tracing/vercelai/index.js.map +0 -1
- package/build/esm/integrations/tracing/vercelai/instrumentation.js +0 -171
- package/build/esm/integrations/tracing/vercelai/instrumentation.js.map +0 -1
- package/build/esm/preload.js +0 -8
- package/build/esm/preload.js.map +0 -1
- package/build/esm/sdk/diagnosticsChannelInjection.js +0 -17
- package/build/esm/sdk/diagnosticsChannelInjection.js.map +0 -1
- package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js +0 -30
- package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js.map +0 -1
- package/build/esm/utils/setHttpServerSpanRouteAttribute.js +0 -19
- package/build/esm/utils/setHttpServerSpanRouteAttribute.js.map +0 -1
- package/build/loader-hook.mjs +0 -1
- package/build/types/init.d.ts +0 -2
- package/build/types/init.d.ts.map +0 -1
- package/build/types/integrations/http.d.ts +0 -131
- package/build/types/integrations/http.d.ts.map +0 -1
- package/build/types/integrations/node-fetch.d.ts +0 -9
- package/build/types/integrations/node-fetch.d.ts.map +0 -1
- package/build/types/integrations/tracing/InstrumentationNodeModuleFile.d.ts +0 -9
- package/build/types/integrations/tracing/InstrumentationNodeModuleFile.d.ts.map +0 -1
- package/build/types/integrations/tracing/amqplib/index.d.ts +0 -22
- package/build/types/integrations/tracing/amqplib/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +0 -44
- package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts.map +0 -1
- package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts +0 -11
- package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts +0 -11
- package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts.map +0 -1
- package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts +0 -23
- package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts.map +0 -1
- package/build/types/integrations/tracing/amqplib/vendored/types.d.ts +0 -49
- package/build/types/integrations/tracing/amqplib/vendored/types.d.ts.map +0 -1
- package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts +0 -42
- package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts.map +0 -1
- package/build/types/integrations/tracing/anthropic-ai/index.d.ts +0 -62
- package/build/types/integrations/tracing/anthropic-ai/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/anthropic-ai/instrumentation.d.ts +0 -19
- package/build/types/integrations/tracing/anthropic-ai/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/connect/index.d.ts +0 -48
- package/build/types/integrations/tracing/connect/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +0 -9
- package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts.map +0 -1
- package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts +0 -18
- package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts +0 -31
- package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts.map +0 -1
- package/build/types/integrations/tracing/connect/vendored/utils.d.ts +0 -5
- package/build/types/integrations/tracing/connect/vendored/utils.d.ts.map +0 -1
- package/build/types/integrations/tracing/dataloader/index.d.ts +0 -22
- package/build/types/integrations/tracing/dataloader/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts +0 -18
- package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/dataloader/vendored/types.d.ts +0 -22
- package/build/types/integrations/tracing/dataloader/vendored/types.d.ts.map +0 -1
- package/build/types/integrations/tracing/fastify/v3/constants.d.ts +0 -3
- package/build/types/integrations/tracing/fastify/v3/constants.d.ts.map +0 -1
- package/build/types/integrations/tracing/fastify/v3/enums/AttributeNames.d.ts +0 -15
- package/build/types/integrations/tracing/fastify/v3/enums/AttributeNames.d.ts.map +0 -1
- package/build/types/integrations/tracing/fastify/v3/instrumentation.d.ts +0 -16
- package/build/types/integrations/tracing/fastify/v3/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/fastify/v3/internal-types.d.ts +0 -7
- package/build/types/integrations/tracing/fastify/v3/internal-types.d.ts.map +0 -1
- package/build/types/integrations/tracing/fastify/v3/types.d.ts +0 -21
- package/build/types/integrations/tracing/fastify/v3/types.d.ts.map +0 -1
- package/build/types/integrations/tracing/fastify/v3/utils.d.ts +0 -28
- package/build/types/integrations/tracing/fastify/v3/utils.d.ts.map +0 -1
- package/build/types/integrations/tracing/firebase/firebase.d.ts +0 -8
- package/build/types/integrations/tracing/firebase/firebase.d.ts.map +0 -1
- package/build/types/integrations/tracing/firebase/index.d.ts +0 -2
- package/build/types/integrations/tracing/firebase/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +0 -14
- package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/firebase/otel/index.d.ts +0 -3
- package/build/types/integrations/tracing/firebase/otel/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts +0 -22
- package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts.map +0 -1
- package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts +0 -18
- package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts.map +0 -1
- package/build/types/integrations/tracing/firebase/otel/types.d.ts +0 -100
- package/build/types/integrations/tracing/firebase/otel/types.d.ts.map +0 -1
- package/build/types/integrations/tracing/genericPool/index.d.ts +0 -22
- package/build/types/integrations/tracing/genericPool/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +0 -5
- package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts.map +0 -1
- package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts +0 -11
- package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/google-genai/index.d.ts +0 -62
- package/build/types/integrations/tracing/google-genai/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/google-genai/instrumentation.d.ts +0 -20
- package/build/types/integrations/tracing/google-genai/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/graphql/index.d.ts +0 -50
- package/build/types/integrations/tracing/graphql/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/graphql/vendored/enum.d.ts +0 -38
- package/build/types/integrations/tracing/graphql/vendored/enum.d.ts.map +0 -1
- package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +0 -10
- package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts.map +0 -1
- package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts +0 -2
- package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts.map +0 -1
- package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts +0 -25
- package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts +0 -63
- package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts.map +0 -1
- package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts +0 -3
- package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts.map +0 -1
- package/build/types/integrations/tracing/graphql/vendored/types.d.ts +0 -33
- package/build/types/integrations/tracing/graphql/vendored/types.d.ts.map +0 -1
- package/build/types/integrations/tracing/graphql/vendored/utils.d.ts +0 -14
- package/build/types/integrations/tracing/graphql/vendored/utils.d.ts.map +0 -1
- package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +0 -6
- package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts.map +0 -1
- package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts +0 -70
- package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts.map +0 -1
- package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts +0 -72
- package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts +0 -32
- package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts.map +0 -1
- package/build/types/integrations/tracing/hapi/vendored/utils.d.ts +0 -18
- package/build/types/integrations/tracing/hapi/vendored/utils.d.ts.map +0 -1
- package/build/types/integrations/tracing/hono/constants.d.ts +0 -11
- package/build/types/integrations/tracing/hono/constants.d.ts.map +0 -1
- package/build/types/integrations/tracing/hono/index.d.ts +0 -60
- package/build/types/integrations/tracing/hono/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/hono/instrumentation.d.ts +0 -55
- package/build/types/integrations/tracing/hono/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/hono/types.d.ts +0 -36
- package/build/types/integrations/tracing/hono/types.d.ts.map +0 -1
- package/build/types/integrations/tracing/kafka/index.d.ts +0 -21
- package/build/types/integrations/tracing/kafka/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts +0 -15
- package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +0 -79
- package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts.map +0 -1
- package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts +0 -54
- package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts.map +0 -1
- package/build/types/integrations/tracing/kafka/vendored/utils.d.ts +0 -29
- package/build/types/integrations/tracing/kafka/vendored/utils.d.ts.map +0 -1
- package/build/types/integrations/tracing/knex/index.d.ts +0 -22
- package/build/types/integrations/tracing/knex/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts +0 -12
- package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/knex/vendored/semconv.d.ts +0 -7
- package/build/types/integrations/tracing/knex/vendored/semconv.d.ts.map +0 -1
- package/build/types/integrations/tracing/knex/vendored/utils.d.ts +0 -9
- package/build/types/integrations/tracing/knex/vendored/utils.d.ts.map +0 -1
- package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +0 -5
- package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts.map +0 -1
- package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts +0 -32
- package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts +0 -34
- package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts.map +0 -1
- package/build/types/integrations/tracing/koa/vendored/types.d.ts +0 -13
- package/build/types/integrations/tracing/koa/vendored/types.d.ts.map +0 -1
- package/build/types/integrations/tracing/koa/vendored/utils.d.ts +0 -15
- package/build/types/integrations/tracing/koa/vendored/utils.d.ts.map +0 -1
- package/build/types/integrations/tracing/langchain/index.d.ts +0 -101
- package/build/types/integrations/tracing/langchain/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/langchain/instrumentation.d.ts +0 -38
- package/build/types/integrations/tracing/langchain/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/langgraph/index.d.ts +0 -77
- package/build/types/integrations/tracing/langgraph/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/langgraph/instrumentation.d.ts +0 -19
- package/build/types/integrations/tracing/langgraph/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/lrumemoizer/index.d.ts +0 -21
- package/build/types/integrations/tracing/lrumemoizer/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +0 -6
- package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/mongo/index.d.ts +0 -22
- package/build/types/integrations/tracing/mongo/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts +0 -11
- package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts +0 -62
- package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts.map +0 -1
- package/build/types/integrations/tracing/mongo/vendored/patches.d.ts +0 -15
- package/build/types/integrations/tracing/mongo/vendored/patches.d.ts.map +0 -1
- package/build/types/integrations/tracing/mongo/vendored/utils.d.ts +0 -15
- package/build/types/integrations/tracing/mongo/vendored/utils.d.ts.map +0 -1
- package/build/types/integrations/tracing/mongoose/index.d.ts +0 -22
- package/build/types/integrations/tracing/mongoose/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +0 -33
- package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts.map +0 -1
- package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts +0 -18
- package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts.map +0 -1
- package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts +0 -4
- package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts.map +0 -1
- package/build/types/integrations/tracing/mysql/index.d.ts +0 -22
- package/build/types/integrations/tracing/mysql/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts +0 -14
- package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts +0 -78
- package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts.map +0 -1
- package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts +0 -19
- package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts.map +0 -1
- package/build/types/integrations/tracing/mysql/vendored/utils.d.ts +0 -22
- package/build/types/integrations/tracing/mysql/vendored/utils.d.ts.map +0 -1
- package/build/types/integrations/tracing/mysql2/index.d.ts +0 -22
- package/build/types/integrations/tracing/mysql2/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts +0 -9
- package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +0 -39
- package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts.map +0 -1
- package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts +0 -3
- package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts.map +0 -1
- package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts +0 -25
- package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts.map +0 -1
- package/build/types/integrations/tracing/openai/index.d.ts +0 -62
- package/build/types/integrations/tracing/openai/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/openai/instrumentation.d.ts +0 -26
- package/build/types/integrations/tracing/openai/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/postgres/index.d.ts +0 -26
- package/build/types/integrations/tracing/postgres/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +0 -6
- package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts.map +0 -1
- package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +0 -6
- package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts.map +0 -1
- package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts +0 -12
- package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts +0 -33
- package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts.map +0 -1
- package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +0 -20
- package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts.map +0 -1
- package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts +0 -54
- package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts.map +0 -1
- package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts +0 -13
- package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts.map +0 -1
- package/build/types/integrations/tracing/postgres/vendored/types.d.ts +0 -11
- package/build/types/integrations/tracing/postgres/vendored/types.d.ts.map +0 -1
- package/build/types/integrations/tracing/postgres/vendored/utils.d.ts +0 -56
- package/build/types/integrations/tracing/postgres/vendored/utils.d.ts.map +0 -1
- package/build/types/integrations/tracing/postgresjs.d.ts +0 -103
- package/build/types/integrations/tracing/postgresjs.d.ts.map +0 -1
- package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +0 -10
- package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts +0 -16
- package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/redis/vendored/semconv.d.ts +0 -4
- package/build/types/integrations/tracing/redis/vendored/semconv.d.ts.map +0 -1
- package/build/types/integrations/tracing/tedious/index.d.ts +0 -22
- package/build/types/integrations/tracing/tedious/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts +0 -11
- package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts +0 -19
- package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts.map +0 -1
- package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts +0 -21
- package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts.map +0 -1
- package/build/types/integrations/tracing/tedious/vendored/utils.d.ts +0 -9
- package/build/types/integrations/tracing/tedious/vendored/utils.d.ts.map +0 -1
- package/build/types/integrations/tracing/vercelai/constants.d.ts +0 -2
- package/build/types/integrations/tracing/vercelai/constants.d.ts.map +0 -1
- package/build/types/integrations/tracing/vercelai/index.d.ts +0 -44
- package/build/types/integrations/tracing/vercelai/index.d.ts.map +0 -1
- package/build/types/integrations/tracing/vercelai/instrumentation.d.ts +0 -56
- package/build/types/integrations/tracing/vercelai/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing/vercelai/types.d.ts +0 -50
- package/build/types/integrations/tracing/vercelai/types.d.ts.map +0 -1
- package/build/types/preload.d.ts +0 -2
- package/build/types/preload.d.ts.map +0 -1
- package/build/types/sdk/diagnosticsChannelInjection.d.ts +0 -41
- package/build/types/sdk/diagnosticsChannelInjection.d.ts.map +0 -1
- package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +0 -37
- package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts.map +0 -1
- package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts +0 -9
- package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts.map +0 -1
- package/build/types-ts3.8/debug-build.d.ts +0 -7
- package/build/types-ts3.8/index.d.ts +0 -44
- package/build/types-ts3.8/init.d.ts +0 -2
- package/build/types-ts3.8/integrations/featureFlagShims/growthbook.d.ts +0 -6
- package/build/types-ts3.8/integrations/featureFlagShims/index.d.ts +0 -6
- package/build/types-ts3.8/integrations/featureFlagShims/launchDarkly.d.ts +0 -12
- package/build/types-ts3.8/integrations/featureFlagShims/openFeature.d.ts +0 -25
- package/build/types-ts3.8/integrations/featureFlagShims/statsig.d.ts +0 -8
- package/build/types-ts3.8/integrations/featureFlagShims/unleash.d.ts +0 -8
- package/build/types-ts3.8/integrations/fs/index.d.ts +0 -14
- package/build/types-ts3.8/integrations/fs/vendored/constants.d.ts +0 -5
- package/build/types-ts3.8/integrations/fs/vendored/instrumentation.d.ts +0 -3
- package/build/types-ts3.8/integrations/fs/vendored/types.d.ts +0 -23
- package/build/types-ts3.8/integrations/fs/vendored/utils.d.ts +0 -15
- package/build/types-ts3.8/integrations/http.d.ts +0 -134
- package/build/types-ts3.8/integrations/node-fetch.d.ts +0 -9
- package/build/types-ts3.8/integrations/tracing/InstrumentationNodeModuleFile.d.ts +0 -9
- package/build/types-ts3.8/integrations/tracing/amqplib/index.d.ts +0 -22
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +0 -44
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/instrumentation.d.ts +0 -11
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/patches.d.ts +0 -11
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv.d.ts +0 -23
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/types.d.ts +0 -49
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/utils.d.ts +0 -42
- package/build/types-ts3.8/integrations/tracing/anthropic-ai/index.d.ts +0 -62
- package/build/types-ts3.8/integrations/tracing/anthropic-ai/instrumentation.d.ts +0 -19
- package/build/types-ts3.8/integrations/tracing/connect/index.d.ts +0 -48
- package/build/types-ts3.8/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +0 -9
- package/build/types-ts3.8/integrations/tracing/connect/vendored/instrumentation.d.ts +0 -18
- package/build/types-ts3.8/integrations/tracing/connect/vendored/internal-types.d.ts +0 -36
- package/build/types-ts3.8/integrations/tracing/connect/vendored/utils.d.ts +0 -5
- package/build/types-ts3.8/integrations/tracing/dataloader/index.d.ts +0 -22
- package/build/types-ts3.8/integrations/tracing/dataloader/vendored/instrumentation.d.ts +0 -18
- package/build/types-ts3.8/integrations/tracing/dataloader/vendored/types.d.ts +0 -22
- package/build/types-ts3.8/integrations/tracing/express.d.ts +0 -19
- package/build/types-ts3.8/integrations/tracing/fastify/index.d.ts +0 -119
- package/build/types-ts3.8/integrations/tracing/fastify/types.d.ts +0 -33
- package/build/types-ts3.8/integrations/tracing/fastify/v3/constants.d.ts +0 -3
- package/build/types-ts3.8/integrations/tracing/fastify/v3/enums/AttributeNames.d.ts +0 -15
- package/build/types-ts3.8/integrations/tracing/fastify/v3/instrumentation.d.ts +0 -16
- package/build/types-ts3.8/integrations/tracing/fastify/v3/internal-types.d.ts +0 -7
- package/build/types-ts3.8/integrations/tracing/fastify/v3/types.d.ts +0 -21
- package/build/types-ts3.8/integrations/tracing/fastify/v3/utils.d.ts +0 -28
- package/build/types-ts3.8/integrations/tracing/firebase/firebase.d.ts +0 -8
- package/build/types-ts3.8/integrations/tracing/firebase/index.d.ts +0 -2
- package/build/types-ts3.8/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +0 -14
- package/build/types-ts3.8/integrations/tracing/firebase/otel/index.d.ts +0 -3
- package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/firestore.d.ts +0 -22
- package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/functions.d.ts +0 -18
- package/build/types-ts3.8/integrations/tracing/firebase/otel/types.d.ts +0 -100
- package/build/types-ts3.8/integrations/tracing/genericPool/index.d.ts +0 -22
- package/build/types-ts3.8/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +0 -5
- package/build/types-ts3.8/integrations/tracing/genericPool/vendored/instrumentation.d.ts +0 -11
- package/build/types-ts3.8/integrations/tracing/google-genai/index.d.ts +0 -62
- package/build/types-ts3.8/integrations/tracing/google-genai/instrumentation.d.ts +0 -20
- package/build/types-ts3.8/integrations/tracing/graphql/index.d.ts +0 -50
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/enum.d.ts +0 -38
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +0 -10
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/graphql-types.d.ts +0 -2
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/instrumentation.d.ts +0 -25
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/internal-types.d.ts +0 -63
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/symbols.d.ts +0 -3
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/types.d.ts +0 -33
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/utils.d.ts +0 -14
- package/build/types-ts3.8/integrations/tracing/hapi/index.d.ts +0 -52
- package/build/types-ts3.8/integrations/tracing/hapi/types.d.ts +0 -166
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +0 -6
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/hapi-types.d.ts +0 -70
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/instrumentation.d.ts +0 -72
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/internal-types.d.ts +0 -32
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/utils.d.ts +0 -18
- package/build/types-ts3.8/integrations/tracing/hono/constants.d.ts +0 -11
- package/build/types-ts3.8/integrations/tracing/hono/index.d.ts +0 -60
- package/build/types-ts3.8/integrations/tracing/hono/instrumentation.d.ts +0 -55
- package/build/types-ts3.8/integrations/tracing/hono/types.d.ts +0 -36
- package/build/types-ts3.8/integrations/tracing/index.d.ts +0 -12
- package/build/types-ts3.8/integrations/tracing/kafka/index.d.ts +0 -21
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/instrumentation.d.ts +0 -15
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +0 -79
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/semconv.d.ts +0 -54
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/utils.d.ts +0 -29
- package/build/types-ts3.8/integrations/tracing/knex/index.d.ts +0 -22
- package/build/types-ts3.8/integrations/tracing/knex/vendored/instrumentation.d.ts +0 -12
- package/build/types-ts3.8/integrations/tracing/knex/vendored/semconv.d.ts +0 -7
- package/build/types-ts3.8/integrations/tracing/knex/vendored/utils.d.ts +0 -9
- package/build/types-ts3.8/integrations/tracing/koa/index.d.ts +0 -72
- package/build/types-ts3.8/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +0 -5
- package/build/types-ts3.8/integrations/tracing/koa/vendored/instrumentation.d.ts +0 -32
- package/build/types-ts3.8/integrations/tracing/koa/vendored/internal-types.d.ts +0 -34
- package/build/types-ts3.8/integrations/tracing/koa/vendored/types.d.ts +0 -13
- package/build/types-ts3.8/integrations/tracing/koa/vendored/utils.d.ts +0 -15
- package/build/types-ts3.8/integrations/tracing/langchain/index.d.ts +0 -101
- package/build/types-ts3.8/integrations/tracing/langchain/instrumentation.d.ts +0 -38
- package/build/types-ts3.8/integrations/tracing/langgraph/index.d.ts +0 -77
- package/build/types-ts3.8/integrations/tracing/langgraph/instrumentation.d.ts +0 -19
- package/build/types-ts3.8/integrations/tracing/lrumemoizer/index.d.ts +0 -21
- package/build/types-ts3.8/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +0 -6
- package/build/types-ts3.8/integrations/tracing/mongo/index.d.ts +0 -22
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/instrumentation.d.ts +0 -11
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/internal-types.d.ts +0 -62
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/patches.d.ts +0 -15
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/utils.d.ts +0 -15
- package/build/types-ts3.8/integrations/tracing/mongoose/index.d.ts +0 -22
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +0 -33
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose.d.ts +0 -18
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/utils.d.ts +0 -4
- package/build/types-ts3.8/integrations/tracing/mysql/index.d.ts +0 -22
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/instrumentation.d.ts +0 -14
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/mysql-types.d.ts +0 -78
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/semconv.d.ts +0 -19
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/utils.d.ts +0 -22
- package/build/types-ts3.8/integrations/tracing/mysql2/index.d.ts +0 -22
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/instrumentation.d.ts +0 -9
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +0 -39
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/semconv.d.ts +0 -3
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/utils.d.ts +0 -25
- package/build/types-ts3.8/integrations/tracing/openai/index.d.ts +0 -62
- package/build/types-ts3.8/integrations/tracing/openai/instrumentation.d.ts +0 -26
- package/build/types-ts3.8/integrations/tracing/postgres/index.d.ts +0 -26
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +0 -6
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +0 -6
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/instrumentation.d.ts +0 -12
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/internal-types.d.ts +0 -33
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +0 -20
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-types.d.ts +0 -54
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/semconv.d.ts +0 -13
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/types.d.ts +0 -11
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/utils.d.ts +0 -56
- package/build/types-ts3.8/integrations/tracing/postgresjs.d.ts +0 -103
- package/build/types-ts3.8/integrations/tracing/redis/cache.d.ts +0 -22
- package/build/types-ts3.8/integrations/tracing/redis/index.d.ts +0 -28
- package/build/types-ts3.8/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +0 -10
- package/build/types-ts3.8/integrations/tracing/redis/vendored/redis-instrumentation.d.ts +0 -16
- package/build/types-ts3.8/integrations/tracing/redis/vendored/semconv.d.ts +0 -4
- package/build/types-ts3.8/integrations/tracing/redis/vendored/types.d.ts +0 -24
- package/build/types-ts3.8/integrations/tracing/tedious/index.d.ts +0 -22
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/instrumentation.d.ts +0 -11
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/semconv.d.ts +0 -19
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/tedious-types.d.ts +0 -21
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/utils.d.ts +0 -9
- package/build/types-ts3.8/integrations/tracing/vercelai/constants.d.ts +0 -2
- package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +0 -44
- package/build/types-ts3.8/integrations/tracing/vercelai/instrumentation.d.ts +0 -56
- package/build/types-ts3.8/integrations/tracing/vercelai/types.d.ts +0 -50
- package/build/types-ts3.8/preload.d.ts +0 -2
- package/build/types-ts3.8/sdk/diagnosticsChannelInjection.d.ts +0 -41
- package/build/types-ts3.8/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +0 -37
- package/build/types-ts3.8/sdk/index.d.ts +0 -36
- package/build/types-ts3.8/sdk/initOtel.d.ts +0 -30
- package/build/types-ts3.8/types.d.ts +0 -89
- package/build/types-ts3.8/utils/redisCache.d.ts +0 -17
- package/build/types-ts3.8/utils/setHttpServerSpanRouteAttribute.d.ts +0 -9
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { types } from 'node:util';
|
|
2
|
+
import { Worker } from 'node:worker_threads';
|
|
3
|
+
import { defineIntegration, debug, getCombinedScopeData, getIsolationScope, getCurrentScope, getFilenameToDebugIdMap, GLOBAL_OBJ, getClient } from '@sentry/core';
|
|
4
|
+
import { isDebuggerEnabled } from '../../utils/debug.js';
|
|
5
|
+
|
|
6
|
+
const { isPromise } = types;
|
|
7
|
+
const base64WorkerScript = "LyohIEBzZW50cnkvbm9kZSAxMS4wLjAtYWxwaGEuMSAoNmFiN2VmZCkgfCBodHRwczovL2dpdGh1Yi5jb20vZ2V0c2VudHJ5L3NlbnRyeS1qYXZhc2NyaXB0ICovCmltcG9ydHtTZXNzaW9uIGFzIHR9ZnJvbSJub2RlOmluc3BlY3RvciI7aW1wb3J0e3dvcmtlckRhdGEgYXMgZSxwYXJlbnRQb3J0IGFzIG59ZnJvbSJub2RlOndvcmtlcl90aHJlYWRzIjtpbXBvcnR7cG9zaXggYXMgcixzZXAgYXMgb31mcm9tIm5vZGU6cGF0aCI7aW1wb3J0KmFzIHMgZnJvbSJub2RlOmh0dHAiO2ltcG9ydCphcyBpIGZyb20ibm9kZTpodHRwcyI7aW1wb3J0e1JlYWRhYmxlIGFzIGN9ZnJvbSJub2RlOnN0cmVhbSI7aW1wb3J0e2NyZWF0ZUd6aXAgYXMgdX1mcm9tIm5vZGU6emxpYiI7aW1wb3J0KmFzIGEgZnJvbSJub2RlOm5ldCI7aW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ibGVkOnQ9PntpPXR9fX0oZnVuY3Rpb24oKXtsZXQgdD1wcm9jZXNzLmhydGltZSgpO3JldHVybntnZXRUaW1lTXM6KCk9Pntjb25zdFtlLG5dPXByb2Nlc3MuaHJ0aW1lKHQpO3JldHVybiBNYXRoLmZsb29yKDFlMyplK24vMWU2KX0scmVzZXQ6KCk9Pnt0PXByb2Nlc3MuaHJ0aW1lKCl9fX0sVXQucG9sbEludGVydmFsLFV0LmFuclRocmVzaG9sZCxmdW5jdGlvbigpe3p0KCJXYXRjaGRvZyB0aW1lb3V0IikscXQ/KHp0KCJQYXVzaW5nIGRlYnVnZ2VyIHRvIGNhcHR1cmUgc3RhY2sgdHJhY2UiKSxxdCgpKTooenQoIkNhcHR1cmluZyBldmVudCB3aXRob3V0IGEgc3RhY2sgdHJhY2UiKSxadCgpLnRoZW4obnVsbCwoKT0+e3p0KCJTZW5kaW5nIEFOUiBldmVudCBmYWlsZWQgb24gd2F0Y2hkb2cgdGltZW91dC4iKX0pKX0pO24/Lm9uKCJtZXNzYWdlIix0PT57dC5zZXNzaW9uJiYoQnQ9SCh0LnNlc3Npb24pKSx0LmRlYnVnSW1hZ2VzJiYoTXQ9dC5kZWJ1Z0ltYWdlcyksS3QoKX0pOw==";
|
|
8
|
+
const DEFAULT_INTERVAL = 50;
|
|
9
|
+
const DEFAULT_HANG_THRESHOLD = 5e3;
|
|
10
|
+
function log(message, ...args) {
|
|
11
|
+
debug.log(`[ANR] ${message}`, ...args);
|
|
12
|
+
}
|
|
13
|
+
function globalWithScopeFetchFn() {
|
|
14
|
+
return GLOBAL_OBJ;
|
|
15
|
+
}
|
|
16
|
+
function getScopeData() {
|
|
17
|
+
const scope = getCombinedScopeData(getIsolationScope(), getCurrentScope());
|
|
18
|
+
scope.attachments = [];
|
|
19
|
+
scope.eventProcessors = [];
|
|
20
|
+
return scope;
|
|
21
|
+
}
|
|
22
|
+
async function getContexts(client) {
|
|
23
|
+
let event = { message: "ANR" };
|
|
24
|
+
const eventHint = {};
|
|
25
|
+
for (const processor of client.getEventProcessors()) {
|
|
26
|
+
if (event === null) break;
|
|
27
|
+
event = await processor(event, eventHint);
|
|
28
|
+
}
|
|
29
|
+
return event?.contexts || {};
|
|
30
|
+
}
|
|
31
|
+
const INTEGRATION_NAME = "Anr";
|
|
32
|
+
const _anrIntegration = ((options = {}) => {
|
|
33
|
+
let worker;
|
|
34
|
+
let client;
|
|
35
|
+
const gbl = globalWithScopeFetchFn();
|
|
36
|
+
gbl.__SENTRY_GET_SCOPES__ = getScopeData;
|
|
37
|
+
return {
|
|
38
|
+
name: INTEGRATION_NAME,
|
|
39
|
+
startWorker: () => {
|
|
40
|
+
if (worker) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
if (client) {
|
|
44
|
+
worker = _startWorker(client, options);
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
stopWorker: () => {
|
|
48
|
+
if (worker) {
|
|
49
|
+
worker.then((stop) => {
|
|
50
|
+
stop();
|
|
51
|
+
worker = void 0;
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
async setup(initClient) {
|
|
56
|
+
client = initClient;
|
|
57
|
+
if (options.captureStackTrace && await isDebuggerEnabled()) {
|
|
58
|
+
debug.warn("ANR captureStackTrace has been disabled because the debugger was already enabled");
|
|
59
|
+
options.captureStackTrace = false;
|
|
60
|
+
}
|
|
61
|
+
setImmediate(() => this.startWorker());
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
const anrIntegration = defineIntegration(_anrIntegration);
|
|
66
|
+
async function _startWorker(client, integrationOptions) {
|
|
67
|
+
const dsn = client.getDsn();
|
|
68
|
+
if (!dsn) {
|
|
69
|
+
return () => {
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
const contexts = await getContexts(client);
|
|
73
|
+
delete contexts.app?.app_memory;
|
|
74
|
+
delete contexts.device?.free_memory;
|
|
75
|
+
const initOptions = client.getOptions();
|
|
76
|
+
const sdkMetadata = client.getSdkMetadata() || {};
|
|
77
|
+
if (sdkMetadata.sdk) {
|
|
78
|
+
sdkMetadata.sdk.integrations = initOptions.integrations.map((i) => i.name);
|
|
79
|
+
}
|
|
80
|
+
const options = {
|
|
81
|
+
debug: debug.isEnabled(),
|
|
82
|
+
dsn,
|
|
83
|
+
tunnel: initOptions.tunnel,
|
|
84
|
+
environment: initOptions.environment || "production",
|
|
85
|
+
release: initOptions.release,
|
|
86
|
+
dist: initOptions.dist,
|
|
87
|
+
sdkMetadata,
|
|
88
|
+
appRootPath: integrationOptions.appRootPath,
|
|
89
|
+
pollInterval: integrationOptions.pollInterval || DEFAULT_INTERVAL,
|
|
90
|
+
anrThreshold: integrationOptions.anrThreshold || DEFAULT_HANG_THRESHOLD,
|
|
91
|
+
captureStackTrace: !!integrationOptions.captureStackTrace,
|
|
92
|
+
maxAnrEvents: integrationOptions.maxAnrEvents || 1,
|
|
93
|
+
staticTags: integrationOptions.staticTags || {},
|
|
94
|
+
contexts
|
|
95
|
+
};
|
|
96
|
+
if (options.captureStackTrace) {
|
|
97
|
+
const inspector = await import('node:inspector');
|
|
98
|
+
if (!inspector.url()) {
|
|
99
|
+
inspector.open(0);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
const worker = new Worker(new URL(`data:application/javascript;base64,${base64WorkerScript}`), {
|
|
103
|
+
workerData: options,
|
|
104
|
+
// We don't want any Node args to be passed to the worker
|
|
105
|
+
execArgv: [],
|
|
106
|
+
env: { ...process.env, NODE_OPTIONS: void 0 }
|
|
107
|
+
});
|
|
108
|
+
process.on("exit", () => {
|
|
109
|
+
worker.terminate();
|
|
110
|
+
});
|
|
111
|
+
const timer = setInterval(() => {
|
|
112
|
+
try {
|
|
113
|
+
const currentSession = getIsolationScope().getSession();
|
|
114
|
+
const session = currentSession ? { ...currentSession, toJSON: void 0 } : void 0;
|
|
115
|
+
worker.postMessage({ session, debugImages: getFilenameToDebugIdMap(initOptions.stackParser) });
|
|
116
|
+
} catch {
|
|
117
|
+
}
|
|
118
|
+
}, options.pollInterval);
|
|
119
|
+
timer.unref();
|
|
120
|
+
worker.on("message", (msg) => {
|
|
121
|
+
if (msg === "session-ended") {
|
|
122
|
+
log("ANR event sent from ANR worker. Clearing session in this thread.");
|
|
123
|
+
getIsolationScope().setSession(void 0);
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
worker.once("error", (err) => {
|
|
127
|
+
clearInterval(timer);
|
|
128
|
+
log("ANR worker error", err);
|
|
129
|
+
});
|
|
130
|
+
worker.once("exit", (code) => {
|
|
131
|
+
clearInterval(timer);
|
|
132
|
+
log("ANR worker exit", code);
|
|
133
|
+
});
|
|
134
|
+
worker.unref();
|
|
135
|
+
return () => {
|
|
136
|
+
worker.terminate();
|
|
137
|
+
clearInterval(timer);
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
function disableAnrDetectionForCallback(callback) {
|
|
141
|
+
const integration = getClient()?.getIntegrationByName(INTEGRATION_NAME);
|
|
142
|
+
if (!integration) {
|
|
143
|
+
return callback();
|
|
144
|
+
}
|
|
145
|
+
integration.stopWorker();
|
|
146
|
+
const result = callback();
|
|
147
|
+
if (isPromise(result)) {
|
|
148
|
+
return result.finally(() => integration.startWorker());
|
|
149
|
+
}
|
|
150
|
+
integration.startWorker();
|
|
151
|
+
return result;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export { anrIntegration, base64WorkerScript, disableAnrDetectionForCallback };
|
|
155
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/integrations/anr/index.ts"],"sourcesContent":["import { types } from 'node:util';\nimport { Worker } from 'node:worker_threads';\nimport type { Contexts, Event, EventHint, Integration, IntegrationFn, ScopeData } from '@sentry/core';\nimport {\n debug,\n defineIntegration,\n getClient,\n getCombinedScopeData,\n getCurrentScope,\n getFilenameToDebugIdMap,\n getIsolationScope,\n GLOBAL_OBJ,\n} from '@sentry/core';\nimport type { NodeClient } from '../../sdk/client';\nimport { isDebuggerEnabled } from '../../utils/debug';\nimport type { AnrIntegrationOptions, WorkerStartData } from './common';\n\nconst { isPromise } = types;\n\n// This string is a placeholder that gets overwritten with the worker code.\nexport const base64WorkerScript = '###AnrWorkerScript###';\n\nconst DEFAULT_INTERVAL = 50;\nconst DEFAULT_HANG_THRESHOLD = 5000;\n\nfunction log(message: string, ...args: unknown[]): void {\n debug.log(`[ANR] ${message}`, ...args);\n}\n\nfunction globalWithScopeFetchFn(): typeof GLOBAL_OBJ & { __SENTRY_GET_SCOPES__?: () => ScopeData } {\n return GLOBAL_OBJ;\n}\n\n/** Fetches merged scope data */\nfunction getScopeData(): ScopeData {\n const scope = getCombinedScopeData(getIsolationScope(), getCurrentScope());\n\n // We remove attachments because they likely won't serialize well as json\n scope.attachments = [];\n // We can't serialize event processor functions\n scope.eventProcessors = [];\n\n return scope;\n}\n\n/**\n * Gets contexts by calling all event processors. This shouldn't be called until all integrations are setup\n */\nasync function getContexts(client: NodeClient): Promise<Contexts> {\n let event: Event | null = { message: 'ANR' };\n const eventHint: EventHint = {};\n\n for (const processor of client.getEventProcessors()) {\n if (event === null) break;\n event = await processor(event, eventHint);\n }\n\n return event?.contexts || {};\n}\n\nconst INTEGRATION_NAME = 'Anr' as const;\n\ntype AnrInternal = { startWorker: () => void; stopWorker: () => void };\n\n// eslint-disable-next-line typescript/no-deprecated\nconst _anrIntegration = ((options: Partial<AnrIntegrationOptions> = {}) => {\n let worker: Promise<() => void> | undefined;\n let client: NodeClient | undefined;\n\n // Hookup the scope fetch function to the global object so that it can be called from the worker thread via the\n // debugger when it pauses\n const gbl = globalWithScopeFetchFn();\n gbl.__SENTRY_GET_SCOPES__ = getScopeData;\n\n return {\n name: INTEGRATION_NAME,\n startWorker: () => {\n if (worker) {\n return;\n }\n\n if (client) {\n worker = _startWorker(client, options);\n }\n },\n stopWorker: () => {\n if (worker) {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n worker.then(stop => {\n stop();\n worker = undefined;\n });\n }\n },\n async setup(initClient: NodeClient) {\n client = initClient;\n\n if (options.captureStackTrace && (await isDebuggerEnabled())) {\n debug.warn('ANR captureStackTrace has been disabled because the debugger was already enabled');\n options.captureStackTrace = false;\n }\n\n // setImmediate is used to ensure that all other integrations have had their setup called first.\n // This allows us to call into all integrations to fetch the full context\n setImmediate(() => this.startWorker());\n },\n } as Integration & AnrInternal;\n}) satisfies IntegrationFn;\n\n// eslint-disable-next-line typescript/no-deprecated\ntype AnrReturn = (options?: Partial<AnrIntegrationOptions>) => Integration & AnrInternal;\n\n/**\n * Application Not Responding (ANR) integration for Node.js applications.\n *\n * @deprecated The ANR integration has been deprecated. Use `eventLoopBlockIntegration` from `@sentry/node-native` instead.\n *\n * Detects when the Node.js main thread event loop is blocked for more than the configured\n * threshold (5 seconds by default) and reports these as Sentry events.\n *\n * ANR detection uses a worker thread to monitor the event loop in the main app thread.\n * The main app thread sends a heartbeat message to the ANR worker thread every 50ms by default.\n * If the ANR worker does not receive a heartbeat message for the configured threshold duration,\n * it triggers an ANR event.\n *\n * - Node.js 16.17.0 or higher\n * - Only supported in the Node.js runtime (not browsers)\n * - Not supported for Node.js clusters\n *\n * Overhead should be minimal:\n * - Main thread: Only polling the ANR worker over IPC every 50ms\n * - Worker thread: Consumes around 10-20 MB of RAM\n * - When ANR detected: Brief pause in debugger to capture stack trace (negligible compared to the blocking)\n *\n * @example\n * ```javascript\n * Sentry.init({\n * dsn: \"https://examplePublicKey@o0.ingest.sentry.io/0\",\n * integrations: [\n * Sentry.anrIntegration({\n * anrThreshold: 5000,\n * captureStackTrace: true,\n * pollInterval: 50,\n * }),\n * ],\n * });\n * ```\n */\nexport const anrIntegration = defineIntegration(_anrIntegration) as AnrReturn;\n\n/**\n * Starts the ANR worker thread\n *\n * @returns A function to stop the worker\n */\nasync function _startWorker(\n client: NodeClient,\n // eslint-disable-next-line typescript/no-deprecated\n integrationOptions: Partial<AnrIntegrationOptions>,\n): Promise<() => void> {\n const dsn = client.getDsn();\n\n if (!dsn) {\n return () => {\n //\n };\n }\n\n const contexts = await getContexts(client);\n\n // These will not be accurate if sent later from the worker thread\n delete contexts.app?.app_memory;\n delete contexts.device?.free_memory;\n\n const initOptions = client.getOptions();\n\n const sdkMetadata = client.getSdkMetadata() || {};\n if (sdkMetadata.sdk) {\n sdkMetadata.sdk.integrations = initOptions.integrations.map(i => i.name);\n }\n\n const options: WorkerStartData = {\n debug: debug.isEnabled(),\n dsn,\n tunnel: initOptions.tunnel,\n environment: initOptions.environment || 'production',\n release: initOptions.release,\n dist: initOptions.dist,\n sdkMetadata,\n appRootPath: integrationOptions.appRootPath,\n pollInterval: integrationOptions.pollInterval || DEFAULT_INTERVAL,\n anrThreshold: integrationOptions.anrThreshold || DEFAULT_HANG_THRESHOLD,\n captureStackTrace: !!integrationOptions.captureStackTrace,\n maxAnrEvents: integrationOptions.maxAnrEvents || 1,\n staticTags: integrationOptions.staticTags || {},\n contexts,\n };\n\n if (options.captureStackTrace) {\n const inspector = await import('node:inspector');\n if (!inspector.url()) {\n inspector.open(0);\n }\n }\n\n const worker = new Worker(new URL(`data:application/javascript;base64,${base64WorkerScript}`), {\n workerData: options,\n // We don't want any Node args to be passed to the worker\n execArgv: [],\n env: { ...process.env, NODE_OPTIONS: undefined },\n });\n\n process.on('exit', () => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n worker.terminate();\n });\n\n const timer = setInterval(() => {\n try {\n const currentSession = getIsolationScope().getSession();\n // We need to copy the session object and remove the toJSON method so it can be sent to the worker\n // serialized without making it a SerializedSession\n const session = currentSession ? { ...currentSession, toJSON: undefined } : undefined;\n // message the worker to tell it the main event loop is still running\n worker.postMessage({ session, debugImages: getFilenameToDebugIdMap(initOptions.stackParser) });\n } catch {\n //\n }\n }, options.pollInterval);\n // Timer should not block exit\n timer.unref();\n\n worker.on('message', (msg: string) => {\n if (msg === 'session-ended') {\n log('ANR event sent from ANR worker. Clearing session in this thread.');\n getIsolationScope().setSession(undefined);\n }\n });\n\n worker.once('error', (err: Error) => {\n clearInterval(timer);\n log('ANR worker error', err);\n });\n\n worker.once('exit', (code: number) => {\n clearInterval(timer);\n log('ANR worker exit', code);\n });\n\n // Ensure this thread can't block app exit\n worker.unref();\n\n return () => {\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\n worker.terminate();\n clearInterval(timer);\n };\n}\n\n/**\n * @see {@link disableBlockDetectionForCallback}\n *\n * @deprecated The ANR integration has been deprecated. Use `eventLoopBlockIntegration` from `@sentry/node-native` instead.\n */\nexport function disableAnrDetectionForCallback<T>(callback: () => T): T;\n/**\n * @see {@link disableBlockDetectionForCallback}\n *\n * @deprecated The ANR integration has been deprecated. Use `eventLoopBlockIntegration` from `@sentry/node-native` instead.\n */\nexport function disableAnrDetectionForCallback<T>(callback: () => Promise<T>): Promise<T>;\n/**\n * Temporarily disables ANR detection for the duration of a callback function.\n *\n * This utility function allows you to disable ANR detection during operations that\n * are expected to block the event loop, such as intensive computational tasks or\n * synchronous I/O operations.\n *\n * @deprecated The ANR integration has been deprecated. Use `eventLoopBlockIntegration` from `@sentry/node-native` instead.\n */\nexport function disableAnrDetectionForCallback<T>(callback: () => T | Promise<T>): T | Promise<T> {\n const integration = getClient()?.getIntegrationByName(INTEGRATION_NAME) as AnrInternal | undefined;\n\n if (!integration) {\n return callback();\n }\n\n integration.stopWorker();\n\n const result = callback();\n if (isPromise(result)) {\n return result.finally(() => integration.startWorker());\n }\n\n integration.startWorker();\n return result;\n}\n"],"names":[],"mappings":";;;;;AAiBA,MAAM,EAAE,WAAU,GAAI,KAAA;AAGf,MAAM,kBAAA,GAAqB;AAElC,MAAM,gBAAA,GAAmB,EAAA;AACzB,MAAM,sBAAA,GAAyB,GAAA;AAE/B,SAAS,GAAA,CAAI,YAAoB,IAAA,EAAuB;AACtD,EAAA,KAAA,CAAM,GAAA,CAAI,CAAA,MAAA,EAAS,OAAO,CAAA,CAAA,EAAI,GAAG,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EAAS;AACxB,EAAA,IAAI,SAAA,CAAU,MAAM,CAAA,EAAG;AACrB,IAAA,OAAO,MAAA,CAAO,OAAA,CAAQ,MAAM,WAAA,CAAY,aAAa,CAAA;AAAA,EACvD;AAEA,EAAA,WAAA,CAAY,WAAA,EAAY;AACxB,EAAA,OAAO,MAAA;AACT;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! @sentry/node 11.0.0-alpha.1 (6ab7efd) | https://github.com/getsentry/sentry-javascript */
|
|
2
|
+
import{Session as t}from"node:inspector";import{workerData as e,parentPort as n}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=globalThis,l="11.0.0-alpha.1";function d(){return g(p),p}function g(t){const e=t.__SENTRY__=t.__SENTRY__||{};return e.version=e.version||l,e[l]=e[l]||{}}function m(t,e,n=p){const r=n.__SENTRY__=n.__SENTRY__||{},o=r[l]=r[l]||{};return o[t]||(o[t]=e())}const y={};function b(t){if(!("console"in p))return t();const e=p.console,n={},r=Object.keys(y);r.forEach(t=>{const r=y[t];n[t]=e[t],e[t]=r});try{return t()}finally{r.forEach(t=>{e[t]=n[t]})}}function v(){return S().enabled}function w(t,...e){h&&v()&&b(()=>{p.console[t](`Sentry Logger [${t}]:`,...e)})}function S(){return h?m("loggerSettings",()=>({enabled:!1})):{enabled:!1}}const _={enable:function(){S().enabled=!0},disable:function(){S().enabled=!1},isEnabled:v,log:function(...t){w("log",...t)},warn:function(...t){w("warn",...t)},error:function(...t){w("error",...t)}},$=/captureMessage|captureException/;function E(t){return t[t.length-1]||{}}const x="<anonymous>";const N=Object.prototype.toString;function j(t){return function(t,e){return N.call(t)===`[object ${e}]`}(t,"Object")}function C(t){return Boolean(t?.then&&"function"==typeof t.then)}function O(t,e){try{return t instanceof e}catch{return!1}}function P(t){if(function(t){switch(N.call(t)){case"[object Error]":case"[object Exception]":case"[object DOMException]":case"[object WebAssembly.Exception]":return!0;default:return O(t,Error)}}(t))return{message:t.message,name:t.name,stack:t.stack,...A(t)};if(e=t,"undefined"!=typeof Event&&O(e,Event)){const{type:e,target:n,currentTarget:r,detail:o}=t;return{type:e,target:n,currentTarget:r,...o?{detail:o}:{},...A(t)}}var e;return t}function A(t){return"object"==typeof(e=t)&&null!==e?Object.fromEntries(Object.entries(t)):{};var e}let k;function T(t){if(void 0!==k)return k?k(t):t();const e=Symbol.for("__SENTRY_SAFE_RANDOM_ID_WRAPPER__"),n=p;return e in n&&"function"==typeof n[e]?(k=n[e],k(t)):(k=null,t())}function R(){return T(()=>Math.random())}function I(){return T(()=>Date.now())}const D=Symbol.for("sentry.skipNormalization"),U=Symbol.for("sentry.overrideNormalizationDepth");function B(t,e=100,n=1/0){try{return L("",t,e,n)}catch(t){return{ERROR:`**non-serializable** (${t})`}}}function L(t,e,n=1/0,r=1/0,o=function(){const t=new WeakSet;function e(e){return!!t.has(e)||(t.add(e),!1)}function n(e){t.delete(e)}return[e,n]}()){const[s,i]=o;if(null==e||["boolean","string"].includes(typeof e)||"number"==typeof e&&Number.isFinite(e))return e;const c=function(t,e){try{if("undefined"!=typeof global&&e===global)return"[Global]";if("number"==typeof e&&!Number.isFinite(e))return`[${e}]`;if("function"==typeof e)return`[Function: ${function(t){try{return t&&"function"==typeof t&&t.name||x}catch{return x}}(e)}]`;if("symbol"==typeof e)return`[${String(e)}]`;if("bigint"==typeof e)return`[BigInt: ${String(e)}]`;const t=function(t){const e=Object.getPrototypeOf(t);return e?.constructor?e.constructor.name:"null prototype"}(e);return`[object ${t}]`}catch(t){return`**non-serializable** (${t})`}}(0,e);if(!c.startsWith("[object "))return c;if(function(t){return Boolean(t[D])}(e))return e;const u=function(t){const e=t[U];return"number"==typeof e?e:void 0}(e),a=void 0!==u?u:n;if(0===a)return c.replace("object ","");if(s(e))return"[Circular ~]";const f=e;if(f&&"function"==typeof f.toJSON)try{return L("",f.toJSON(),a-1,r,o)}catch{}const h=Array.isArray(e)?[]:{};let p=0;const l=P(e);for(const t in l){if(!Object.prototype.hasOwnProperty.call(l,t))continue;if(p>=r){h[t]="[MaxProperties ~]";break}const e=l[t];h[t]=L(t,e,a-1,r,o),p++}return i(e),h}function M(t,e){const n=e.replace(/\\/g,"/").replace(/[|\\{}()[\]^$+*?.]/g,"\\$&");let r=t;try{r=decodeURI(t)}catch{}return r.replace(/\\/g,"/").replace(/webpack:\/?/g,"").replace(new RegExp(`(file://)?/*${n}/*`,"ig"),"app:///")}function z(t,e=0){return"string"!=typeof t||0===e||t.length<=e?t:`${t.slice(0,e)}...`}let J;function W(t=function(){const t=p;return t.crypto||t.msCrypto}()){try{if(t?.randomUUID)return T(()=>t.randomUUID()).replace(/-/g,"")}catch{}return J||(J="10000000100040008000100000000000"),J.replace(/[018]/g,t=>(t^(16*R()&15)>>t/4).toString(16))}function F(){return I()/1e3}let G;function Y(){return(G??(G=function(){const{performance:t}=p;if(!t?.now||!t.timeOrigin)return F;const e=t.timeOrigin;return()=>(e+T(()=>t.now()))/1e3}()))()}function H(t){const e=Y(),n={sid:W(),init:!0,timestamp:e,started:e,duration:0,status:"ok",errors:0,ignoreDuration:!1,toJSON:()=>function(t){return{sid:`${t.sid}`,init:t.init,started:new Date(1e3*t.started).toISOString(),timestamp:new Date(1e3*t.timestamp).toISOString(),status:t.status,errors:t.errors,did:"number"==typeof t.did||"string"==typeof t.did?`${t.did}`:void 0,duration:t.duration,abnormal_mechanism:t.abnormal_mechanism,attrs:{release:t.release,environment:t.environment,ip_address:t.ipAddress,user_agent:t.userAgent}}}(n)};return t&&Z(n,t),n}function Z(t,e={}){if(e.user&&(!t.ipAddress&&e.user.ip_address&&(t.ipAddress=e.user.ip_address),t.did||e.did||(t.did=e.user.id||e.user.email||e.user.username)),t.timestamp=e.timestamp||Y(),e.abnormal_mechanism&&(t.abnormal_mechanism=e.abnormal_mechanism),e.ignoreDuration&&(t.ignoreDuration=e.ignoreDuration),e.sid&&(t.sid=32===e.sid.length?e.sid:W()),void 0!==e.init&&(t.init=e.init),!t.did&&e.did&&(t.did=`${e.did}`),"number"==typeof e.started&&(t.started=e.started),t.ignoreDuration)t.duration=void 0;else if("number"==typeof e.duration)t.duration=e.duration;else{const e=t.timestamp-t.started;t.duration=e>=0?e:0}e.release&&(t.release=e.release),e.environment&&(t.environment=e.environment),!t.ipAddress&&e.ipAddress&&(t.ipAddress=e.ipAddress),!t.userAgent&&e.userAgent&&(t.userAgent=e.userAgent),"number"==typeof e.errors&&(t.errors=e.errors),e.status&&(t.status=e.status)}function q(t,e,n=2){if(!e||"object"!=typeof e||n<=0)return e;if(t&&0===Object.keys(e).length)return t;const r={...t};for(const t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=q(r[t],e[t],n-1));return r}class K{constructor(){this.t=!1,this.o=[],this.i=[],this.u=[],this.h=[],this.p={},this.l={},this.m={},this.v={},this.S={},this._={},function(t,e,n){try{Object.defineProperty(t,e,{value:n,writable:!0,configurable:!0})}catch{h&&_.log(`Failed to add non-enumerable property "${String(e)}" to object`,t)}}(this,"refs",{}),this.N={traceId:W(),sampleRand:R()}}clone(){const t=new K;return t.u=[...this.u],t.l={...this.l},t.m={...this.m},t.v={...this.v},t.S={...this.S},this.S.flags&&(t.S.flags={values:[...this.S.flags.values]}),t.p=this.p,t.j=this.j,t.C=this.C,t.O=this.O,t.P=this.P,t.i=[...this.i],t.h=[...this.h],t._={...this._},t.N={...this.N},t.A=this.A,t.k=this.k,t.T=this.T,t.refs={...this.refs},t}setClient(t){this.A=t}setLastEventId(t){this.k=t}getClient(){return this.A}lastEventId(){return this.k}addScopeListener(t){this.o.push(t)}addEventProcessor(t){return this.i.push(t),this}setUser(t){return this.p=t||{email:void 0,id:void 0,ip_address:void 0,username:void 0},this.C&&Z(this.C,{user:t}),this.R(),this}getUser(){return this.p}setConversationId(t){return this.T=t||void 0,this.R(),this}setTags(t){return this.l={...this.l,...t},this.R(),this}setTag(t,e){return this.setTags({[t]:e})}setAttributes(t){return this.m={...this.m,...t},this.R(),this}setAttribute(t,e){return this.setAttributes({[t]:e})}removeAttribute(t){return t in this.m&&(delete this.m[t],this.R()),this}setExtras(t){return this.v={...this.v,...t},this.R(),this}setExtra(t,e){return this.v={...this.v,[t]:e},this.R(),this}setFingerprint(t){return this.P=t,this.R(),this}setLevel(t){return this.j=t,this.R(),this}setTransactionName(t){return this.O=t,this.R(),this}setContext(t,e){return null===e?delete this.S[t]:this.S[t]=e,this.R(),this}setSession(t){return t?this.C=t:delete this.C,this.R(),this}getSession(){return this.C}update(t){if(!t)return this;const e="function"==typeof t?t(this):t,n=e instanceof K?e.getScopeData():j(e)?t:void 0,{tags:r,attributes:o,extra:s,user:i,contexts:c,level:u,fingerprint:a=[],propagationContext:f,conversationId:h}=n||{};return this.l={...this.l,...r},this.m={...this.m,...o},this.v={...this.v,...s},this.S={...this.S,...c},i&&Object.keys(i).length&&(this.p=i),u&&(this.j=u),a.length&&(this.P=a),f&&(this.N=f),h&&(this.T=h),this}addBreadcrumb(t,e){const n="number"==typeof e?e:100;if(n<=0)return this;const r={timestamp:F(),...t,message:t.message?z(t.message,2048):t.message};return this.u.push(r),this.u.length>n&&(this.u=this.u.slice(-n),this.A?.recordDroppedEvent("buffer_overflow","log_item")),this.R(),this}getLastBreadcrumb(){return this.u[this.u.length-1]}clearBreadcrumbs(){return this.u=[],this.R(),this}addAttachment(t){return this.h.push(t),this}clearAttachments(){return this.h=[],this}getScopeData(){return{breadcrumbs:this.u,attachments:this.h,contexts:this.S,tags:this.l,attributes:this.m,extra:this.v,user:this.p,level:this.j,fingerprint:this.P||[],eventProcessors:this.i,propagationContext:this.N,sdkProcessingMetadata:this._,transactionName:this.O,conversationId:this.T}}setSDKProcessingMetadata(t){return this._=q(this._,t,2),this}setPropagationContext(t){return this.N=t,this}getPropagationContext(){return this.N}captureException(t,e){const n=e?.event_id||W();if(!this.A)return h&&_.warn("No client configured on scope - will not capture exception!"),n;const r=new Error("Sentry syntheticException");return this.A.captureException(t,{originalException:t,syntheticException:r,...e,event_id:n},this),n}captureMessage(t,e,n){const r=n?.event_id||W();if(!this.A)return h&&_.warn("No client configured on scope - will not capture message!"),r;const o=n?.syntheticException??new Error(t);return this.A.captureMessage(t,e,{originalException:t,syntheticException:o,...n,event_id:r},this),r}captureEvent(t,e){const n=t.event_id||e?.event_id||W();return this.A?(this.A.captureEvent(t,{...e,event_id:n},this),n):(h&&_.warn("No client configured on scope - will not capture event!"),n)}R(){this.t||(this.t=!0,this.o.forEach(t=>{t(this)}),this.t=!1)}}const V="__SENTRY_SUPPRESS_TRACING__",Q=t=>t instanceof Promise&&!t[X],X=Symbol("chained PromiseLike"),tt=(t,e)=>{if(!e)return t;let n=!1;for(const r in t){if(r in e)continue;n=!0;const o=t[r];"function"==typeof o?Object.defineProperty(e,r,{value:(...e)=>o.apply(t,e),enumerable:!0,configurable:!0,writable:!0}):e[r]=o}return n&&Object.assign(e,{[X]:!0}),e};class et{constructor(t,e){let n,r;n=t||new K,r=e||new K,this.I=[{scope:n}],this.D=r}withScope(t){const e=this.U();let n;try{n=t(e)}catch(t){throw this.B(),t}return C(n)?((t,e,n)=>{const r=t.then(t=>(e(t),t),t=>{throw n(t),t});return Q(r)&&Q(t)?r:tt(t,r)})(n,()=>this.B(),()=>this.B()):(this.B(),n)}getClient(){return this.getStackTop().client}getScope(){return this.getStackTop().scope}getIsolationScope(){return this.D}getStackTop(){return this.I[this.I.length-1]}U(){const t=this.getScope().clone();return this.I.push({client:this.getClient(),scope:t}),t}B(){return!(this.I.length<=1)&&!!this.I.pop()}}function nt(){const t=g(d());return t.stack=t.stack||new et(m("defaultCurrentScope",()=>new K),m("defaultIsolationScope",()=>new K))}function rt(t){return nt().withScope(t)}function ot(t,e){const n=nt();return n.withScope(()=>(n.getStackTop().scope=t,e(t)))}function st(t){return nt().withScope(()=>t(nt().getIsolationScope()))}function it(t){return rt(e=>{e.setSDKProcessingMetadata({[V]:!0});const n=t();return e.setSDKProcessingMetadata({[V]:void 0}),n})}function ct(t){const e=g(t);return e.acs?e.acs:{suppressTracing:it,withIsolationScope:st,withScope:rt,withSetScope:ot,withSetIsolationScope:(t,e)=>st(e),getCurrentScope:()=>nt().getScope(),getIsolationScope:()=>nt().getIsolationScope()}}function ut(t,e=!1){const{host:n,path:r,pass:o,port:s,projectId:i,protocol:c,publicKey:u}=t;return`${c}://${u}${e&&o?`:${o}`:""}@${n}${s?`:${s}`:""}/${r?`${r}/`:r}${i}`}function at(t,e){const{fingerprint:n,breadcrumbs:r,sdkProcessingMetadata:o}=e;!function(t,e){const{extra:n,tags:r,user:o,contexts:s,level:i,transactionName:c}=e;Object.keys(n).length&&(t.extra={...n,...t.extra});Object.keys(r).length&&(t.tags={...r,...t.tags});Object.keys(o).length&&(t.user={...o,...t.user});Object.keys(s).length&&(t.contexts={...s,...t.contexts});i&&(t.level=i);c&&"transaction"!==t.type&&(t.transaction=c)}(t,e),function(t,e){t.fingerprint=t.fingerprint?Array.isArray(t.fingerprint)?t.fingerprint:[t.fingerprint]:[],e&&(t.fingerprint=t.fingerprint.concat(e));t.fingerprint.length||delete t.fingerprint}(t,n),function(t,e){const n=[...t.breadcrumbs||[],...e];t.breadcrumbs=n.length?n:void 0}(t,r),function(t,e){t.sdkProcessingMetadata={...t.sdkProcessingMetadata,...e}}(t,o)}function ft(t,e=[]){return[t,e]}function ht(t,e){const n=t[1];for(const t of n){if(e(t,t[0].type))return!0}return!1}function pt(t){const e=g(p);return e.encodePolyfill?e.encodePolyfill(t):(new TextEncoder).encode(t)}function lt(t){const[e,n]=t;let r=JSON.stringify(e);function o(t){"string"==typeof r?r="string"==typeof t?r+t:[pt(r),t]:r.push("string"==typeof t?pt(t):t)}for(const t of n){const[e,n]=t;if(o(`\n${JSON.stringify(e)}\n`),"string"==typeof n||n instanceof Uint8Array)o(n);else{let t;try{t=JSON.stringify(n)}catch{t=JSON.stringify(B(n))}o(t)}}return"string"==typeof r?r:function(t){const e=t.reduce((t,e)=>t+e.length,0),n=new Uint8Array(e);let r=0;for(const e of t)n.set(e,r),r+=e.length;return n}(r)}const dt={sessions:"session",event:"error",client_report:"internal",user_report:"default",profile_chunk:"profile",replay_event:"replay",replay_recording:"replay",check_in:"monitor",raw_security:"security",log:"log_item",trace_metric:"metric"};function gt(t){return function(t){return t in dt}(t)?dt[t]:t}function mt(t){if(!t?.sdk)return;const{name:e,version:n}=t.sdk;return{name:e,version:n}}function yt(t){const e=ct(d());return e.suppressTracing?e.suppressTracing(t):function(...t){const e=ct(d());if(2===t.length){const[n,r]=t;return n?e.withSetScope(n,r):e.withScope(r)}return e.withScope(t[0])}(e=>(e.setSDKProcessingMetadata({[V]:!0}),t()))}function bt(t,e,n,r){const o=mt(n),s=t.type&&"replay_event"!==t.type?t.type:"event";!function(t,e){if(!e)return t;const n=t.sdk||{};t.sdk={...n,name:n.name||e.name,version:n.version||e.version,integrations:[...t.sdk?.integrations||[],...e.integrations||[]],packages:[...t.sdk?.packages||[],...e.packages||[]],settings:t.sdk?.settings||e.settings?{...t.sdk?.settings,...e.settings}:void 0}}(t,n?.sdk);const i=function(t,e,n,r){const o=t.sdkProcessingMetadata?.dynamicSamplingContext;return{event_id:t.event_id,sent_at:new Date(I()).toISOString(),...e&&{sdk:e},...!!n&&r&&{dsn:ut(r)},...o&&{trace:o}}}(t,o,r,e);delete t.sdkProcessingMetadata;return ft(i,[[{type:s},t]])}class vt{constructor(t){this.L=0,this.M=[],this.J(t)}then(t,e){return new vt((n,r)=>{this.M.push([!1,e=>{if(t)try{n(t(e))}catch(t){r(t)}else n(e)},t=>{if(e)try{n(e(t))}catch(t){r(t)}else r(t)}]),this.W()})}catch(t){return this.then(t=>t,t)}finally(t){return new vt((e,n)=>{let r,o;return this.then(e=>{o=!1,r=e,t&&t()},e=>{o=!0,r=e,t&&t()}).then(()=>{o?n(r):e(r)})})}W(){if(0===this.L)return;const t=this.M.slice();this.M=[],t.forEach(t=>{t[0]||(1===this.L&&t[1](this.F),2===this.L&&t[2](this.F),t[0]=!0)})}J(t){const e=(t,e)=>{0===this.L&&(C(e)?e.then(n,r):(this.L=t,this.F=e,this.W()))},n=t=>{e(1,t)},r=t=>{e(2,t)};try{t(n,r)}catch(t){r(t)}}}const wt=Symbol.for("SentryBufferFullError");function St(t=100){const e=new Set;function n(t){e.delete(t)}return{get $(){return Array.from(e)},add:function(r){if(!(e.size<t))return o=wt,new vt((t,e)=>{e(o)});var o;const s=r();return e.add(s),s.then(()=>n(s),()=>n(s)),s},drain:function(t){if(!e.size)return n=!0,new vt(t=>{t(n)});var n;const r=Promise.allSettled(Array.from(e)).then(()=>!0);if(!t)return r;const o=[r,new Promise(e=>{return"object"==typeof(n=setTimeout(()=>e(!1),t))&&"function"==typeof n.unref&&n.unref(),n;var n})];return Promise.race(o)}}}function _t(t,{statusCode:e,headers:n},r=I()){const o={...t},s=n?.["x-sentry-rate-limits"],i=n?.["retry-after"];if(s)for(const t of s.trim().split(",")){const[e,n,,,s]=t.split(":",5),i=parseInt(e,10),c=1e3*(isNaN(i)?60:i);if(n)for(const t of n.split(";"))"metric_bucket"===t&&s&&!s.split(";").includes("custom")||(o[t]=r+c);else o.all=r+c}else i?o.all=r+function(t,e=I()){const n=parseInt(`${t}`,10);if(!isNaN(n))return 1e3*n;const r=Date.parse(`${t}`);return isNaN(r)?6e4:r-e}(i,r):429===e&&(o.all=r+6e4);return o}function $t(t,e,n=St(t.bufferSize||64)){let r={};return{send:function(t){const o=[];if(ht(t,(t,e)=>{const n=gt(e);(function(t,e,n=I()){return function(t,e){return t[e]||t.all||0}(t,e)>n})(r,n)||o.push(t)}),0===o.length)return Promise.resolve({});const s=ft(t[0],o),i=t=>{!function(t,e){return ht(t,(t,n)=>e.includes(n))}(s,["client_report"])?ht(s,(t,e)=>{}):h&&_.warn(`Dropping client report. Will not send outcomes (reason: ${t}).`)};return n.add(()=>e({body:lt(s)}).then(t=>413===t.statusCode?(h&&_.error("Sentry responded with status code 413. Envelope was discarded due to exceeding size limits."),i("send_error"),t):(h&&void 0!==t.statusCode&&(t.statusCode<200||t.statusCode>=300)&&_.warn(`Sentry responded with status code ${t.statusCode} to sent event.`),r=_t(r,t),t),t=>{throw i("network_error"),h&&_.error("Encountered error running transport request:",t),t})).then(t=>t,t=>{if(t===wt)return h&&_.error("Skipped sending event because buffer is full."),i("queue_overflow"),Promise.resolve({});throw t})},flush:t=>n.drain(t)}}const Et=/^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;function xt(t){const e=function(t){const e=t.length>1024?`<truncated>${t.slice(-1024)}`:t,n=Et.exec(e);return n?n.slice(1):[]}(t),n=e[0]||"";let r=e[1];return n||r?(r&&(r=r.slice(0,r.length-1)),n+r):"."}function Nt(t,e=!1){return!(e||t&&!t.startsWith("/")&&!t.match(/^[A-Z]:/)&&!t.startsWith(".")&&!t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//))&&void 0!==t&&!t.includes("node_modules/")}var jt;const Ct=Symbol("AgentBaseInternalState");class Ot extends(jt=s.Agent,jt){constructor(t){super(t),this[Ct]={}}isSecureEndpoint(t){if(t){if("boolean"==typeof t.secureEndpoint)return t.secureEndpoint;if("string"==typeof t.protocol)return"https:"===t.protocol}const{stack:e}=new Error;return"string"==typeof e&&e.split("\n").some(t=>-1!==t.indexOf("(https.js:")||-1!==t.indexOf("node:https:"))}createSocket(t,e,n){const r={...e,secureEndpoint:this.isSecureEndpoint(e)};Promise.resolve().then(()=>this.connect(t,r)).then(o=>{if(o instanceof s.Agent)return o.addRequest(t,r);this[Ct].currentSocket=o,super.createSocket(t,e,n)},n)}createConnection(){const t=this[Ct].currentSocket;if(this[Ct].currentSocket=void 0,!t)throw new Error("No socket was returned in the `connect()` function");return t}get defaultPort(){return this[Ct].defaultPort??("https:"===this.protocol?443:80)}set defaultPort(t){this[Ct]&&(this[Ct].defaultPort=t)}get protocol(){return this[Ct].protocol??(this.isSecureEndpoint()?"https:":"http:")}set protocol(t){this[Ct]&&(this[Ct].protocol=t)}}function Pt(...t){_.log("[https-proxy-agent:parse-proxy-response]",...t)}function At(t){return new Promise((e,n)=>{let r=0;const o=[];function s(){const c=t.read();c?function(c){o.push(c),r+=c.length;const u=Buffer.concat(o,r),a=u.indexOf("\r\n\r\n");if(-1===a)return Pt("have not received end of HTTP headers yet..."),void s();const f=u.subarray(0,a).toString("ascii").split("\r\n"),h=f.shift();if(!h)return t.destroy(),n(new Error("No header received from proxy CONNECT response"));const p=h.split(" "),l=+(p[1]||0),d=p.slice(2).join(" "),g={};for(const e of f){if(!e)continue;const r=e.indexOf(":");if(-1===r)return t.destroy(),n(new Error(`Invalid header from proxy CONNECT response: "${e}"`));const o=e.slice(0,r).toLowerCase(),s=e.slice(r+1).trimStart(),i=g[o];"string"==typeof i?g[o]=[i,s]:Array.isArray(i)?i.push(s):g[o]=s}Pt("got proxy server response: %o %o",h,g),i(),e({connect:{statusCode:l,statusText:d,headers:g},buffered:u})}(c):t.once("readable",s)}function i(){t.removeListener("end",c),t.removeListener("error",u),t.removeListener("readable",s)}function c(){i(),Pt("onend"),n(new Error("Proxy connection ended before receiving CONNECT response"))}function u(t){i(),Pt("onerror %o",t),n(t)}t.on("error",u),t.on("end",c),s()})}function kt(...t){_.log("[https-proxy-agent]",...t)}class Tt extends Ot{constructor(t,e){super(e),this.options={},this.proxy="string"==typeof t?new URL(t):t,this.proxyHeaders=e?.headers??{},kt("Creating new HttpsProxyAgent instance: %o",this.proxy.href);const n=(this.proxy.hostname||this.proxy.host).replace(/^\[|\]$/g,""),r=this.proxy.port?parseInt(this.proxy.port,10):"https:"===this.proxy.protocol?443:80;this.connectOpts={ALPNProtocols:["http/1.1"],...e?It(e,"headers"):null,host:n,port:r}}async connect(t,e){const{proxy:n}=this;if(!e.host)throw new TypeError('No "host" provided');let r;if("https:"===n.protocol){kt("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 kt("Creating `net.Socket`: %o",this.connectOpts),r=a.connect(this.connectOpts);const o="function"==typeof this.proxyHeaders?this.proxyHeaders():{...this.proxyHeaders},s=a.isIPv6(e.host)?`[${e.host}]`:e.host;let i=`CONNECT ${s}:${e.port} HTTP/1.1\r\n`;if(n.username||n.password){const t=`${decodeURIComponent(n.username)}:${decodeURIComponent(n.password)}`;o["Proxy-Authorization"]=`Basic ${Buffer.from(t).toString("base64")}`}o.Host=`${s}:${e.port}`,o["Proxy-Connection"]||(o["Proxy-Connection"]=this.keepAlive?"Keep-Alive":"close");for(const t of Object.keys(o))i+=`${t}: ${o[t]}\r\n`;const c=At(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",Rt),e.secureEndpoint){kt("Upgrading socket connection to TLS");const t=e.servername||e.host;return f.connect({...It(e,"host","path","port"),socket:r,servername:a.isIP(t)?void 0:t})}return r}r.destroy();const p=new a.Socket({writable:!1});return p.readable=!0,t.once("socket",t=>{kt("Replaying proxy buffer for failed request"),t.push(h),t.push(null)}),p}}function Rt(t){t.resume()}function It(t,...e){const n={};let r;for(r in t)e.includes(r)||(n[r]=t[r]);return n}Tt.protocols=["http","https"];function Dt(t){return t.replace(/^[A-Z]:/,"").replace(/\\/g,"/")}const Ut=e;let Bt,Lt=0,Mt={};function zt(t){Ut.debug&&console.log(`[ANR Worker] ${t}`)}var Jt,Wt,Ft;const Gt=function(t){let e;try{e=new URL(t.url)}catch{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.")}),$t(t,()=>Promise.resolve({}))}const n="https:"===e.protocol,r=function(t,e){const{no_proxy:n}=process.env,r=n?.split(",").some(e=>t.host.endsWith(e)||t.hostname.endsWith(e));return r?void 0:e}(e,t.proxy||(n?process.env.https_proxy:void 0)||process.env.http_proxy),o=n?i:s,a=void 0!==t.keepAlive&&t.keepAlive,f=r?new Tt(r):new o.Agent({keepAlive:a,maxSockets:30,timeout:2e3}),h=function(t,e,n){const{hostname:r,pathname:o,port:s,protocol:i,search:a}=new URL(t.url);return function(f){return new Promise((h,p)=>{yt(()=>{let l=function(t){return new c({read(){this.push(t),this.push(null)}})}(f.body);const d={...t.headers};f.body.length>32768&&(d["content-encoding"]="gzip",l=l.pipe(u()));const g=r.startsWith("["),m=e.request({method:"POST",agent:n,headers:d,hostname:g?r.slice(1,-1):r,path:`${o}${a}`,port:s,protocol:i,ca:t.caCerts},t=>{t.on("data",()=>{}),t.on("end",()=>{}),t.setEncoding("utf8");const e=t.headers["retry-after"]??null,n=t.headers["x-sentry-rate-limits"]??null;h({statusCode:t.statusCode,headers:{"retry-after":e,"x-sentry-rate-limits":Array.isArray(n)?n[0]||null:n}})});m.on("error",p),l.pipe(m)})})}}(t,t.httpModule??o,f);return $t(t,h)}({url:(Jt=Ut.dsn,Wt=Ut.tunnel,Ft=Ut.sdkMetadata.sdk,Wt||`${function(t){return`${function(t){const e=t.protocol?`${t.protocol}:`:"",n=t.port?`:${t.port}`:"";return`${e}//${t.host}${n}${t.path?`/${t.path}`:""}/api/`}(t)}${t.projectId}/envelope/`}(Jt)}?${function(t,e){const n={sentry_version:"7"};return t.publicKey&&(n.sentry_key=t.publicKey),e&&(n.sentry_client=`${e.name}/${e.version}`),new URLSearchParams(n).toString()}(Jt,Ft)}`)});async function Yt(){if(Bt){zt("Sending abnormal session"),Z(Bt,{status:"abnormal",abnormal_mechanism:"anr_foreground",release:Ut.release,environment:Ut.environment});const t=function(t,e,n,r){const o=mt(n);return ft({sent_at:new Date(I()).toISOString(),...o&&{sdk:o},...!!r&&e&&{dsn:ut(e)}},["aggregates"in t?[{type:"sessions"},t]:[{type:"session"},t.toJSON()]])}(Bt,Ut.dsn,Ut.sdkMetadata,Ut.tunnel);zt(JSON.stringify(t)),await Gt.send(t);try{n?.postMessage("session-ended")}catch{}}}function Ht(t){if(!t)return;const e=function(t){if(!t.length)return[];const e=Array.from(t);return/sentryWrapped/.test(E(e).function||"")&&e.pop(),e.reverse(),$.test(E(e).function||"")&&(e.pop(),$.test(E(e).function||"")&&e.pop()),e.slice(0,50).map(t=>({...t,filename:t.filename||E(e).filename,function:t.function||"?"}))}(t);if(Ut.appRootPath)for(const t of e)t.filename&&(t.filename=M(t.filename,Ut.appRootPath));return e}async function Zt(t,e){if(Lt>=Ut.maxAnrEvents)return;Lt+=1,await Yt(),zt("Sending event");const n={event_id:W(),contexts:Ut.contexts,release:Ut.release,environment:Ut.environment,dist:Ut.dist,platform:"node",level:"error",exception:{values:[{type:"ApplicationNotResponding",value:`Application Not Responding for at least ${Ut.anrThreshold} ms`,stacktrace:{frames:Ht(t)},mechanism:{type:"ANR"}}]},tags:Ut.staticTags};e&&function(t,e){if(at(t,e),!t.contexts?.trace){const{traceId:n,parentSpanId:r,propagationSpanId:o}=e.propagationContext;t.contexts={trace:{trace_id:n,span_id:o||W().substring(16),parent_span_id:r},...t.contexts}}}(n,e),function(t){if(0===Object.keys(Mt).length)return;const e=Ut.appRootPath?{}:Mt;if(Ut.appRootPath)for(const[t,n]of Object.entries(Mt))e[M(t,Ut.appRootPath)]=n;const n=new Map;for(const r of t.exception?.values||[])for(const t of r.stacktrace?.frames||[]){const r=t.abs_path||t.filename;r&&e[r]&&n.set(r,e[r])}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}}}(n);const r=bt(n,Ut.dsn,Ut.sdkMetadata,Ut.tunnel);zt(JSON.stringify(r)),await Gt.send(r),await Gt.flush(2e3),Lt>=Ut.maxAnrEvents&&setTimeout(()=>{process.exit(0)},5e3)}let qt;if(zt("Started"),Ut.captureStackTrace){zt("Connecting to debugger");const e=new t;e.connectToMainThread(),zt("Connected to debugger");const n=new Map;e.on("Debugger.scriptParsed",t=>{n.set(t.params.scriptId,t.params.url)}),e.on("Debugger.paused",t=>{if("other"===t.params.reason)try{zt("Debugger paused");const s=[...t.params.callFrames],i=Ut.appRootPath?function(t=(process.argv[1]?xt(process.argv[1]):process.cwd()),e="\\"===o){const n=e?Dt(t):t;return t=>{if(!t)return;const o=e?Dt(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));const u=decodeURIComponent(i);s||(s=".");const a=s.lastIndexOf("/node_modules");if(a>-1)return`${s.slice(a+14).replace(/\//g,".")}:${u}`;if(s.startsWith(n)){const t=s.slice(n.length+1).replace(/\//g,".");return t?`${t}:${u}`:u}return u}}(Ut.appRootPath):()=>{},c=s.map(t=>function(t,e,n){const r=e?e.replace(/^file:\/\//,""):void 0,o=t.location.columnNumber?t.location.columnNumber+1:void 0,s=t.location.lineNumber?t.location.lineNumber+1:void 0;return{filename:r,module:n(r),function:t.functionName||"?",colno:o,lineno:s,in_app:r?Nt(r):void 0}}(t,n.get(t.location.scriptId),i)),u=setTimeout(()=>{Zt(c).then(null,()=>{zt("Sending ANR event failed.")})},5e3);e.post("Runtime.evaluate",{expression:"global.__SENTRY_GET_SCOPES__();",silent:!0,returnByValue:!0},(t,n)=>{t&&zt(`Error executing script: '${t.message}'`),clearTimeout(u);const r=n?.result?n.result.value:void 0;e.post("Debugger.resume"),e.post("Debugger.disable"),Zt(c,r).then(null,()=>{zt("Sending ANR event failed.")})})}catch(t){throw e.post("Debugger.resume"),e.post("Debugger.disable"),t}}),qt=()=>{try{e.post("Debugger.enable",()=>{e.post("Debugger.pause")})}catch{}}}const{poll:Kt}=function(t,e,n,r){const o=t();let s=!1,i=!0;return setInterval(()=>{const t=o.getTimeMs();!1===s&&t>e+n&&(s=!0,i&&r()),t<e+n&&(s=!1)},20),{poll:()=>{o.reset()},enabled:t=>{i=t}}}(function(){let t=process.hrtime();return{getTimeMs:()=>{const[e,n]=process.hrtime(t);return Math.floor(1e3*e+n/1e6)},reset:()=>{t=process.hrtime()}}},Ut.pollInterval,Ut.anrThreshold,function(){zt("Watchdog timeout"),qt?(zt("Pausing debugger to capture stack trace"),qt()):(zt("Capturing event without a stack trace"),Zt().then(null,()=>{zt("Sending ANR event failed on watchdog timeout.")}))});n?.on("message",t=>{t.session&&(Bt=H(t.session)),t.debugImages&&(Mt=t.debugImages),Kt()});
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import * as diagnosticsChannel from 'node:diagnostics_channel';
|
|
2
|
+
import { defineIntegration, isObjectLike, addBreadcrumb, captureException } from '@sentry/core';
|
|
3
|
+
|
|
4
|
+
const INTEGRATION_NAME = "ChildProcess";
|
|
5
|
+
const childProcessIntegration = defineIntegration((options = {}) => {
|
|
6
|
+
return {
|
|
7
|
+
name: INTEGRATION_NAME,
|
|
8
|
+
setup() {
|
|
9
|
+
diagnosticsChannel.channel("child_process").subscribe((event) => {
|
|
10
|
+
if (isObjectLike(event) && "process" in event) {
|
|
11
|
+
captureChildProcessEvents(event.process, options);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
diagnosticsChannel.channel("worker_threads").subscribe((event) => {
|
|
15
|
+
if (isObjectLike(event) && "worker" in event) {
|
|
16
|
+
captureWorkerThreadEvents(event.worker, options);
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
function captureChildProcessEvents(child, options) {
|
|
23
|
+
let hasExited = false;
|
|
24
|
+
let data;
|
|
25
|
+
child.on("spawn", () => {
|
|
26
|
+
if (child.spawnfile === "/usr/bin/sw_vers") {
|
|
27
|
+
hasExited = true;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
data = { spawnfile: child.spawnfile };
|
|
31
|
+
if (options.includeChildProcessArgs) {
|
|
32
|
+
data.spawnargs = child.spawnargs;
|
|
33
|
+
}
|
|
34
|
+
}).on("exit", (code) => {
|
|
35
|
+
if (!hasExited) {
|
|
36
|
+
hasExited = true;
|
|
37
|
+
if (code !== null && code !== 0) {
|
|
38
|
+
addBreadcrumb({
|
|
39
|
+
category: "child_process",
|
|
40
|
+
message: `Child process exited with code '${code}'`,
|
|
41
|
+
level: code === 0 ? "info" : "warning",
|
|
42
|
+
data
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}).on("error", (error) => {
|
|
47
|
+
if (!hasExited) {
|
|
48
|
+
hasExited = true;
|
|
49
|
+
addBreadcrumb({
|
|
50
|
+
category: "child_process",
|
|
51
|
+
message: `Child process errored with '${error.message}'`,
|
|
52
|
+
level: "error",
|
|
53
|
+
data
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
function captureWorkerThreadEvents(worker, options) {
|
|
59
|
+
let threadId;
|
|
60
|
+
worker.on("online", () => {
|
|
61
|
+
threadId = worker.threadId;
|
|
62
|
+
}).on("error", (error) => {
|
|
63
|
+
if (options.captureWorkerErrors !== false) {
|
|
64
|
+
captureException(error, {
|
|
65
|
+
mechanism: { type: "auto.child_process.worker_thread", handled: false, data: { threadId: String(threadId) } }
|
|
66
|
+
});
|
|
67
|
+
} else {
|
|
68
|
+
addBreadcrumb({
|
|
69
|
+
category: "worker_thread",
|
|
70
|
+
message: `Worker thread errored with '${error.message}'`,
|
|
71
|
+
level: "error",
|
|
72
|
+
data: { threadId }
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export { childProcessIntegration };
|
|
79
|
+
//# sourceMappingURL=childProcess.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"childProcess.js","sources":["../../../src/integrations/childProcess.ts"],"sourcesContent":["import type { ChildProcess } from 'node:child_process';\nimport * as diagnosticsChannel from 'node:diagnostics_channel';\nimport type { Worker } from 'node:worker_threads';\nimport { addBreadcrumb, captureException, defineIntegration, isObjectLike } from '@sentry/core';\n\ninterface Options {\n /**\n * Whether to include child process arguments in breadcrumbs data.\n *\n * @default false\n */\n includeChildProcessArgs?: boolean;\n\n /**\n * Whether to capture errors from worker threads.\n *\n * @default true\n */\n captureWorkerErrors?: boolean;\n}\n\nconst INTEGRATION_NAME = 'ChildProcess' as const;\n\n/**\n * Capture breadcrumbs and events for child processes and worker threads.\n */\nexport const childProcessIntegration = defineIntegration((options: Options = {}) => {\n return {\n name: INTEGRATION_NAME,\n setup() {\n diagnosticsChannel.channel('child_process').subscribe((event: unknown) => {\n if (isObjectLike(event) && 'process' in event) {\n captureChildProcessEvents(event.process as ChildProcess, options);\n }\n });\n\n diagnosticsChannel.channel('worker_threads').subscribe((event: unknown) => {\n if (isObjectLike(event) && 'worker' in event) {\n captureWorkerThreadEvents(event.worker as Worker, options);\n }\n });\n },\n };\n});\n\nfunction captureChildProcessEvents(child: ChildProcess, options: Options): void {\n let hasExited = false;\n let data: Record<string, unknown> | undefined;\n\n child\n .on('spawn', () => {\n // This is Sentry getting macOS OS context\n if (child.spawnfile === '/usr/bin/sw_vers') {\n hasExited = true;\n return;\n }\n\n data = { spawnfile: child.spawnfile };\n if (options.includeChildProcessArgs) {\n data.spawnargs = child.spawnargs;\n }\n })\n .on('exit', code => {\n if (!hasExited) {\n hasExited = true;\n\n // Only log for non-zero exit codes\n if (code !== null && code !== 0) {\n addBreadcrumb({\n category: 'child_process',\n message: `Child process exited with code '${code}'`,\n level: code === 0 ? 'info' : 'warning',\n data,\n });\n }\n }\n })\n .on('error', error => {\n if (!hasExited) {\n hasExited = true;\n\n addBreadcrumb({\n category: 'child_process',\n message: `Child process errored with '${error.message}'`,\n level: 'error',\n data,\n });\n }\n });\n}\n\nfunction captureWorkerThreadEvents(worker: Worker, options: Options): void {\n let threadId: number | undefined;\n\n worker\n .on('online', () => {\n threadId = worker.threadId;\n })\n .on('error', error => {\n if (options.captureWorkerErrors !== false) {\n captureException(error, {\n mechanism: { type: 'auto.child_process.worker_thread', handled: false, data: { threadId: String(threadId) } },\n });\n } else {\n addBreadcrumb({\n category: 'worker_thread',\n message: `Worker thread errored with '${error.message}'`,\n level: 'error',\n data: { threadId },\n });\n }\n });\n}\n"],"names":[],"mappings":";;;AAqBA,MAAM,gBAAA,GAAmB,cAAA;AAKlB,MAAM,uBAAA,GAA0B,iBAAA,CAAkB,CAAC,OAAA,GAAmB,EAAC,KAAM;AAClF,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,KAAA,GAAQ;AACN,MAAA,kBAAA,CAAmB,OAAA,CAAQ,eAAe,CAAA,CAAE,SAAA,CAAU,CAAC,KAAA,KAAmB;AACxE,QAAA,IAAI,YAAA,CAAa,KAAK,CAAA,IAAK,SAAA,IAAa,KAAA,EAAO;AAC7C,UAAA,yBAAA,CAA0B,KAAA,CAAM,SAAyB,OAAO,CAAA;AAAA,QAClE;AAAA,MACF,CAAC,CAAA;AAED,MAAA,kBAAA,CAAmB,OAAA,CAAQ,gBAAgB,CAAA,CAAE,SAAA,CAAU,CAAC,KAAA,KAAmB;AACzE,QAAA,IAAI,YAAA,CAAa,KAAK,CAAA,IAAK,QAAA,IAAY,KAAA,EAAO;AAC5C,UAAA,yBAAA,CAA0B,KAAA,CAAM,QAAkB,OAAO,CAAA;AAAA,QAC3D;AAAA,MACF,CAAC,CAAA;AAAA,IACH;AAAA,GACF;AACF,CAAC;AAED,SAAS,yBAAA,CAA0B,OAAqB,OAAA,EAAwB;AAC9E,EAAA,IAAI,SAAA,GAAY,KAAA;AAChB,EAAA,IAAI,IAAA;AAEJ,EAAA,KAAA,CACG,EAAA,CAAG,SAAS,MAAM;AAEjB,IAAA,IAAI,KAAA,CAAM,cAAc,kBAAA,EAAoB;AAC1C,MAAA,SAAA,GAAY,IAAA;AACZ,MAAA;AAAA,IACF;AAEA,IAAA,IAAA,GAAO,EAAE,SAAA,EAAW,KAAA,CAAM,SAAA,EAAU;AACpC,IAAA,IAAI,QAAQ,uBAAA,EAAyB;AACnC,MAAA,IAA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AS,KAAA,EAAO,IAAA,EAAM,EAAE,QAAA,EAAU,MAAA,CAAO,QAAQ,CAAA,EAAE;AAAE,OAC7G,CAAA;AAAA,IACH,CAAA,MAAO;AACL,MAAA,aAAA,CAAc;AAAA,QACZ,QAAA,EAAU,eAAA;AAAA,QACV,OAAA,EAAS,CAAA,4BAAA,EAA+B,KAAA,CAAM,OAAO,CAAA,CAAA,CAAA;AAAA,QACrD,KAAA,EAAO,OAAA;AAAA,QACP,IAAA,EAAM,EAAE,QAAA;AAAS,OAClB,CAAA;AAAA,IACH;AAAA,EACF,CAAC,CAAA;AACL;;;;"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { defineIntegration, maybeInstrument, consoleIntegration as consoleIntegration$1, GLOBAL_OBJ, CONSOLE_LEVELS, originalConsoleMethods, markFunctionWrapped, fill, triggerHandlers } from '@sentry/core';
|
|
2
|
+
|
|
3
|
+
const consoleIntegration = defineIntegration((options = {}) => {
|
|
4
|
+
return {
|
|
5
|
+
name: "Console",
|
|
6
|
+
setup(client) {
|
|
7
|
+
if (process.env.LAMBDA_TASK_ROOT) {
|
|
8
|
+
maybeInstrument("console", instrumentConsoleLambda);
|
|
9
|
+
}
|
|
10
|
+
const core = consoleIntegration$1({
|
|
11
|
+
...options,
|
|
12
|
+
filter: [
|
|
13
|
+
...options.filter || [],
|
|
14
|
+
// Deprecation on Node 26 for module.require(), which is used by IITM
|
|
15
|
+
"[DEP0205] DeprecationWarning"
|
|
16
|
+
]
|
|
17
|
+
});
|
|
18
|
+
core.setup?.(client);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
function instrumentConsoleLambda() {
|
|
23
|
+
const consoleObj = GLOBAL_OBJ?.console;
|
|
24
|
+
if (!consoleObj) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
CONSOLE_LEVELS.forEach((level) => {
|
|
28
|
+
if (level in consoleObj) {
|
|
29
|
+
patchWithDefineProperty(consoleObj, level);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function patchWithDefineProperty(consoleObj, level) {
|
|
34
|
+
const nativeMethod = consoleObj[level];
|
|
35
|
+
originalConsoleMethods[level] = nativeMethod;
|
|
36
|
+
let delegate = nativeMethod;
|
|
37
|
+
let savedDelegate;
|
|
38
|
+
let isExecuting = false;
|
|
39
|
+
const wrapper = function(...args) {
|
|
40
|
+
if (isExecuting) {
|
|
41
|
+
nativeMethod.apply(consoleObj, args);
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
isExecuting = true;
|
|
45
|
+
try {
|
|
46
|
+
triggerHandlers("console", { args, level });
|
|
47
|
+
delegate.apply(consoleObj, args);
|
|
48
|
+
} finally {
|
|
49
|
+
isExecuting = false;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
markFunctionWrapped(wrapper, nativeMethod);
|
|
53
|
+
const sandboxBypass = nativeMethod.bind(consoleObj);
|
|
54
|
+
originalConsoleMethods[level] = sandboxBypass;
|
|
55
|
+
try {
|
|
56
|
+
let current = wrapper;
|
|
57
|
+
Object.defineProperty(consoleObj, level, {
|
|
58
|
+
configurable: true,
|
|
59
|
+
enumerable: true,
|
|
60
|
+
get() {
|
|
61
|
+
return current;
|
|
62
|
+
},
|
|
63
|
+
set(newValue) {
|
|
64
|
+
if (newValue === wrapper) {
|
|
65
|
+
if (savedDelegate !== void 0) {
|
|
66
|
+
delegate = savedDelegate;
|
|
67
|
+
savedDelegate = void 0;
|
|
68
|
+
}
|
|
69
|
+
current = wrapper;
|
|
70
|
+
} else if (newValue === sandboxBypass) {
|
|
71
|
+
savedDelegate = delegate;
|
|
72
|
+
current = sandboxBypass;
|
|
73
|
+
} else if (typeof newValue === "function" && !newValue.__sentry_original__) {
|
|
74
|
+
delegate = newValue;
|
|
75
|
+
current = wrapper;
|
|
76
|
+
} else {
|
|
77
|
+
current = newValue;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
});
|
|
81
|
+
} catch {
|
|
82
|
+
fill(consoleObj, level, function(originalConsoleMethod) {
|
|
83
|
+
originalConsoleMethods[level] = originalConsoleMethod;
|
|
84
|
+
return function(...args) {
|
|
85
|
+
triggerHandlers("console", { args, level });
|
|
86
|
+
originalConsoleMethods[level]?.apply(this, args);
|
|
87
|
+
};
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export { consoleIntegration };
|
|
93
|
+
//# sourceMappingURL=console.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"console.js","sources":["../../../src/integrations/console.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { ConsoleLevel, WrappedFunction } from '@sentry/core';\nimport {\n CONSOLE_LEVELS,\n GLOBAL_OBJ,\n consoleIntegration as coreConsoleIntegration,\n defineIntegration,\n fill,\n markFunctionWrapped,\n maybeInstrument,\n originalConsoleMethods,\n triggerHandlers,\n} from '@sentry/core';\n\ninterface ConsoleIntegrationOptions {\n levels: ConsoleLevel[];\n /**\n * Filter out console messages that match the given strings or regular expressions.\n * These will neither be passed to the handler, and they will also not be logged to the user, unless they have debug enabled.\n */\n filter?: (string | RegExp)[];\n}\n\n/**\n * Node-specific console integration that captures breadcrumbs and handles\n * the AWS Lambda runtime replacing console methods after our patch.\n *\n * In Lambda, console methods are patched via `Object.defineProperty` so that\n * external replacements (by the Lambda runtime) are absorbed as the delegate\n * while our wrapper stays in place. Outside Lambda, this delegates entirely\n * to the core `consoleIntegration` which uses the simpler `fill`-based patch.\n */\nexport const consoleIntegration = defineIntegration((options: Partial<ConsoleIntegrationOptions> = {}) => {\n return {\n name: 'Console' as const,\n setup(client) {\n if (process.env.LAMBDA_TASK_ROOT) {\n maybeInstrument('console', instrumentConsoleLambda);\n }\n\n // Delegate breadcrumb handling to the core console integration.\n const core = coreConsoleIntegration({\n ...options,\n filter: [\n ...(options.filter || []),\n // Deprecation on Node 26 for module.require(), which is used by IITM\n '[DEP0205] DeprecationWarning',\n ],\n });\n core.setup?.(client);\n },\n };\n});\n\n/**\n * NOTE: This currently ignores the filter option.\n * We can revisit this later.\n */\nfunction instrumentConsoleLambda(): void {\n const consoleObj = GLOBAL_OBJ?.console;\n if (!consoleObj) {\n return;\n }\n\n CONSOLE_LEVELS.forEach((level: ConsoleLevel) => {\n if (level in consoleObj) {\n patchWithDefineProperty(consoleObj, level);\n }\n });\n}\n\nfunction patchWithDefineProperty(consoleObj: Console, level: ConsoleLevel): void {\n const nativeMethod = consoleObj[level] as (...args: unknown[]) => void;\n originalConsoleMethods[level] = nativeMethod;\n\n let delegate: Function = nativeMethod;\n let savedDelegate: Function | undefined;\n let isExecuting = false;\n\n const wrapper = function (...args: any[]): void {\n if (isExecuting) {\n // Re-entrant call: a third party captured `wrapper` via the getter and calls it from inside their replacement. We must\n // use `nativeMethod` (not `delegate`) to break the cycle, and we intentionally skip `triggerHandlers` to avoid duplicate\n // breadcrumbs. The outer invocation already triggered the handlers for this console call.\n nativeMethod.apply(consoleObj, args);\n return;\n }\n isExecuting = true;\n try {\n triggerHandlers('console', { args, level });\n delegate.apply(consoleObj, args);\n } finally {\n isExecuting = false;\n }\n };\n markFunctionWrapped(wrapper, nativeMethod);\n\n // consoleSandbox reads originalConsoleMethods[level] to temporarily bypass instrumentation. We replace it with a distinct reference (.bind creates a\n // new function identity) so the setter can tell apart \"consoleSandbox bypass\" from \"external code restoring a native method captured before Sentry init.\"\n const sandboxBypass = nativeMethod.bind(consoleObj);\n originalConsoleMethods[level] = sandboxBypass;\n\n try {\n let current: any = wrapper;\n\n Object.defineProperty(consoleObj, level, {\n configurable: true,\n enumerable: true,\n get() {\n return current;\n },\n set(newValue) {\n if (newValue === wrapper) {\n // consoleSandbox restoring the wrapper: recover the saved delegate.\n if (savedDelegate !== undefined) {\n delegate = savedDelegate;\n savedDelegate = undefined;\n }\n current = wrapper;\n } else if (newValue === sandboxBypass) {\n // consoleSandbox entering bypass: save delegate, let getter return sandboxBypass directly so calls skip the wrapper entirely.\n savedDelegate = delegate;\n current = sandboxBypass;\n } else if (typeof newValue === 'function' && !(newValue as WrappedFunction).__sentry_original__) {\n delegate = newValue;\n current = wrapper;\n } else {\n current = newValue;\n }\n },\n });\n } catch {\n // Fall back to fill-based patching if defineProperty fails\n fill(consoleObj, level, function (originalConsoleMethod: () => any): Function {\n originalConsoleMethods[level] = originalConsoleMethod;\n\n return function (this: Console, ...args: any[]): void {\n triggerHandlers('console', { args, level });\n originalConsoleMethods[level]?.apply(this, args);\n };\n });\n }\n}\n"],"names":["coreConsoleIntegration"],"mappings":";;AAgCO,MAAM,kBAAA,GAAqB,iBAAA,CAAkB,CAAC,OAAA,GAA8C,EAAC,KAAM;AACxG,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,SAAA;AAAA,IACN,MAAM,MAAA,EAAQ;AACZ,MAAA,IAAI,OAAA,CAAQ,IAAI,gBAAA,EAAkB;AAChC,QAAA,eAAA,CAAgB,WAAW,uBAAuB,CAAA;AAAA,MACpD;AAGA,MAAA,MAAM,OAAOA,oBAAA,CAAuB;AAAA,QAClC,GAAG,OAAA;AAAA,QACH,MAAA,EAAQ;AAAA,UACN,GAAI,OAAA,CAAQ,MAAA,IAAU,EAAC;AAAA;AAAA,UAEvB;AAAA;AACF,OACD,CAAA;AACD,MAAA,IAAA,CAAK,QAAQ,MAAM,CAAA;AAAA,IACrB;AAAA,GACF;AACF,CAAC;AAMD,SAAS,uBAAA,GAAgC;AACvC,EAAA,MAAM,aAAa,UAAA,EAAY,OAAA;AAC/B,EAAA,IAAI,CAAC,UAAA,EAAY;AACf,IAAA;AAAA,EACF;AAEA,EAAA,cAAA,CAAe,OAAA,CAAQ,CAAC,KAAA,KAAwB;AAC9C,IAAA,IAAI,SAAS,UAAA,EAAY;AACvB,MAAA,uBAAA,CAAwB,YAAY,KAAK,CAAA;AAAA,IAC3C;AAAA,EACF,CAAC,CAAA;AACH;AAEA,SAAS,uBAAA,CAAwB,YAAq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