@sentry/node 10.68.0 → 11.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/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 +111 -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 +243 -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 +261 -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 +1 -0
- 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 +185 -41
- package/build/cjs/sdk/index.js.map +1 -1
- package/build/cjs/sdk/initOtel.js +14 -91
- 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 +240 -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 +259 -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 +2 -1
- 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 +187 -42
- package/build/esm/sdk/index.js.map +1 -1
- package/build/esm/sdk/initOtel.js +15 -91
- 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 +35 -35
- 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 +11 -20
- 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 +35 -23
- 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 +37 -31
- 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,240 @@
|
|
|
1
|
+
import { errorMonitor } from 'node:events';
|
|
2
|
+
import { NET_TRANSPORT, HTTP_FLAVOR, HTTP_SCHEME, HTTP_USER_AGENT, HTTP_CLIENT_IP, NET_HOST_NAME, HTTP_HOST, HTTP_TARGET, HTTP_METHOD, URL_FRAGMENT, URL_QUERY, URL_PATH, URL_FULL, SENTRY_HTTP_PREFETCH, SENTRY_KIND, NET_HOST_IP, NET_HOST_PORT, NET_PEER_IP, NET_PEER_PORT, HTTP_STATUS_CODE, HTTP_RESPONSE_STATUS_CODE } from '@sentry/conventions/attributes';
|
|
3
|
+
import { debug, parseStringToURLObject, stripUrlQueryAndFragment, getUrlQuery, getUrlFragment, startInactiveSpan, httpHeadersToSpanAttributes, filterCollectedUrl, filterCollectedUrlQuery, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_OP, withActiveSpan, bindScopeToEmitter, getSpanStatusFromHttpCode, SPAN_STATUS_ERROR, isTracingSuppressed } from '@sentry/core';
|
|
4
|
+
import { DEBUG_BUILD } from '../../debug-build.js';
|
|
5
|
+
import { addStartSpanCallback } from './httpServerIntegration.js';
|
|
6
|
+
|
|
7
|
+
const INTEGRATION_NAME = "Http.ServerSpans";
|
|
8
|
+
const _httpServerSpansIntegration = ((options = {}) => {
|
|
9
|
+
const ignoreStaticAssets = options.ignoreStaticAssets ?? true;
|
|
10
|
+
const ignoreIncomingRequests = options.ignoreIncomingRequests;
|
|
11
|
+
const ignoreStatusCodes = options.ignoreStatusCodes ?? [
|
|
12
|
+
[401, 404],
|
|
13
|
+
// 300 and 304 are possibly valid status codes we do not want to filter
|
|
14
|
+
[301, 303],
|
|
15
|
+
[305, 399]
|
|
16
|
+
];
|
|
17
|
+
const { onSpanCreated } = options;
|
|
18
|
+
const { requestHook, responseHook, applyCustomAttributesOnSpan } = options.instrumentation ?? {};
|
|
19
|
+
return {
|
|
20
|
+
name: INTEGRATION_NAME,
|
|
21
|
+
setup(client) {
|
|
22
|
+
if (typeof __SENTRY_TRACING__ !== "undefined" && !__SENTRY_TRACING__) {
|
|
23
|
+
return;
|
|
24
|
+
}
|
|
25
|
+
client.on("httpServerRequest", (_request, _response, normalizedRequest) => {
|
|
26
|
+
const request = _request;
|
|
27
|
+
const response = _response;
|
|
28
|
+
const startSpan = (next) => {
|
|
29
|
+
if (shouldIgnoreSpansForIncomingRequest(request, {
|
|
30
|
+
ignoreStaticAssets,
|
|
31
|
+
ignoreIncomingRequests
|
|
32
|
+
})) {
|
|
33
|
+
DEBUG_BUILD && debug.log(INTEGRATION_NAME, "Skipping span creation for incoming request", request.url);
|
|
34
|
+
return next();
|
|
35
|
+
}
|
|
36
|
+
const fullUrl = normalizedRequest.url || request.url || "/";
|
|
37
|
+
const urlObj = parseStringToURLObject(fullUrl);
|
|
38
|
+
const headers = request.headers;
|
|
39
|
+
const userAgent = headers["user-agent"];
|
|
40
|
+
const ips = headers["x-forwarded-for"];
|
|
41
|
+
const httpVersion = request.httpVersion;
|
|
42
|
+
const host = headers.host;
|
|
43
|
+
const hostname = host?.replace(/^(.*)(:[0-9]{1,5})/, "$1") || "localhost";
|
|
44
|
+
const scheme = fullUrl.startsWith("https") ? "https" : "http";
|
|
45
|
+
const method = normalizedRequest.method || request.method?.toUpperCase() || "GET";
|
|
46
|
+
const httpTargetWithoutQueryFragment = urlObj ? urlObj.pathname : stripUrlQueryAndFragment(fullUrl);
|
|
47
|
+
const bestEffortTransactionName = `${method} ${httpTargetWithoutQueryFragment}`;
|
|
48
|
+
const query = getUrlQuery(urlObj?.search);
|
|
49
|
+
const fragment = getUrlFragment(urlObj?.hash);
|
|
50
|
+
const span = startInactiveSpan({
|
|
51
|
+
name: bestEffortTransactionName,
|
|
52
|
+
attributes: {
|
|
53
|
+
// Sentry specific attributes
|
|
54
|
+
[SENTRY_KIND]: "server",
|
|
55
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: "http.server",
|
|
56
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "url",
|
|
57
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.http.otel.http",
|
|
58
|
+
[SENTRY_HTTP_PREFETCH]: isKnownPrefetchRequest(request) || void 0,
|
|
59
|
+
[URL_FULL]: filterCollectedUrl(fullUrl, client),
|
|
60
|
+
[URL_PATH]: urlObj?.pathname ?? httpTargetWithoutQueryFragment,
|
|
61
|
+
[URL_QUERY]: filterCollectedUrlQuery(query, client),
|
|
62
|
+
[URL_FRAGMENT]: fragment,
|
|
63
|
+
// Old Semantic Conventions attributes - added for compatibility with what `@opentelemetry/instrumentation-http` output before
|
|
64
|
+
/* eslint-disable typescript/no-deprecated */
|
|
65
|
+
[HTTP_METHOD]: normalizedRequest.method,
|
|
66
|
+
[HTTP_TARGET]: filterCollectedUrl(
|
|
67
|
+
urlObj ? `${urlObj.pathname}${urlObj.search}` : httpTargetWithoutQueryFragment,
|
|
68
|
+
client
|
|
69
|
+
),
|
|
70
|
+
[HTTP_HOST]: host,
|
|
71
|
+
[NET_HOST_NAME]: hostname,
|
|
72
|
+
[HTTP_CLIENT_IP]: typeof ips === "string" ? ips.split(",")[0] : void 0,
|
|
73
|
+
[HTTP_USER_AGENT]: userAgent,
|
|
74
|
+
[HTTP_SCHEME]: scheme,
|
|
75
|
+
[HTTP_FLAVOR]: httpVersion,
|
|
76
|
+
[NET_TRANSPORT]: httpVersion?.toUpperCase() === "QUIC" ? "ip_udp" : "ip_tcp",
|
|
77
|
+
/* eslint-enable typescript/no-deprecated */
|
|
78
|
+
...getRequestContentLengthAttribute(request),
|
|
79
|
+
...httpHeadersToSpanAttributes(normalizedRequest.headers || {}, client.getDataCollectionOptions())
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
requestHook?.(span, request);
|
|
83
|
+
responseHook?.(span, response);
|
|
84
|
+
applyCustomAttributesOnSpan?.(span, request, response);
|
|
85
|
+
onSpanCreated?.(span, request, response);
|
|
86
|
+
return withActiveSpan(span, () => {
|
|
87
|
+
bindScopeToEmitter(request);
|
|
88
|
+
bindScopeToEmitter(response);
|
|
89
|
+
let isEnded = false;
|
|
90
|
+
function endSpan(status) {
|
|
91
|
+
if (isEnded) {
|
|
92
|
+
return;
|
|
93
|
+
}
|
|
94
|
+
isEnded = true;
|
|
95
|
+
const newAttributes = getIncomingRequestAttributesOnResponse(request, response);
|
|
96
|
+
span.setAttributes(newAttributes);
|
|
97
|
+
span.setStatus(status);
|
|
98
|
+
span.end();
|
|
99
|
+
}
|
|
100
|
+
response.on("close", () => {
|
|
101
|
+
endSpan(getSpanStatusFromHttpCode(response.statusCode));
|
|
102
|
+
});
|
|
103
|
+
response.on(errorMonitor, () => {
|
|
104
|
+
const httpStatus = getSpanStatusFromHttpCode(response.statusCode);
|
|
105
|
+
endSpan(httpStatus.code === SPAN_STATUS_ERROR ? httpStatus : { code: SPAN_STATUS_ERROR });
|
|
106
|
+
});
|
|
107
|
+
return next();
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
addStartSpanCallback(request, startSpan);
|
|
111
|
+
});
|
|
112
|
+
},
|
|
113
|
+
processEvent(event) {
|
|
114
|
+
if (event.type === "transaction") {
|
|
115
|
+
const statusCode = event.contexts?.trace?.data?.["http.response.status_code"];
|
|
116
|
+
if (typeof statusCode === "number") {
|
|
117
|
+
if (shouldFilterStatusCode(statusCode, ignoreStatusCodes)) {
|
|
118
|
+
DEBUG_BUILD && debug.log("Dropping transaction due to status code", statusCode);
|
|
119
|
+
return null;
|
|
120
|
+
}
|
|
121
|
+
event.contexts = {
|
|
122
|
+
...event.contexts,
|
|
123
|
+
response: {
|
|
124
|
+
...event.contexts?.response,
|
|
125
|
+
status_code: statusCode
|
|
126
|
+
}
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
return event;
|
|
131
|
+
},
|
|
132
|
+
afterAllSetup(client) {
|
|
133
|
+
if (!DEBUG_BUILD) {
|
|
134
|
+
return;
|
|
135
|
+
}
|
|
136
|
+
if (client.getIntegrationByName("Http")) {
|
|
137
|
+
debug.warn(
|
|
138
|
+
"It seems that you have manually added `httpServerSpansIntegration` while `httpIntegration` is also present. Make sure to remove `httpIntegration` when adding `httpServerSpansIntegration`."
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
if (!client.getIntegrationByName("Http.Server")) {
|
|
142
|
+
debug.error(
|
|
143
|
+
"It seems that you have manually added `httpServerSpansIntegration` without adding `httpServerIntegration`. This is a requiement for spans to be created - please add the `httpServerIntegration` integration."
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
});
|
|
149
|
+
const httpServerSpansIntegration = _httpServerSpansIntegration;
|
|
150
|
+
function isKnownPrefetchRequest(req) {
|
|
151
|
+
return req.headers["next-router-prefetch"] === "1";
|
|
152
|
+
}
|
|
153
|
+
function isStaticAssetRequest(urlPath) {
|
|
154
|
+
const path = stripUrlQueryAndFragment(urlPath);
|
|
155
|
+
if (path.match(/\.(ico|png|jpg|jpeg|gif|svg|css|js|woff|woff2|ttf|eot|webp|avif)$/)) {
|
|
156
|
+
return true;
|
|
157
|
+
}
|
|
158
|
+
if (path.match(/^\/(robots\.txt|sitemap\.xml|manifest\.json|browserconfig\.xml)$/)) {
|
|
159
|
+
return true;
|
|
160
|
+
}
|
|
161
|
+
return false;
|
|
162
|
+
}
|
|
163
|
+
function shouldIgnoreSpansForIncomingRequest(request, {
|
|
164
|
+
ignoreStaticAssets,
|
|
165
|
+
ignoreIncomingRequests
|
|
166
|
+
}) {
|
|
167
|
+
if (isTracingSuppressed()) {
|
|
168
|
+
return true;
|
|
169
|
+
}
|
|
170
|
+
const urlPath = request.url;
|
|
171
|
+
const method = request.method?.toUpperCase();
|
|
172
|
+
if (method === "OPTIONS" || method === "HEAD" || !urlPath) {
|
|
173
|
+
return true;
|
|
174
|
+
}
|
|
175
|
+
if (ignoreStaticAssets && method === "GET" && isStaticAssetRequest(urlPath)) {
|
|
176
|
+
return true;
|
|
177
|
+
}
|
|
178
|
+
if (ignoreIncomingRequests?.(urlPath, request)) {
|
|
179
|
+
return true;
|
|
180
|
+
}
|
|
181
|
+
return false;
|
|
182
|
+
}
|
|
183
|
+
function getRequestContentLengthAttribute(request) {
|
|
184
|
+
const length = getContentLength(request.headers);
|
|
185
|
+
if (length == null) {
|
|
186
|
+
return {};
|
|
187
|
+
}
|
|
188
|
+
if (isCompressed(request.headers)) {
|
|
189
|
+
return {
|
|
190
|
+
["http.request_content_length"]: length
|
|
191
|
+
};
|
|
192
|
+
} else {
|
|
193
|
+
return {
|
|
194
|
+
["http.request_content_length_uncompressed"]: length
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
function getContentLength(headers) {
|
|
199
|
+
const contentLengthHeader = headers["content-length"];
|
|
200
|
+
if (contentLengthHeader === void 0) return null;
|
|
201
|
+
const contentLength = parseInt(contentLengthHeader, 10);
|
|
202
|
+
if (isNaN(contentLength)) return null;
|
|
203
|
+
return contentLength;
|
|
204
|
+
}
|
|
205
|
+
function isCompressed(headers) {
|
|
206
|
+
const encoding = headers["content-encoding"];
|
|
207
|
+
return !!encoding && encoding !== "identity";
|
|
208
|
+
}
|
|
209
|
+
function getIncomingRequestAttributesOnResponse(request, response) {
|
|
210
|
+
const { socket } = request;
|
|
211
|
+
const { statusCode, statusMessage } = response;
|
|
212
|
+
const newAttributes = {
|
|
213
|
+
[HTTP_RESPONSE_STATUS_CODE]: statusCode,
|
|
214
|
+
// eslint-disable-next-line typescript/no-deprecated
|
|
215
|
+
[HTTP_STATUS_CODE]: statusCode,
|
|
216
|
+
"http.status_text": statusMessage?.toUpperCase()
|
|
217
|
+
};
|
|
218
|
+
if (socket) {
|
|
219
|
+
const { localAddress, localPort, remoteAddress, remotePort } = socket;
|
|
220
|
+
newAttributes[NET_HOST_IP] = localAddress;
|
|
221
|
+
newAttributes[NET_HOST_PORT] = localPort;
|
|
222
|
+
newAttributes[NET_PEER_IP] = remoteAddress;
|
|
223
|
+
newAttributes[NET_PEER_PORT] = remotePort;
|
|
224
|
+
}
|
|
225
|
+
newAttributes[HTTP_STATUS_CODE] = statusCode;
|
|
226
|
+
newAttributes["http.status_text"] = (statusMessage || "").toUpperCase();
|
|
227
|
+
return newAttributes;
|
|
228
|
+
}
|
|
229
|
+
function shouldFilterStatusCode(statusCode, dropForStatusCodes) {
|
|
230
|
+
return dropForStatusCodes.some((code) => {
|
|
231
|
+
if (typeof code === "number") {
|
|
232
|
+
return code === statusCode;
|
|
233
|
+
}
|
|
234
|
+
const [min, max] = code;
|
|
235
|
+
return statusCode >= min && statusCode <= max;
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export { httpServerSpansIntegration, isStaticAssetRequest };
|
|
240
|
+
//# sourceMappingURL=httpServerSpansIntegration.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"httpServerSpansIntegration.js","sources":["../../../../src/integrations/http/httpServerSpansIntegration.ts"],"sourcesContent":["/* eslint-disable max-lines */\nimport { errorMonitor } from 'node:events';\nimport type { IncomingHttpHeaders } from 'node:http';\nimport {\n HTTP_CLIENT_IP,\n HTTP_FLAVOR,\n HTTP_HOST,\n HTTP_METHOD,\n HTTP_RESPONSE_STATUS_CODE,\n HTTP_SCHEME,\n HTTP_STATUS_CODE,\n HTTP_TARGET,\n HTTP_USER_AGENT,\n NET_HOST_IP,\n NET_HOST_NAME,\n NET_HOST_PORT,\n NET_PEER_IP,\n NET_PEER_PORT,\n NET_TRANSPORT,\n SENTRY_HTTP_PREFETCH,\n URL_FRAGMENT,\n URL_FULL,\n URL_PATH,\n URL_QUERY,\n SENTRY_KIND,\n} from '@sentry/conventions/attributes';\nimport type {\n Event,\n HttpClientRequest,\n HttpIncomingMessage,\n HttpServerResponse,\n Integration,\n IntegrationFn,\n Span,\n SpanAttributes,\n SpanStatus,\n} from '@sentry/core';\nimport {\n debug,\n getSpanStatusFromHttpCode,\n httpHeadersToSpanAttributes,\n parseStringToURLObject,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n SPAN_STATUS_ERROR,\n stripUrlQueryAndFragment,\n isTracingSuppressed,\n bindScopeToEmitter,\n startInactiveSpan,\n withActiveSpan,\n getUrlFragment,\n getUrlQuery,\n filterCollectedUrl,\n filterCollectedUrlQuery,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport type { NodeClient } from '../../sdk/client';\nimport { addStartSpanCallback } from './httpServerIntegration';\n\nconst INTEGRATION_NAME = 'Http.ServerSpans' as const;\n\n// Tree-shakable guard to remove all code related to tracing\ndeclare const __SENTRY_TRACING__: boolean;\n\nexport interface HttpServerSpansIntegrationOptions {\n /**\n * Do not capture spans for incoming HTTP requests to URLs where the given callback returns `true`.\n * Spans will be non recording if tracing is disabled.\n *\n * The `urlPath` param consists of the URL path and query string (if any) of the incoming request.\n * For example: `'/users/details?id=123'`\n *\n * The `request` param contains the original {@type IncomingMessage} object of the incoming request.\n * You can use it to filter on additional properties like method, headers, etc.\n */\n ignoreIncomingRequests?: (urlPath: string, request: HttpIncomingMessage) => boolean;\n\n /**\n * Whether to automatically ignore common static asset requests like favicon.ico, robots.txt, etc.\n * This helps reduce noise in your transactions.\n *\n * @default `true`\n */\n ignoreStaticAssets?: boolean;\n\n /**\n * Do not capture spans for incoming HTTP requests with the given status codes.\n * By default, spans with some 3xx and 4xx status codes are ignored (see @default).\n * Expects an array of status codes or a range of status codes, e.g. [[300,399], 404] would ignore 3xx and 404 status codes.\n *\n * @default `[[401, 404], [301, 303], [305, 399]]`\n */\n ignoreStatusCodes?: (number | [number, number])[];\n\n /**\n * @deprecated This is deprecated in favor of `incomingRequestSpanHook`.\n */\n instrumentation?: {\n requestHook?: (span: Span, req: HttpClientRequest | HttpIncomingMessage) => void;\n responseHook?: (span: Span, response: HttpIncomingMessage | HttpServerResponse) => void;\n applyCustomAttributesOnSpan?: (\n span: Span,\n request: HttpClientRequest | HttpIncomingMessage,\n response: HttpIncomingMessage | HttpServerResponse,\n ) => void;\n };\n\n /**\n * A hook that can be used to mutate the span for incoming requests.\n * This is triggered after the span is created, but before it is recorded.\n */\n onSpanCreated?: (span: Span, request: HttpIncomingMessage, response: HttpServerResponse) => void;\n}\n\nconst _httpServerSpansIntegration = ((options: HttpServerSpansIntegrationOptions = {}) => {\n const ignoreStaticAssets = options.ignoreStaticAssets ?? true;\n const ignoreIncomingRequests = options.ignoreIncomingRequests;\n const ignoreStatusCodes = options.ignoreStatusCodes ?? [\n [401, 404],\n // 300 and 304 are possibly valid status codes we do not want to filter\n [301, 303],\n [305, 399],\n ];\n\n const { onSpanCreated } = options;\n // eslint-disable-next-line typescript/no-deprecated\n const { requestHook, responseHook, applyCustomAttributesOnSpan } = options.instrumentation ?? {};\n\n return {\n name: INTEGRATION_NAME,\n setup(client: NodeClient) {\n // If no tracing, we can just skip everything here\n if (typeof __SENTRY_TRACING__ !== 'undefined' && !__SENTRY_TRACING__) {\n return;\n }\n\n client.on('httpServerRequest', (_request, _response, normalizedRequest) => {\n // Type-casting this here because we do not want to put the node types into core\n const request = _request as HttpIncomingMessage;\n const response = _response as HttpServerResponse;\n\n const startSpan = (next: () => boolean): boolean => {\n if (\n shouldIgnoreSpansForIncomingRequest(request, {\n ignoreStaticAssets,\n ignoreIncomingRequests,\n })\n ) {\n DEBUG_BUILD && debug.log(INTEGRATION_NAME, 'Skipping span creation for incoming request', request.url);\n return next();\n }\n\n const fullUrl = normalizedRequest.url || request.url || '/';\n const urlObj = parseStringToURLObject(fullUrl);\n\n const headers = request.headers;\n const userAgent = headers['user-agent'];\n const ips = headers['x-forwarded-for'];\n const httpVersion = request.httpVersion;\n const host = headers.host as string | undefined;\n const hostname = host?.replace(/^(.*)(:[0-9]{1,5})/, '$1') || 'localhost';\n\n const scheme = fullUrl.startsWith('https') ? 'https' : 'http';\n\n const method = normalizedRequest.method || request.method?.toUpperCase() || 'GET';\n const httpTargetWithoutQueryFragment = urlObj ? urlObj.pathname : stripUrlQueryAndFragment(fullUrl);\n const bestEffortTransactionName = `${method} ${httpTargetWithoutQueryFragment}`;\n\n const query = getUrlQuery(urlObj?.search);\n const fragment = getUrlFragment(urlObj?.hash);\n\n const span = startInactiveSpan({\n name: bestEffortTransactionName,\n attributes: {\n // Sentry specific attributes\n [SENTRY_KIND]: 'server',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: 'http.server',\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.otel.http',\n [SENTRY_HTTP_PREFETCH]: isKnownPrefetchRequest(request) || undefined,\n [URL_FULL]: filterCollectedUrl(fullUrl, client),\n [URL_PATH]: urlObj?.pathname ?? httpTargetWithoutQueryFragment,\n [URL_QUERY]: filterCollectedUrlQuery(query, client),\n [URL_FRAGMENT]: fragment,\n // Old Semantic Conventions attributes - added for compatibility with what `@opentelemetry/instrumentation-http` output before\n /* eslint-disable typescript/no-deprecated */\n [HTTP_METHOD]: normalizedRequest.method,\n [HTTP_TARGET]: filterCollectedUrl(\n urlObj ? `${urlObj.pathname}${urlObj.search}` : httpTargetWithoutQueryFragment,\n client,\n ),\n [HTTP_HOST]: host,\n [NET_HOST_NAME]: hostname,\n [HTTP_CLIENT_IP]: typeof ips === 'string' ? ips.split(',')[0] : undefined,\n [HTTP_USER_AGENT]: userAgent,\n [HTTP_SCHEME]: scheme,\n [HTTP_FLAVOR]: httpVersion,\n [NET_TRANSPORT]: httpVersion?.toUpperCase() === 'QUIC' ? 'ip_udp' : 'ip_tcp',\n /* eslint-enable typescript/no-deprecated */\n ...getRequestContentLengthAttribute(request),\n ...httpHeadersToSpanAttributes(normalizedRequest.headers || {}, client.getDataCollectionOptions()),\n },\n });\n\n // TODO v11: Remove the following three hooks, only onSpanCreated should remain\n requestHook?.(span, request);\n responseHook?.(span, response);\n applyCustomAttributesOnSpan?.(span, request, response);\n onSpanCreated?.(span, request, response);\n\n return withActiveSpan(span, () => {\n bindScopeToEmitter(request);\n bindScopeToEmitter(response);\n\n // Ensure we only end the span once\n // E.g. error can be emitted before close is emitted\n let isEnded = false;\n function endSpan(status: SpanStatus): void {\n if (isEnded) {\n return;\n }\n\n isEnded = true;\n\n const newAttributes = getIncomingRequestAttributesOnResponse(request, response);\n span.setAttributes(newAttributes);\n span.setStatus(status);\n span.end();\n }\n\n response.on('close', () => {\n endSpan(getSpanStatusFromHttpCode(response.statusCode));\n });\n response.on(errorMonitor, () => {\n const httpStatus = getSpanStatusFromHttpCode(response.statusCode);\n // Ensure we def. have an error status here\n endSpan(httpStatus.code === SPAN_STATUS_ERROR ? httpStatus : { code: SPAN_STATUS_ERROR });\n });\n\n return next();\n });\n };\n\n addStartSpanCallback(request, startSpan);\n });\n },\n processEvent(event) {\n if (event.type === 'transaction') {\n const statusCode = event.contexts?.trace?.data?.['http.response.status_code'];\n if (typeof statusCode === 'number') {\n // Drop transaction if it has a status code that should be ignored\n if (shouldFilterStatusCode(statusCode, ignoreStatusCodes)) {\n DEBUG_BUILD && debug.log('Dropping transaction due to status code', statusCode);\n return null;\n }\n\n // Surface the HTTP status as the top-level `response` context. The OTel SDK span\n // exporter already does this on its path; doing it here covers transactions produced\n // by the `SentryTracerProvider`, which bypasses that exporter.\n event.contexts = {\n ...event.contexts,\n response: {\n ...event.contexts?.response,\n status_code: statusCode,\n },\n };\n }\n }\n\n return event;\n },\n afterAllSetup(client) {\n if (!DEBUG_BUILD) {\n return;\n }\n\n if (client.getIntegrationByName('Http')) {\n debug.warn(\n 'It seems that you have manually added `httpServerSpansIntegration` while `httpIntegration` is also present. Make sure to remove `httpIntegration` when adding `httpServerSpansIntegration`.',\n );\n }\n\n if (!client.getIntegrationByName('Http.Server')) {\n debug.error(\n 'It seems that you have manually added `httpServerSpansIntegration` without adding `httpServerIntegration`. This is a requiement for spans to be created - please add the `httpServerIntegration` integration.',\n );\n }\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * This integration emits spans for incoming requests handled via the node `http` module.\n * It requires the `httpServerIntegration` to be present.\n */\nexport const httpServerSpansIntegration = _httpServerSpansIntegration as (\n options?: HttpServerSpansIntegrationOptions,\n) => Integration & {\n name: 'Http.ServerSpans';\n setup: (client: NodeClient) => void;\n processEvent: (event: Event) => Event | null;\n};\n\nfunction isKnownPrefetchRequest(req: HttpIncomingMessage): boolean {\n // Currently only handles Next.js prefetch requests but may check other frameworks in the future.\n return req.headers['next-router-prefetch'] === '1';\n}\n\n/**\n * Check if a request is for a common static asset that should be ignored by default.\n *\n * Only exported for tests.\n */\nexport function isStaticAssetRequest(urlPath: string): boolean {\n const path = stripUrlQueryAndFragment(urlPath);\n // Common static file extensions\n if (path.match(/\\.(ico|png|jpg|jpeg|gif|svg|css|js|woff|woff2|ttf|eot|webp|avif)$/)) {\n return true;\n }\n\n // Common metadata files\n if (path.match(/^\\/(robots\\.txt|sitemap\\.xml|manifest\\.json|browserconfig\\.xml)$/)) {\n return true;\n }\n\n return false;\n}\n\nfunction shouldIgnoreSpansForIncomingRequest(\n request: HttpIncomingMessage,\n {\n ignoreStaticAssets,\n ignoreIncomingRequests,\n }: {\n ignoreStaticAssets?: boolean;\n ignoreIncomingRequests?: (urlPath: string, request: HttpIncomingMessage) => boolean;\n },\n): boolean {\n if (isTracingSuppressed()) {\n return true;\n }\n\n // request.url is the only property that holds any information about the url\n // it only consists of the URL path and query string (if any)\n const urlPath = request.url;\n\n const method = request.method?.toUpperCase();\n // We do not capture OPTIONS/HEAD requests as spans\n if (method === 'OPTIONS' || method === 'HEAD' || !urlPath) {\n return true;\n }\n\n // Default static asset filtering\n if (ignoreStaticAssets && method === 'GET' && isStaticAssetRequest(urlPath)) {\n return true;\n }\n\n if (ignoreIncomingRequests?.(urlPath, request)) {\n return true;\n }\n\n return false;\n}\n\nfunction getRequestContentLengthAttribute(request: HttpIncomingMessage): SpanAttributes {\n const length = getContentLength(request.headers);\n if (length == null) {\n return {};\n }\n\n if (isCompressed(request.headers)) {\n return {\n ['http.request_content_length']: length,\n };\n } else {\n return {\n ['http.request_content_length_uncompressed']: length,\n };\n }\n}\n\nfunction getContentLength(headers: IncomingHttpHeaders): number | null {\n const contentLengthHeader = headers['content-length'];\n if (contentLengthHeader === undefined) return null;\n\n const contentLength = parseInt(contentLengthHeader, 10);\n if (isNaN(contentLength)) return null;\n\n return contentLength;\n}\n\nfunction isCompressed(headers: IncomingHttpHeaders): boolean {\n const encoding = headers['content-encoding'];\n\n return !!encoding && encoding !== 'identity';\n}\n\nfunction getIncomingRequestAttributesOnResponse(\n request: HttpIncomingMessage,\n response: HttpServerResponse,\n): SpanAttributes {\n // take socket from the request,\n // since it may be detached from the response object in keep-alive mode\n const { socket } = request;\n const { statusCode, statusMessage } = response;\n\n const newAttributes: SpanAttributes = {\n [HTTP_RESPONSE_STATUS_CODE]: statusCode,\n // eslint-disable-next-line typescript/no-deprecated\n [HTTP_STATUS_CODE]: statusCode,\n 'http.status_text': statusMessage?.toUpperCase(),\n };\n\n if (socket) {\n const { localAddress, localPort, remoteAddress, remotePort } = socket;\n // eslint-disable-next-line typescript/no-deprecated\n newAttributes[NET_HOST_IP] = localAddress;\n // eslint-disable-next-line typescript/no-deprecated\n newAttributes[NET_HOST_PORT] = localPort;\n // eslint-disable-next-line typescript/no-deprecated\n newAttributes[NET_PEER_IP] = remoteAddress;\n // oxlint-disable-next-line typescript/no-deprecated\n newAttributes[NET_PEER_PORT] = remotePort;\n }\n // eslint-disable-next-line typescript/no-deprecated\n newAttributes[HTTP_STATUS_CODE] = statusCode;\n newAttributes['http.status_text'] = (statusMessage || '').toUpperCase();\n\n return newAttributes;\n}\n\n/**\n * If the given status code should be filtered for the given list of status codes/ranges.\n */\nfunction shouldFilterStatusCode(statusCode: number, dropForStatusCodes: (number | [number, number])[]): boolean {\n return dropForStatusCodes.some(code => {\n if (typeof code === 'number') {\n return code === statusCode;\n }\n\n const [min, max] = code;\n return statusCode >= min && statusCode <= max;\n });\n}\n"],"names":[],"mappings":";;;;;;AA4DA,MAAM,gBAAA,GAAmB,kBAAA;AAuDzB,MAAM,2BAAA,IAA+B,CAAC,OAAA,GAA6C,EAAC,KAAM;AACxF,EAAA,MAAM,kBAAA,GAAqB,QAAQ,kBAAA,IAAsB,IAAA;AACzD,EAAA,MAAM,yBAAyB,OAAA,CAAQ,sBAAA;AACvC,EAAA,MAAM,iBAAA,GAAoB,QAAQ,iBAAA,IAAqB;AAAA,IACrD,CAAC,KAAK,GAAG,CAAA;AAAA;AAAA,IAET,CAAC,KAAK,GAAG,CAAA;AAAA,IACT,CAAC,KAAK,GAAG;AAAA,GACX;AAEA,EAAA,MAAM,EAAE,eAAc,GAAI,OAAA;AAE1B,EAAA,MAAM,EAAE,WAAA,EAAa,YAAA,EAAc,6BAA4B,GAAI,OAAA,CAAQ,mBAAmB,EAAC;AAE/F,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,MAAM,MAAA,EAAoB;AAExB,MAAA,IAAI,OAAO,kBAAA,KAAuB,WAAA,IAAe,CAAC,kBAAA,EAAoB;AACpE,QAAA;AAAA,MACF;AAEA,MAAA,MAAA,CAAO,EAAA,CAAG,mBAAA,EAAqB,CAAC,QAAA,EAAU,WAAW,iBAAA,KAAsB;AAEzE,QAAA,MAAM,OAAA,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EA,EAAA,aAAA,CAAc,gBAAgB,CAAA,GAAI,UAAA;AAClC,EAAA,aAAA,CAAc,kBAAkB,CAAA,GAAA,CAAK,aAAA,IAAiB,EAAA,EAAI,WAAA,EAAY;AAEtE,EAAA,OAAO,aAAA;AACT;AAKA,SAAS,sBAAA,CAAuB,YAAoB,kBAAA,EAA4D;AAC9G,EAAA,OAAO,kBAAA,CAAmB,KAAK,CAAA,IAAA,KAAQ;AACrC,IAAA,IAAI,OAAO,SAAS,QAAA,EAAU;AAC5B,MAAA,OAAO,IAAA,KAAS,UAAA;AAAA,IAClB;AAEA,IAAA,MAAM,CAAC,GAAA,EAAK,GAAG,CAAA,GAAI,IAAA;AACnB,IAAA,OAAO,UAAA,IAAc,OAAO,UAAA,IAAc,GAAA;AAAA,EAC5C,CAAC,CAAA;AACH;;;;"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { URL_FULL } from '@sentry/conventions/attributes';
|
|
2
|
+
import { defineIntegration, hasSpansEnabled, getRequestUrlFromClientRequest, stripDataUrlContent, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE } from '@sentry/core';
|
|
3
|
+
import { httpServerIntegration } from './httpServerIntegration.js';
|
|
4
|
+
import { httpServerSpansIntegration } from './httpServerSpansIntegration.js';
|
|
5
|
+
import { instrumentHttpOutgoingRequests } from './SentryHttpInstrumentation.js';
|
|
6
|
+
|
|
7
|
+
const INTEGRATION_NAME = "Http";
|
|
8
|
+
const httpIntegration = defineIntegration((options = {}) => {
|
|
9
|
+
const spans = options.spans ?? true;
|
|
10
|
+
const disableIncomingRequestSpans = options.disableIncomingRequestSpans;
|
|
11
|
+
const enableServerSpans = spans && !disableIncomingRequestSpans;
|
|
12
|
+
const serverOptions = {
|
|
13
|
+
sessions: options.trackIncomingRequestsAsSessions,
|
|
14
|
+
sessionFlushingDelayMS: options.sessionFlushingDelayMS,
|
|
15
|
+
ignoreRequestBody: options.ignoreIncomingRequestBody,
|
|
16
|
+
maxRequestBodySize: options.maxIncomingRequestBodySize
|
|
17
|
+
};
|
|
18
|
+
const serverSpansOptions = {
|
|
19
|
+
ignoreIncomingRequests: options.ignoreIncomingRequests,
|
|
20
|
+
ignoreStaticAssets: options.ignoreStaticAssets,
|
|
21
|
+
ignoreStatusCodes: options.dropSpansForIncomingRequestStatusCodes,
|
|
22
|
+
// oxlint-disable-next-line typescript/no-deprecated -- pass through the deprecated option for back-compat
|
|
23
|
+
instrumentation: options.instrumentation,
|
|
24
|
+
onSpanCreated: options.incomingRequestSpanHook
|
|
25
|
+
};
|
|
26
|
+
const server = httpServerIntegration(serverOptions);
|
|
27
|
+
const serverSpans = httpServerSpansIntegration(serverSpansOptions);
|
|
28
|
+
return {
|
|
29
|
+
name: INTEGRATION_NAME,
|
|
30
|
+
setup(client) {
|
|
31
|
+
const clientOptions = client.getOptions();
|
|
32
|
+
if (enableServerSpans && hasSpansEnabled(clientOptions)) {
|
|
33
|
+
serverSpans.setup(client);
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
setupOnce() {
|
|
37
|
+
server.setupOnce();
|
|
38
|
+
const sentryHttpInstrumentationOptions = {
|
|
39
|
+
breadcrumbs: options.breadcrumbs,
|
|
40
|
+
spans,
|
|
41
|
+
propagateTraceInOutgoingRequests: options.tracePropagation ?? true,
|
|
42
|
+
// oxlint-disable-next-line typescript/no-deprecated -- deprecated alias kept until removal
|
|
43
|
+
createSpansForOutgoingRequests: spans,
|
|
44
|
+
ignoreOutgoingRequests: options.ignoreOutgoingRequests,
|
|
45
|
+
outgoingRequestHook: (span, request) => {
|
|
46
|
+
const url = getRequestUrlFromClientRequest(request);
|
|
47
|
+
if (url.startsWith("data:")) {
|
|
48
|
+
const sanitizedUrl = stripDataUrlContent(url);
|
|
49
|
+
span.updateName(`${request.method || "GET"} ${sanitizedUrl}`);
|
|
50
|
+
span.setAttributes({
|
|
51
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: "url",
|
|
52
|
+
[URL_FULL]: sanitizedUrl
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
options.instrumentation?.requestHook?.(span, request);
|
|
56
|
+
},
|
|
57
|
+
outgoingResponseHook: options.instrumentation?.responseHook,
|
|
58
|
+
outgoingRequestApplyCustomAttributes: options.instrumentation?.applyCustomAttributesOnSpan
|
|
59
|
+
};
|
|
60
|
+
instrumentHttpOutgoingRequests(sentryHttpInstrumentationOptions);
|
|
61
|
+
},
|
|
62
|
+
processEvent(event) {
|
|
63
|
+
return serverSpans.processEvent(event);
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
export { httpIntegration };
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/integrations/http/index.ts"],"sourcesContent":["import type { RequestOptions } from 'node:http';\nimport type { HttpClientRequest, HttpIncomingMessage, HttpServerResponse, Span } from '@sentry/core';\nimport { URL_FULL } from '@sentry/conventions/attributes';\nimport {\n defineIntegration,\n getRequestUrlFromClientRequest,\n hasSpansEnabled,\n SEMANTIC_ATTRIBUTE_SENTRY_SOURCE,\n stripDataUrlContent,\n} from '@sentry/core';\nimport type { NodeClient } from '../../sdk/client';\nimport type { HttpServerIntegrationOptions } from './httpServerIntegration';\nimport { httpServerIntegration } from './httpServerIntegration';\nimport type { HttpServerSpansIntegrationOptions } from './httpServerSpansIntegration';\nimport { httpServerSpansIntegration } from './httpServerSpansIntegration';\nimport type { SentryHttpInstrumentationOptions } from './SentryHttpInstrumentation';\nimport { instrumentHttpOutgoingRequests } from './SentryHttpInstrumentation';\n\nconst INTEGRATION_NAME = 'Http' as const;\n\n// TODO(v11): Consolidate all the various HTTP integration options into one,\n// and deprecate the duplicated and aliased options.\ninterface HttpOptions {\n /**\n * Whether breadcrumbs should be recorded for outgoing requests.\n * Defaults to true\n */\n breadcrumbs?: boolean;\n\n /**\n * If set to false, do not emit any spans.\n * This will ensure that the default HttpInstrumentation from OpenTelemetry is not setup,\n * only the Sentry-specific instrumentation for request isolation is applied.\n *\n * Defaults to `true` when tracing is enabled.\n */\n spans?: boolean;\n\n /**\n * Whether the integration should create [Sessions](https://docs.sentry.io/product/releases/health/#sessions) for incoming requests to track the health and crash-free rate of your releases in Sentry.\n * Read more about Release Health: https://docs.sentry.io/product/releases/health/\n *\n * Defaults to `true`.\n */\n trackIncomingRequestsAsSessions?: boolean;\n\n /**\n * Number of milliseconds until sessions tracked with `trackIncomingRequestsAsSessions` will be flushed as a session aggregate.\n *\n * Defaults to `60000` (60s).\n */\n sessionFlushingDelayMS?: number;\n\n /**\n * Whether to inject trace propagation headers (sentry-trace, baggage, traceparent) into outgoing HTTP requests.\n *\n * When set to `false`, Sentry will not inject any trace propagation headers, but will still create breadcrumbs\n * (if `breadcrumbs` is enabled). This is useful when you run your own OpenTelemetry `HttpInstrumentation` and\n * want to avoid duplicate trace headers being injected by both Sentry and OpenTelemetry.\n *\n * @default `true`\n */\n tracePropagation?: boolean;\n\n /**\n * Do not capture spans or breadcrumbs for outgoing HTTP requests to URLs where the given callback returns `true`.\n * This controls both span & breadcrumb creation - spans will be non recording if tracing is disabled.\n *\n * The `url` param contains the entire URL, including query string (if any), protocol, host, etc. of the outgoing request.\n * For example: `'https://someService.com/users/details?id=123'`\n *\n * The `request` param contains the original {@type RequestOptions} object used to make the outgoing request.\n * You can use it to filter on additional properties like method, headers, etc.\n */\n ignoreOutgoingRequests?: (url: string, request: RequestOptions) => boolean;\n\n /**\n * Do not capture spans for incoming HTTP requests to URLs where the given callback returns `true`.\n * Spans will be non recording if tracing is disabled.\n *\n * The `urlPath` param consists of the URL path and query string (if any) of the incoming request.\n * For example: `'/users/details?id=123'`\n *\n * The `request` param contains the original {@type IncomingMessage} object of the incoming request.\n * You can use it to filter on additional properties like method, headers, etc.\n */\n ignoreIncomingRequests?: (urlPath: string, request: HttpIncomingMessage) => boolean;\n\n /**\n * A hook that can be used to mutate the span for incoming requests.\n * This is triggered after the span is created, but before it is recorded.\n */\n incomingRequestSpanHook?: (span: Span, request: HttpIncomingMessage, response: HttpServerResponse) => void;\n\n /**\n * Whether to automatically ignore common static asset requests like favicon.ico, robots.txt, etc.\n * This helps reduce noise in your transactions.\n *\n * @default `true`\n */\n ignoreStaticAssets?: boolean;\n\n /**\n * Do not capture spans for incoming HTTP requests with the given status codes.\n * By default, spans with some 3xx and 4xx status codes are ignored (see @default).\n * Expects an array of status codes or a range of status codes, e.g. [[300,399], 404] would ignore 3xx and 404 status codes.\n *\n * @default `[[401, 404], [301, 303], [305, 399]]`\n */\n dropSpansForIncomingRequestStatusCodes?: (number | [number, number])[];\n\n /**\n * Do not capture the request body for incoming HTTP requests to URLs where the given callback returns `true`.\n * This can be useful for long running requests where the body is not needed and we want to avoid capturing it.\n *\n * @param url Contains the entire URL, including query string (if any), protocol, host, etc. of the incoming request.\n * @param request Contains the {@type RequestOptions} object used to make the incoming request.\n */\n ignoreIncomingRequestBody?: (url: string, request: RequestOptions) => boolean;\n\n /**\n * Controls the maximum size of incoming HTTP request bodies attached to events.\n *\n * Available options:\n * - 'none': No request bodies will be attached\n * - 'small': Request bodies up to 1,000 bytes will be attached\n * - 'medium': Request bodies up to 10,000 bytes will be attached (default)\n * - 'always': Request bodies will always be attached\n *\n * Note that even with 'always' setting, bodies exceeding 1MB will never be attached\n * for performance and security reasons.\n *\n * @default 'medium'\n */\n maxIncomingRequestBodySize?: 'none' | 'small' | 'medium' | 'always';\n\n /**\n * If true, do not generate spans for incoming requests at all.\n * This is used by Remix to avoid generating spans for incoming requests, as it generates its own spans.\n */\n disableIncomingRequestSpans?: boolean;\n\n /**\n * Additional instrumentation options that are passed to the underlying HttpInstrumentation.\n */\n instrumentation?: {\n requestHook?: (span: Span, req: HttpIncomingMessage | HttpClientRequest) => void;\n responseHook?: (span: Span, response: HttpIncomingMessage | HttpServerResponse) => void;\n applyCustomAttributesOnSpan?: (\n span: Span,\n request: HttpIncomingMessage | HttpClientRequest,\n response: HttpIncomingMessage | HttpServerResponse,\n ) => void;\n };\n}\n\n/**\n * The http integration instruments Node's internal http and https modules.\n * It creates breadcrumbs and spans for outgoing HTTP requests which will be attached to the currently active span.\n */\nexport const httpIntegration = defineIntegration((options: HttpOptions = {}) => {\n const spans = options.spans ?? true;\n const disableIncomingRequestSpans = options.disableIncomingRequestSpans;\n const enableServerSpans = spans && !disableIncomingRequestSpans;\n\n const serverOptions = {\n sessions: options.trackIncomingRequestsAsSessions,\n sessionFlushingDelayMS: options.sessionFlushingDelayMS,\n ignoreRequestBody: options.ignoreIncomingRequestBody,\n maxRequestBodySize: options.maxIncomingRequestBodySize,\n } satisfies HttpServerIntegrationOptions;\n\n const serverSpansOptions: HttpServerSpansIntegrationOptions = {\n ignoreIncomingRequests: options.ignoreIncomingRequests,\n ignoreStaticAssets: options.ignoreStaticAssets,\n ignoreStatusCodes: options.dropSpansForIncomingRequestStatusCodes,\n // oxlint-disable-next-line typescript/no-deprecated -- pass through the deprecated option for back-compat\n instrumentation: options.instrumentation,\n onSpanCreated: options.incomingRequestSpanHook,\n };\n\n const server = httpServerIntegration(serverOptions);\n const serverSpans = httpServerSpansIntegration(serverSpansOptions);\n\n return {\n name: INTEGRATION_NAME,\n setup(client: NodeClient) {\n const clientOptions = client.getOptions();\n\n if (enableServerSpans && hasSpansEnabled(clientOptions)) {\n serverSpans.setup(client);\n }\n },\n setupOnce() {\n server.setupOnce();\n\n const sentryHttpInstrumentationOptions: SentryHttpInstrumentationOptions = {\n breadcrumbs: options.breadcrumbs,\n spans,\n propagateTraceInOutgoingRequests: options.tracePropagation ?? true,\n // oxlint-disable-next-line typescript/no-deprecated -- deprecated alias kept until removal\n createSpansForOutgoingRequests: spans,\n ignoreOutgoingRequests: options.ignoreOutgoingRequests,\n outgoingRequestHook: (span: Span, request: HttpClientRequest) => {\n // Sanitize data URLs to prevent long base64 strings in span attributes\n const url = getRequestUrlFromClientRequest(request);\n if (url.startsWith('data:')) {\n const sanitizedUrl = stripDataUrlContent(url);\n span.updateName(`${request.method || 'GET'} ${sanitizedUrl}`);\n span.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_SOURCE]: 'url',\n [URL_FULL]: sanitizedUrl,\n });\n }\n options.instrumentation?.requestHook?.(span, request);\n },\n outgoingResponseHook: options.instrumentation?.responseHook,\n outgoingRequestApplyCustomAttributes: options.instrumentation?.applyCustomAttributesOnSpan,\n };\n\n // This is Sentry-specific instrumentation for outgoing request\n // breadcrumbs & trace propagation. It uses the diagnostic channels on\n // node versions that support it, falling back to monkey-patching when\n // needed.\n instrumentHttpOutgoingRequests(sentryHttpInstrumentationOptions);\n },\n processEvent(event) {\n // Always run this, even if spans are disabled\n // The reason being that e.g. the remix integration disables span\n // creation here but still wants to use the ignore status codes option\n return serverSpans.processEvent(event);\n },\n };\n});\n"],"names":[],"mappings":";;;;;;AAkBA,MAAM,gBAAA,GAAmB,MAAA;AA8IlB,MAAM,eAAA,GAAkB,iBAAA,CAAkB,CAAC,OAAA,GAAuB,EAAC,KAAM;AAC9E,EAAA,MAAM,KAAA,GAAQ,QAAQ,KAAA,IAAS,IAAA;AAC/B,EAAA,MAAM,8BAA8B,OAAA,CAAQ,2BAAA;AAC5C,EAAA,MAAM,iBAAA,GAAoB,SAAS,CAAC,2BAAA;AAEpC,EAAA,MAAM,aAAA,GAAgB;AAAA,IACpB,UAAU,OAAA,CAAQ,+BAAA;AAAA,IAClB,wBAAwB,OAAA,CAAQ,sBAAA;AAAA,IAChC,mBAAmB,OAAA,CAAQ,yBAAA;AAAA,IAC3B,oBAAoB,OAAA,CAAQ;AAAA,GAC9B;AAEA,EAAA,MAAM,kBAAA,GAAwD;AAAA,IAC5D,wBAAwB,OAAA,CAAQ,sBAAA;AAAA,IAChC,oBAAoB,OAAA,CAAQ,kBAAA;AAAA,IAC5B,mBAAmB,OAAA,CAAQ,sCAAA;AAAA;AAAA,IAE3B,iBAAiB,OAAA,CAAQ,eAAA;AAAA,IACzB,eAAe,OAAA,CAAQ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BAAA,EAAsB,QAAQ,eAAA,EAAiB,YAAA;AAAA,QAC/C,oCAAA,EAAsC,QAAQ,eAAA,EAAiB;AAAA,OACjE;AAMA,MAAA,8BAAA,CAA+B,gCAAgC,CAAA;AAAA,IACjE,CAAA;AAAA,IACA,aAAa,KAAA,EAAO;AAIlB,MAAA,OAAO,WAAA,CAAY,aAAa,KAAK,CAAA;AAAA,IACvC;AAAA,GACF;AACF,CAAC;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { _INTERNAL_filterKeyValueData } from '@sentry/core';
|
|
2
|
+
|
|
3
|
+
function filterFrameVariables(vars, behavior) {
|
|
4
|
+
return _INTERNAL_filterKeyValueData(vars, behavior);
|
|
5
|
+
}
|
|
6
|
+
const LOCAL_VARIABLES_KEY = "__SENTRY_ERROR_LOCAL_VARIABLES__";
|
|
7
|
+
function isAnonymous(name) {
|
|
8
|
+
return name !== void 0 && (name.length === 0 || name === "?" || name === "<anonymous>");
|
|
9
|
+
}
|
|
10
|
+
function functionNamesMatch(a, b) {
|
|
11
|
+
return a === b || `Object.${a}` === b || a === `Object.${b}` || isAnonymous(a) && isAnonymous(b);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { LOCAL_VARIABLES_KEY, filterFrameVariables, functionNamesMatch, isAnonymous };
|
|
15
|
+
//# sourceMappingURL=common.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.js","sources":["../../../../src/integrations/local-variables/common.ts"],"sourcesContent":["import type { Debugger } from 'node:inspector';\nimport type { CollectBehavior } from '@sentry/core';\nimport { _INTERNAL_filterKeyValueData } from '@sentry/core';\n\nexport type Variables = Record<string, unknown>;\n\n/**\n * Filters captured frame variables by name according to a `dataCollection.stackFrameVariables` behavior.\n *\n * `true` keeps all variables (built-in sensitive names are still scrubbed), `false` drops them all, and the\n * `{ allow: [...] }` / `{ deny: [...] }` forms filter by variable name.\n */\nexport function filterFrameVariables(vars: Variables, behavior: CollectBehavior): Variables {\n return _INTERNAL_filterKeyValueData(vars, behavior);\n}\n\nexport type RateLimitIncrement = () => void;\n\n/**\n * The key used to store the local variables on the error object.\n */\nexport const LOCAL_VARIABLES_KEY = '__SENTRY_ERROR_LOCAL_VARIABLES__';\n\n/**\n * Creates a rate limiter that will call the disable callback when the rate limit is reached and the enable callback\n * when a timeout has occurred.\n * @param maxPerSecond Maximum number of calls per second\n * @param enable Callback to enable capture\n * @param disable Callback to disable capture\n * @returns A function to call to increment the rate limiter count\n */\nexport function createRateLimiter(\n maxPerSecond: number,\n enable: () => void,\n disable: (seconds: number) => void,\n): RateLimitIncrement {\n let count = 0;\n let retrySeconds = 5;\n let disabledTimeout = 0;\n\n setInterval(() => {\n if (disabledTimeout === 0) {\n if (count > maxPerSecond) {\n retrySeconds *= 2;\n disable(retrySeconds);\n\n // Cap at one day\n if (retrySeconds > 86400) {\n retrySeconds = 86400;\n }\n disabledTimeout = retrySeconds;\n }\n } else {\n disabledTimeout -= 1;\n\n if (disabledTimeout === 0) {\n enable();\n }\n }\n\n count = 0;\n }, 1_000).unref();\n\n return () => {\n count += 1;\n };\n}\n\n// Add types for the exception event data\nexport type PausedExceptionEvent = Debugger.PausedEventDataType & {\n data: {\n // This contains error.stack\n description: string;\n objectId?: string;\n };\n};\n\n/** Could this be an anonymous function? */\nexport function isAnonymous(name: string | undefined): boolean {\n return name !== undefined && (name.length === 0 || name === '?' || name === '<anonymous>');\n}\n\n/** Do the function names appear to match? */\nexport function functionNamesMatch(a: string | undefined, b: string | undefined): boolean {\n return a === b || `Object.${a}` === b || a === `Object.${b}` || (isAnonymous(a) && isAnonymous(b));\n}\n\nexport interface FrameVariables {\n function: string;\n vars?: Variables;\n}\n\nexport interface LocalVariablesIntegrationOptions {\n /**\n * Capture local variables for both caught and uncaught exceptions\n *\n * - When false, only uncaught exceptions will have local variables\n * - When true, both caught and uncaught exceptions will have local variables.\n *\n * Defaults to `true`.\n *\n * Capturing local variables for all exceptions can be expensive since the debugger pauses for every throw to collect\n * local variables.\n *\n * To reduce the likelihood of this feature impacting app performance or throughput, this feature is rate-limited.\n * Once the rate limit is reached, local variables will only be captured for uncaught exceptions until a timeout has\n * been reached.\n */\n captureAllExceptions?: boolean;\n /**\n * Maximum number of exceptions to capture local variables for per second before rate limiting is triggered.\n */\n maxExceptionsPerSecond?: number;\n /**\n * When true, local variables will be captured for all frames, including those that are not in_app.\n *\n * Defaults to `false`.\n */\n includeOutOfAppFrames?: boolean;\n}\n\nexport interface LocalVariablesWorkerArgs extends LocalVariablesIntegrationOptions {\n /**\n * Whether to enable debug logging.\n */\n debug: boolean;\n /**\n * Base path used to calculate module name.\n *\n * Defaults to `dirname(process.argv[1])` and falls back to `process.cwd()`\n */\n basePath?: string;\n}\n"],"names":[],"mappings":";;AAYO,SAAS,oBAAA,CAAqB,MAAiB,QAAA,EAAsC;AAC1F,EAAA,OAAO,4BAAA,CAA6B,MAAM,QAAQ,CAAA;AACpD;AAOO,MAAM,mBAAA,GAAsB;AAyD5B,SAAS,YAAY,IAAA,EAAmC;AAC7D,EAAA,OAAO,SAAS,MAAA,KAAc,IAAA,CAAK,WAAW,CAAA,IAAK,IAAA,KAAS,OAAO,IAAA,KAAS,aAAA,CAAA;AAC9E;AAGO,SAAS,kBAAA,CAAmB,GAAuB,CAAA,EAAgC;AACxF,EAAA,OAAO,CAAA,KAAM,CAAA,IAAK,CAAA,OAAA,EAAU,CAAC,OAAO,CAAA,IAAK,CAAA,KAAM,CAAA,OAAA,EAAU,CAAC,CAAA,CAAA,IAAO,WAAA,CAAY,CAAC,CAAA,IAAK,YAAY,CAAC,CAAA;AAClG;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { localVariablesAsyncIntegration } from './local-variables-async.js';
|
|
2
|
+
|
|
3
|
+
const localVariablesIntegration = (options = {}) => {
|
|
4
|
+
return localVariablesAsyncIntegration(options);
|
|
5
|
+
};
|
|
6
|
+
|
|
7
|
+
export { localVariablesIntegration };
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/integrations/local-variables/index.ts"],"sourcesContent":["import type { Integration } from '@sentry/core';\nimport type { LocalVariablesIntegrationOptions } from './common';\nimport { localVariablesAsyncIntegration } from './local-variables-async';\n\nexport const localVariablesIntegration = (options: LocalVariablesIntegrationOptions = {}): Integration => {\n return localVariablesAsyncIntegration(options);\n};\n"],"names":[],"mappings":";;AAIO,MAAM,yBAAA,GAA4B,CAAC,OAAA,GAA4C,EAAC,KAAmB;AACxG,EAAA,OAAO,+BAA+B,OAAO,CAAA;AAC/C;;;;"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Worker } from 'node:worker_threads';
|
|
2
|
+
import { defineIntegration, debug, getClient } from '@sentry/core';
|
|
3
|
+
import { isDebuggerEnabled } from '../../utils/debug.js';
|
|
4
|
+
import { LOCAL_VARIABLES_KEY, functionNamesMatch, filterFrameVariables } from './common.js';
|
|
5
|
+
|
|
6
|
+
const base64WorkerScript = "LyohIEBzZW50cnkvbm9kZSAxMS4wLjAtYWxwaGEuMCAoNDc0YTVkYykgfCBodHRwczovL2dpdGh1Yi5jb20vZ2V0c2VudHJ5L3NlbnRyeS1qYXZhc2NyaXB0ICovCmltcG9ydHtTZXNzaW9uIGFzIGV9ZnJvbSJub2RlOmluc3BlY3Rvci9wcm9taXNlcyI7aW1wb3J0e3dvcmtlckRhdGEgYXMgdH1mcm9tIm5vZGU6d29ya2VyX3RocmVhZHMiO2NvbnN0IG49Z2xvYmFsVGhpcyxpPXt9O2NvbnN0IG89Il9fU0VOVFJZX0VSUk9SX0xPQ0FMX1ZBUklBQkxFU19fIjtjb25zdCBhPXQ7ZnVuY3Rpb24gcyguLi5lKXthLmRlYnVnJiZmdW5jdGlvbihlKXtpZighKCJjb25zb2xlImluIG4pKXJldHVybiBlKCk7Y29uc3QgdD1uLmNvbnNvbGUsbz17fSxhPU9iamVjdC5rZXlz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2NDAwJiYobz04NjQwMCksYT1vKTooYS09MSwwPT09YSYmdCgpKSxpPTB9LDFlMykudW5yZWYoKSwoKT0+e2krPTF9fShlLGFzeW5jKCk9PntzKCJSYXRlLWxpbWl0IGxpZnRlZC4iKSxhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6ImFsbCJ9KX0sYXN5bmMgZT0+e3MoYFJhdGUtbGltaXQgZXhjZWVkZWQuIERpc2FibGluZyBjYXB0dXJpbmcgb2YgY2F1Z2h0IGV4Y2VwdGlvbnMgZm9yICR7ZX0gc2Vjb25kcy5gKSxhd2FpdCB0LnBvc3QoIkRlYnVnZ2VyLnNldFBhdXNlT25FeGNlcHRpb25zIix7c3RhdGU6InVuY2F1Z2h0In0pfSl9fSkoKS5jYXRjaChlPT57cygiRmFpbGVkIHRvIHN0YXJ0IGRlYnVnZ2VyIixlKX0pLHNldEludGVydmFsKCgpPT57fSwxZTQpOw==";
|
|
7
|
+
function log(...args) {
|
|
8
|
+
debug.log("[LocalVariables]", ...args);
|
|
9
|
+
}
|
|
10
|
+
const localVariablesAsyncIntegration = defineIntegration(((integrationOptions = {}) => {
|
|
11
|
+
function addLocalVariablesToException(exception, localVariables, behavior) {
|
|
12
|
+
if (behavior === false) {
|
|
13
|
+
return;
|
|
14
|
+
}
|
|
15
|
+
const frames = (exception.stacktrace?.frames || []).filter((frame) => frame.function !== "new Promise");
|
|
16
|
+
for (let i = 0; i < frames.length; i++) {
|
|
17
|
+
const frameIndex = frames.length - i - 1;
|
|
18
|
+
const frameLocalVariables = localVariables[i];
|
|
19
|
+
const frame = frames[frameIndex];
|
|
20
|
+
if (!frame || !frameLocalVariables) {
|
|
21
|
+
break;
|
|
22
|
+
}
|
|
23
|
+
if (
|
|
24
|
+
// We need to have vars to add
|
|
25
|
+
frameLocalVariables.vars === void 0 || // Only skip out-of-app frames if includeOutOfAppFrames is not true
|
|
26
|
+
frame.in_app === false && integrationOptions.includeOutOfAppFrames !== true || // The function names need to match
|
|
27
|
+
!functionNamesMatch(frame.function, frameLocalVariables.function)
|
|
28
|
+
) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
frame.vars = filterFrameVariables(frameLocalVariables.vars, behavior);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function addLocalVariablesToEvent(event, hint) {
|
|
35
|
+
if (hint.originalException && typeof hint.originalException === "object" && LOCAL_VARIABLES_KEY in hint.originalException && Array.isArray(hint.originalException[LOCAL_VARIABLES_KEY])) {
|
|
36
|
+
const behavior = getClient()?.getDataCollectionOptions().stackFrameVariables ?? true;
|
|
37
|
+
for (const exception of event.exception?.values || []) {
|
|
38
|
+
addLocalVariablesToException(exception, hint.originalException[LOCAL_VARIABLES_KEY], behavior);
|
|
39
|
+
}
|
|
40
|
+
hint.originalException[LOCAL_VARIABLES_KEY] = void 0;
|
|
41
|
+
}
|
|
42
|
+
return event;
|
|
43
|
+
}
|
|
44
|
+
async function startInspector() {
|
|
45
|
+
const inspector = await import('node:inspector');
|
|
46
|
+
if (!inspector.url()) {
|
|
47
|
+
inspector.open(0);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function startWorker(options) {
|
|
51
|
+
const worker = new Worker(new URL(`data:application/javascript;base64,${base64WorkerScript}`), {
|
|
52
|
+
workerData: options,
|
|
53
|
+
// We don't want any Node args to be passed to the worker
|
|
54
|
+
execArgv: [],
|
|
55
|
+
env: { ...process.env, NODE_OPTIONS: void 0 }
|
|
56
|
+
});
|
|
57
|
+
process.on("exit", () => {
|
|
58
|
+
worker.terminate();
|
|
59
|
+
});
|
|
60
|
+
worker.once("error", (err) => {
|
|
61
|
+
log("Worker error", err);
|
|
62
|
+
});
|
|
63
|
+
worker.once("exit", (code) => {
|
|
64
|
+
log("Worker exit", code);
|
|
65
|
+
});
|
|
66
|
+
worker.unref();
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
name: "LocalVariablesAsync",
|
|
70
|
+
async setup(client) {
|
|
71
|
+
const clientOptions = client.getOptions();
|
|
72
|
+
if (!clientOptions.includeLocalVariables) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
if (await isDebuggerEnabled()) {
|
|
76
|
+
debug.warn("Local variables capture has been disabled because the debugger was already enabled");
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
const options = {
|
|
80
|
+
...integrationOptions,
|
|
81
|
+
debug: debug.isEnabled()
|
|
82
|
+
};
|
|
83
|
+
startInspector().then(
|
|
84
|
+
() => {
|
|
85
|
+
try {
|
|
86
|
+
startWorker(options);
|
|
87
|
+
} catch (e) {
|
|
88
|
+
debug.error("Failed to start worker", e);
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
(e) => {
|
|
92
|
+
debug.error("Failed to start inspector", e);
|
|
93
|
+
}
|
|
94
|
+
);
|
|
95
|
+
},
|
|
96
|
+
processEvent(event, hint) {
|
|
97
|
+
return addLocalVariablesToEvent(event, hint);
|
|
98
|
+
}
|
|
99
|
+
};
|
|
100
|
+
}));
|
|
101
|
+
|
|
102
|
+
export { base64WorkerScript, localVariablesAsyncIntegration };
|
|
103
|
+
//# sourceMappingURL=local-variables-async.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-variables-async.js","sources":["../../../../src/integrations/local-variables/local-variables-async.ts"],"sourcesContent":["import { Worker } from 'node:worker_threads';\nimport type { CollectBehavior, Event, EventHint, Exception, IntegrationFn } from '@sentry/core';\nimport { debug, defineIntegration, getClient } from '@sentry/core';\nimport type { NodeClient } from '../../sdk/client';\nimport { isDebuggerEnabled } from '../../utils/debug';\nimport type { FrameVariables, LocalVariablesIntegrationOptions, LocalVariablesWorkerArgs } from './common';\nimport { filterFrameVariables, functionNamesMatch, LOCAL_VARIABLES_KEY } from './common';\n\n// This string is a placeholder that gets overwritten with the worker code.\nexport const base64WorkerScript = '###LocalVariablesWorkerScript###';\n\nfunction log(...args: unknown[]): void {\n debug.log('[LocalVariables]', ...args);\n}\n\n/**\n * Adds local variables to exception frames\n */\nexport const localVariablesAsyncIntegration = defineIntegration(((\n integrationOptions: LocalVariablesIntegrationOptions = {},\n) => {\n function addLocalVariablesToException(\n exception: Exception,\n localVariables: FrameVariables[],\n behavior: CollectBehavior,\n ): void {\n // When disabled, nothing is collected so we don't attach empty `vars` to frames\n if (behavior === false) {\n return;\n }\n\n // Filter out frames where the function name is `new Promise` since these are in the error.stack frames\n // but do not appear in the debugger call frames\n const frames = (exception.stacktrace?.frames || []).filter(frame => frame.function !== 'new Promise');\n\n for (let i = 0; i < frames.length; i++) {\n // Sentry frames are in reverse order\n const frameIndex = frames.length - i - 1;\n\n const frameLocalVariables = localVariables[i];\n const frame = frames[frameIndex];\n\n if (!frame || !frameLocalVariables) {\n // Drop out if we run out of frames to match up\n break;\n }\n\n if (\n // We need to have vars to add\n frameLocalVariables.vars === undefined ||\n // Only skip out-of-app frames if includeOutOfAppFrames is not true\n (frame.in_app === false && integrationOptions.includeOutOfAppFrames !== true) ||\n // The function names need to match\n !functionNamesMatch(frame.function, frameLocalVariables.function)\n ) {\n continue;\n }\n\n frame.vars = filterFrameVariables(frameLocalVariables.vars, behavior);\n }\n }\n\n function addLocalVariablesToEvent(event: Event, hint: EventHint): Event {\n if (\n hint.originalException &&\n typeof hint.originalException === 'object' &&\n LOCAL_VARIABLES_KEY in hint.originalException &&\n Array.isArray(hint.originalException[LOCAL_VARIABLES_KEY])\n ) {\n const behavior = getClient()?.getDataCollectionOptions().stackFrameVariables ?? true;\n\n for (const exception of event.exception?.values || []) {\n addLocalVariablesToException(exception, hint.originalException[LOCAL_VARIABLES_KEY], behavior);\n }\n\n hint.originalException[LOCAL_VARIABLES_KEY] = undefined;\n }\n\n return event;\n }\n\n async function startInspector(): Promise<void> {\n // We load inspector dynamically because on some platforms Node is built without inspector support\n const inspector = await import('node:inspector');\n if (!inspector.url()) {\n inspector.open(0);\n }\n }\n\n function startWorker(options: LocalVariablesWorkerArgs): void {\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 worker.once('error', (err: Error) => {\n log('Worker error', err);\n });\n\n worker.once('exit', (code: number) => {\n log('Worker exit', code);\n });\n\n // Ensure this thread can't block app exit\n worker.unref();\n }\n\n return {\n name: 'LocalVariablesAsync' as const,\n async setup(client: NodeClient) {\n const clientOptions = client.getOptions();\n\n if (!clientOptions.includeLocalVariables) {\n return;\n }\n\n if (await isDebuggerEnabled()) {\n debug.warn('Local variables capture has been disabled because the debugger was already enabled');\n return;\n }\n\n const options: LocalVariablesWorkerArgs = {\n ...integrationOptions,\n debug: debug.isEnabled(),\n };\n\n startInspector().then(\n () => {\n try {\n startWorker(options);\n } catch (e) {\n debug.error('Failed to start worker', e);\n }\n },\n e => {\n debug.error('Failed to start inspector', e);\n },\n );\n },\n processEvent(event: Event, hint: EventHint): Event {\n return addLocalVariablesToEvent(event, hint);\n },\n };\n}) satisfies IntegrationFn);\n"],"names":[],"mappings":";;;;;AASO,MAAM,kBAAA,GAAqB;AAElC,SAAS,OAAO,IAAA,EAAuB;AACrC,EAAA,KAAA,CAAM,GAAA,CAAI,kBAAA,EAAoB,GAAG,IAAI,CAAA;AACvC;AAKO,MAAM,8BAAA,GAAiC,iBAAA,EAAmB,CAC/D,kBAAA,GAAuD,EAAC,KACrD;AACH,EAAA,SAAS,4BAAA,CACP,SAAA,EACA,cAAA,EACA,QAAA,EACM;AAEN,IAAA,IAAI,aAAa,KAAA,EAAO;AACtB,MAAA;AAAA,IACF;AAIA,IAAA,MAAM,MAAA,GAAA,CAAU,SAAA,CAAU,UAAA,EAAY,MAAA,IAAU,IAAI,MAAA,CAAO,CAAA,KAAA,KAAS,KAAA,CAAM,QAAA,KAAa,a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C,QAAA;AAAA,MACF;AAEA,MAAA,IAAI,MAAM,mBAAkB,EAAG;AAC7B,QAAA,KAAA,CAAM,KAAK,oFAAoF,CAAA;AAC/F,QAAA;AAAA,MACF;AAEA,MAAA,MAAM,OAAA,GAAoC;AAAA,QACxC,GAAG,kBAAA;AAAA,QACH,KAAA,EAAO,MAAM,SAAA;AAAU,OACzB;AAEA,MAAA,cAAA,EAAe,CAAE,IAAA;AAAA,QACf,MAAM;AACJ,UAAA,IAAI;AACF,YAAA,WAAA,CAAY,OAAO,CAAA;AAAA,UACrB,SAAS,CAAA,EAAG;AACV,YAAA,KAAA,CAAM,KAAA,CAAM,0BAA0B,CAAC,CAAA;AAAA,UACzC;AAAA,QACF,CAAA;AAAA,QACA,CAAA,CAAA,KAAK;AACH,UAAA,KAAA,CAAM,KAAA,CAAM,6BAA6B,CAAC,CAAA;AAAA,QAC5C;AAAA,OACF;AAAA,IACF,CAAA;AAAA,IACA,YAAA,CAAa,OAAc,IAAA,EAAwB;AACjD,MAAA,OAAO,wBAAA,CAAyB,OAAO,IAAI,CAAA;AAAA,IAC7C;AAAA,GACF;AACF,CAAA;;;;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/*! @sentry/node 11.0.0-alpha.0 (474a5dc) | https://github.com/getsentry/sentry-javascript */
|
|
2
|
+
import{Session as e}from"node:inspector/promises";import{workerData as t}from"node:worker_threads";const n=globalThis,i={};const o="__SENTRY_ERROR_LOCAL_VARIABLES__";const a=t;function s(...e){a.debug&&function(e){if(!("console"in n))return e();const t=n.console,o={},a=Object.keys(i);a.forEach(e=>{const n=i[e];o[e]=t[e],t[e]=n});try{return e()}finally{a.forEach(e=>{t[e]=o[e]})}}(()=>console.log("[LocalVariables Worker]",...e))}async function c(e,t,n,i){const o=await e.post("Runtime.getProperties",{objectId:t,ownProperties:!0});i[n]=o.result.filter(e=>"length"!==e.name&&!isNaN(parseInt(e.name,10))).sort((e,t)=>parseInt(e.name,10)-parseInt(t.name,10)).map(e=>e.value?.value)}async function r(e,t,n,i){const o=await e.post("Runtime.getProperties",{objectId:t,ownProperties:!0});i[n]=o.result.map(e=>[e.name,e.value?.value]).reduce((e,[t,n])=>(e[t]=n,e),{})}function u(e,t){e.value&&("value"in e.value?void 0===e.value.value||null===e.value.value?t[e.name]=`<${e.value.value}>`:t[e.name]=e.value.value:"description"in e.value&&"function"!==e.value.type?t[e.name]=`<${e.value.description}>`:"undefined"===e.value.type&&(t[e.name]="<undefined>"))}async function l(e,t){const n=await e.post("Runtime.getProperties",{objectId:t,ownProperties:!0}),i={};for(const t of n.result)if(t.value?.objectId&&"Array"===t.value.className){const n=t.value.objectId;await c(e,n,t.name,i)}else if(t.value?.objectId&&"Object"===t.value.className){const n=t.value.objectId;await r(e,n,t.name,i)}else t.value&&u(t,i);return i}let f;(async function(){const t=new e;t.connectToMainThread(),s("Connected to main thread");let n=!1;t.on("Debugger.resumed",()=>{n=!1}),t.on("Debugger.paused",e=>{n=!0,async function(e,{reason:t,data:{objectId:n},callFrames:i}){if("exception"!==t&&"promiseRejection"!==t)return;if(f?.(),null==n)return;const a=[];for(let t=0;t<i.length;t++){const{scopeChain:n,functionName:o,this:s}=i[t],c=n.find(e=>"local"===e.type),r="global"!==s.className&&s.className?`${s.className}.${o}`:o;if(void 0===c?.object.objectId)a[t]={function:r};else{const n=await l(e,c.object.objectId);a[t]={function:r,vars:n}}}await e.post("Runtime.callFunctionOn",{functionDeclaration:`function() { this.${o} = this.${o} || ${JSON.stringify(a)}; }`,silent:!0,objectId:n}),await e.post("Runtime.releaseObject",{objectId:n})}(t,e.params).then(async()=>{n&&await t.post("Debugger.resume")},async e=>{n&&await t.post("Debugger.resume")})}),await t.post("Debugger.enable");const i=!1!==a.captureAllExceptions;if(await t.post("Debugger.setPauseOnExceptions",{state:i?"all":"uncaught"}),i){const e=a.maxExceptionsPerSecond||50;f=function(e,t,n){let i=0,o=5,a=0;return setInterval(()=>{0===a?i>e&&(o*=2,n(o),o>86400&&(o=86400),a=o):(a-=1,0===a&&t()),i=0},1e3).unref(),()=>{i+=1}}(e,async()=>{s("Rate-limit lifted."),await t.post("Debugger.setPauseOnExceptions",{state:"all"})},async e=>{s(`Rate-limit exceeded. Disabling capturing of caught exceptions for ${e} seconds.`),await t.post("Debugger.setPauseOnExceptions",{state:"uncaught"})})}})().catch(e=>{s("Failed to start debugger",e)}),setInterval(()=>{},1e4);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { readFileSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
import { GLOBAL_OBJ } from '@sentry/core';
|
|
4
|
+
|
|
5
|
+
let moduleCache;
|
|
6
|
+
const INTEGRATION_NAME = "Modules";
|
|
7
|
+
function getServerModules() {
|
|
8
|
+
if (typeof __SENTRY_SERVER_MODULES__ !== "undefined") {
|
|
9
|
+
return __SENTRY_SERVER_MODULES__;
|
|
10
|
+
}
|
|
11
|
+
return GLOBAL_OBJ.__SENTRY_SERVER_MODULES__ ?? {};
|
|
12
|
+
}
|
|
13
|
+
const _modulesIntegration = (() => {
|
|
14
|
+
return {
|
|
15
|
+
name: INTEGRATION_NAME,
|
|
16
|
+
processEvent(event) {
|
|
17
|
+
event.modules = {
|
|
18
|
+
...event.modules,
|
|
19
|
+
..._getModules()
|
|
20
|
+
};
|
|
21
|
+
return event;
|
|
22
|
+
},
|
|
23
|
+
getModules: _getModules
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
const modulesIntegration = _modulesIntegration;
|
|
27
|
+
function collectModules() {
|
|
28
|
+
return {
|
|
29
|
+
...getServerModules(),
|
|
30
|
+
...getModulesFromPackageJson(),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
function _getModules() {
|
|
34
|
+
if (!moduleCache) {
|
|
35
|
+
moduleCache = collectModules();
|
|
36
|
+
}
|
|
37
|
+
return moduleCache;
|
|
38
|
+
}
|
|
39
|
+
function getPackageJson() {
|
|
40
|
+
try {
|
|
41
|
+
const filePath = join(process.cwd(), "package.json");
|
|
42
|
+
const packageJson = JSON.parse(readFileSync(filePath, "utf8"));
|
|
43
|
+
return packageJson;
|
|
44
|
+
} catch {
|
|
45
|
+
return {};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function getModulesFromPackageJson() {
|
|
49
|
+
const packageJson = getPackageJson();
|
|
50
|
+
return {
|
|
51
|
+
...packageJson.dependencies,
|
|
52
|
+
...packageJson.devDependencies
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { modulesIntegration };
|
|
57
|
+
//# sourceMappingURL=modules.js.map
|