@sentry/node 7.104.0 → 8.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +114 -38
- package/cjs/cron/index.js +15 -0
- package/cjs/cron/index.js.map +1 -0
- package/cjs/index.js +79 -98
- package/cjs/index.js.map +1 -1
- package/cjs/integrations/anr/index.js +4 -30
- package/cjs/integrations/anr/index.js.map +1 -1
- package/cjs/integrations/anr/worker-script.js +2 -2
- package/cjs/integrations/console.js +2 -13
- package/cjs/integrations/console.js.map +1 -1
- package/cjs/integrations/context.js +2 -16
- package/cjs/integrations/context.js.map +1 -1
- package/cjs/integrations/contextlines.js +6 -23
- package/cjs/integrations/contextlines.js.map +1 -1
- package/cjs/integrations/http.js +103 -354
- package/cjs/integrations/http.js.map +1 -1
- package/cjs/integrations/local-variables/index.js +0 -10
- package/cjs/integrations/local-variables/index.js.map +1 -1
- package/cjs/integrations/local-variables/local-variables-sync.js +29 -24
- package/cjs/integrations/local-variables/local-variables-sync.js.map +1 -1
- package/cjs/integrations/modules.js +19 -30
- package/cjs/integrations/modules.js.map +1 -1
- package/cjs/integrations/node-fetch.js +82 -0
- package/cjs/integrations/node-fetch.js.map +1 -0
- package/cjs/integrations/onuncaughtexception.js +15 -30
- package/cjs/integrations/onuncaughtexception.js.map +1 -1
- package/cjs/integrations/onunhandledrejection.js +3 -17
- package/cjs/integrations/onunhandledrejection.js.map +1 -1
- package/cjs/integrations/spotlight.js +4 -22
- package/cjs/integrations/spotlight.js.map +1 -1
- package/cjs/integrations/tracing/express.js +103 -0
- package/cjs/integrations/tracing/express.js.map +1 -0
- package/cjs/integrations/tracing/fastify.js +33 -0
- package/cjs/integrations/tracing/fastify.js.map +1 -0
- package/cjs/integrations/tracing/graphql.js +34 -0
- package/cjs/integrations/tracing/graphql.js.map +1 -0
- package/cjs/integrations/tracing/hapi/index.js +81 -0
- package/cjs/integrations/tracing/hapi/index.js.map +1 -0
- package/cjs/integrations/tracing/index.js +37 -0
- package/cjs/integrations/tracing/index.js.map +1 -0
- package/cjs/integrations/tracing/koa.js +21 -0
- package/cjs/integrations/tracing/koa.js.map +1 -0
- package/cjs/integrations/tracing/mongo.js +33 -0
- package/cjs/integrations/tracing/mongo.js.map +1 -0
- package/cjs/integrations/tracing/mongoose.js +33 -0
- package/cjs/integrations/tracing/mongoose.js.map +1 -0
- package/cjs/integrations/tracing/mysql.js +26 -0
- package/cjs/integrations/tracing/mysql.js.map +1 -0
- package/cjs/integrations/tracing/mysql2.js +33 -0
- package/cjs/integrations/tracing/mysql2.js.map +1 -0
- package/cjs/integrations/tracing/nest.js +26 -0
- package/cjs/integrations/tracing/nest.js.map +1 -0
- package/cjs/integrations/tracing/postgres.js +34 -0
- package/cjs/integrations/tracing/postgres.js.map +1 -0
- package/cjs/integrations/tracing/prisma.js +33 -0
- package/cjs/integrations/tracing/prisma.js.map +1 -0
- package/cjs/nodeVersion.js +5 -1
- package/cjs/nodeVersion.js.map +1 -1
- package/cjs/otel/contextManager.js +16 -0
- package/cjs/otel/contextManager.js.map +1 -0
- package/cjs/proxy/index.js +1 -2
- package/cjs/proxy/index.js.map +1 -1
- package/cjs/sdk/api.js +74 -0
- package/cjs/sdk/api.js.map +1 -0
- package/cjs/sdk/client.js +57 -0
- package/cjs/sdk/client.js.map +1 -0
- package/cjs/sdk/hub.js +104 -0
- package/cjs/sdk/hub.js.map +1 -0
- package/cjs/sdk/init.js +224 -0
- package/cjs/sdk/init.js.map +1 -0
- package/cjs/sdk/initOtel.js +70 -0
- package/cjs/sdk/initOtel.js.map +1 -0
- package/cjs/sdk/scope.js +18 -0
- package/cjs/sdk/scope.js.map +1 -0
- package/cjs/transports/http.js +2 -3
- package/cjs/transports/http.js.map +1 -1
- package/cjs/utils/addOriginToSpan.js +11 -0
- package/cjs/utils/addOriginToSpan.js.map +1 -0
- package/cjs/{integrations/utils → utils}/errorhandling.js +2 -1
- package/cjs/utils/errorhandling.js.map +1 -0
- package/cjs/utils/getRequestUrl.js +18 -0
- package/cjs/utils/getRequestUrl.js.map +1 -0
- package/cjs/utils/module.js.map +1 -0
- package/esm/cron/index.js +13 -0
- package/esm/cron/index.js.map +1 -0
- package/esm/index.js +28 -48
- package/esm/index.js.map +1 -1
- package/esm/integrations/anr/index.js +7 -32
- package/esm/integrations/anr/index.js.map +1 -1
- package/esm/integrations/anr/worker-script.js +2 -2
- package/esm/integrations/console.js +4 -14
- package/esm/integrations/console.js.map +1 -1
- package/esm/integrations/context.js +4 -17
- package/esm/integrations/context.js.map +1 -1
- package/esm/integrations/contextlines.js +8 -25
- package/esm/integrations/contextlines.js.map +1 -1
- package/esm/integrations/http.js +105 -353
- package/esm/integrations/http.js.map +1 -1
- package/esm/integrations/local-variables/index.js +2 -11
- package/esm/integrations/local-variables/index.js.map +1 -1
- package/esm/integrations/local-variables/local-variables-sync.js +31 -25
- package/esm/integrations/local-variables/local-variables-sync.js.map +1 -1
- package/esm/integrations/modules.js +21 -31
- package/esm/integrations/modules.js.map +1 -1
- package/esm/integrations/node-fetch.js +80 -0
- package/esm/integrations/node-fetch.js.map +1 -0
- package/esm/integrations/onuncaughtexception.js +17 -31
- package/esm/integrations/onuncaughtexception.js.map +1 -1
- package/esm/integrations/onunhandledrejection.js +5 -18
- package/esm/integrations/onunhandledrejection.js.map +1 -1
- package/esm/integrations/spotlight.js +3 -20
- package/esm/integrations/spotlight.js.map +1 -1
- package/esm/integrations/tracing/express.js +96 -0
- package/esm/integrations/tracing/express.js.map +1 -0
- package/esm/integrations/tracing/fastify.js +31 -0
- package/esm/integrations/tracing/fastify.js.map +1 -0
- package/esm/integrations/tracing/graphql.js +32 -0
- package/esm/integrations/tracing/graphql.js.map +1 -0
- package/esm/integrations/tracing/hapi/index.js +77 -0
- package/esm/integrations/tracing/hapi/index.js.map +1 -0
- package/esm/integrations/tracing/index.js +35 -0
- package/esm/integrations/tracing/index.js.map +1 -0
- package/esm/integrations/tracing/koa.js +19 -0
- package/esm/integrations/tracing/koa.js.map +1 -0
- package/esm/integrations/tracing/mongo.js +31 -0
- package/esm/integrations/tracing/mongo.js.map +1 -0
- package/esm/integrations/tracing/mongoose.js +31 -0
- package/esm/integrations/tracing/mongoose.js.map +1 -0
- package/esm/integrations/tracing/mysql.js +24 -0
- package/esm/integrations/tracing/mysql.js.map +1 -0
- package/esm/integrations/tracing/mysql2.js +31 -0
- package/esm/integrations/tracing/mysql2.js.map +1 -0
- package/esm/integrations/tracing/nest.js +24 -0
- package/esm/integrations/tracing/nest.js.map +1 -0
- package/esm/integrations/tracing/postgres.js +32 -0
- package/esm/integrations/tracing/postgres.js.map +1 -0
- package/esm/integrations/tracing/prisma.js +31 -0
- package/esm/integrations/tracing/prisma.js.map +1 -0
- package/esm/nodeVersion.js +5 -2
- package/esm/nodeVersion.js.map +1 -1
- package/esm/otel/contextManager.js +14 -0
- package/esm/otel/contextManager.js.map +1 -0
- package/esm/proxy/index.js +0 -1
- package/esm/proxy/index.js.map +1 -1
- package/esm/sdk/api.js +69 -0
- package/esm/sdk/api.js.map +1 -0
- package/esm/sdk/client.js +52 -0
- package/esm/sdk/client.js.map +1 -0
- package/esm/sdk/hub.js +102 -0
- package/esm/sdk/hub.js.map +1 -0
- package/esm/sdk/init.js +221 -0
- package/esm/sdk/init.js.map +1 -0
- package/esm/sdk/initOtel.js +67 -0
- package/esm/sdk/initOtel.js.map +1 -0
- package/esm/sdk/scope.js +16 -0
- package/esm/sdk/scope.js.map +1 -0
- package/esm/transports/http.js +0 -1
- package/esm/transports/http.js.map +1 -1
- package/esm/utils/addOriginToSpan.js +9 -0
- package/esm/utils/addOriginToSpan.js.map +1 -0
- package/esm/{integrations/utils → utils}/errorhandling.js +2 -1
- package/esm/utils/errorhandling.js.map +1 -0
- package/esm/utils/getRequestUrl.js +16 -0
- package/esm/utils/getRequestUrl.js.map +1 -0
- package/esm/utils/module.js.map +1 -0
- package/package.json +31 -23
- package/types/cron/index.d.ts +10 -0
- package/types/cron/index.d.ts.map +1 -0
- package/types/index.d.ts +30 -142
- package/types/index.d.ts.map +1 -1
- package/types/integrations/anr/index.d.ts +0 -15
- package/types/integrations/anr/index.d.ts.map +1 -1
- package/types/integrations/console.d.ts +2 -8
- package/types/integrations/console.d.ts.map +1 -1
- package/types/integrations/context.d.ts +3 -18
- package/types/integrations/context.d.ts.map +1 -1
- package/types/integrations/contextlines.d.ts +8 -10
- package/types/integrations/contextlines.d.ts.map +1 -1
- package/types/integrations/http.d.ts +8 -89
- package/types/integrations/http.d.ts.map +1 -1
- package/types/integrations/local-variables/index.d.ts +0 -11
- package/types/integrations/local-variables/index.d.ts.map +1 -1
- package/types/integrations/local-variables/local-variables-async.d.ts +1 -1
- package/types/integrations/local-variables/local-variables-async.d.ts.map +1 -1
- package/types/integrations/local-variables/local-variables-sync.d.ts +1 -1
- package/types/integrations/local-variables/local-variables-sync.d.ts.map +1 -1
- package/types/integrations/modules.d.ts +1 -7
- package/types/integrations/modules.d.ts.map +1 -1
- package/types/integrations/node-fetch.d.ts +15 -0
- package/types/integrations/node-fetch.d.ts.map +1 -0
- package/types/integrations/onuncaughtexception.d.ts +3 -12
- package/types/integrations/onuncaughtexception.d.ts.map +1 -1
- package/types/integrations/onunhandledrejection.d.ts +3 -10
- package/types/integrations/onunhandledrejection.d.ts.map +1 -1
- package/types/integrations/spotlight.d.ts +1 -10
- package/types/integrations/spotlight.d.ts.map +1 -1
- package/types/integrations/tracing/express.d.ts +37 -0
- package/types/integrations/tracing/express.d.ts.map +1 -0
- package/types/integrations/tracing/fastify.d.ts +7 -0
- package/types/integrations/tracing/fastify.d.ts.map +1 -0
- package/types/integrations/tracing/graphql.d.ts +7 -0
- package/types/integrations/tracing/graphql.d.ts.map +1 -0
- package/types/integrations/tracing/hapi/index.d.ts +18 -0
- package/types/integrations/tracing/hapi/index.d.ts.map +1 -0
- package/types/integrations/{hapi → tracing/hapi}/types.d.ts +1 -2
- package/types/integrations/tracing/hapi/types.d.ts.map +1 -0
- package/types/integrations/tracing/index.d.ts +6 -0
- package/types/integrations/tracing/index.d.ts.map +1 -0
- package/types/integrations/tracing/koa.d.ts +2 -0
- package/types/integrations/tracing/koa.d.ts.map +1 -0
- package/types/integrations/tracing/mongo.d.ts +7 -0
- package/types/integrations/tracing/mongo.d.ts.map +1 -0
- package/types/integrations/tracing/mongoose.d.ts +7 -0
- package/types/integrations/tracing/mongoose.d.ts.map +1 -0
- package/types/integrations/tracing/mysql.d.ts +7 -0
- package/types/integrations/tracing/mysql.d.ts.map +1 -0
- package/types/integrations/tracing/mysql2.d.ts +7 -0
- package/types/integrations/tracing/mysql2.d.ts.map +1 -0
- package/types/integrations/tracing/nest.d.ts +7 -0
- package/types/integrations/tracing/nest.d.ts.map +1 -0
- package/types/integrations/tracing/postgres.d.ts +7 -0
- package/types/integrations/tracing/postgres.d.ts.map +1 -0
- package/types/integrations/tracing/prisma.d.ts +11 -0
- package/types/integrations/tracing/prisma.d.ts.map +1 -0
- package/types/nodeVersion.d.ts +3 -3
- package/types/nodeVersion.d.ts.map +1 -1
- package/types/otel/contextManager.d.ts +10 -0
- package/types/otel/contextManager.d.ts.map +1 -0
- package/types/proxy/helpers.d.ts +0 -1
- package/types/proxy/helpers.d.ts.map +1 -1
- package/types/proxy/index.d.ts +0 -1
- package/types/proxy/index.d.ts.map +1 -1
- package/types/sdk/api.d.ts +18 -0
- package/types/sdk/api.d.ts.map +1 -0
- package/types/sdk/client.d.ts +17 -0
- package/types/sdk/client.d.ts.map +1 -0
- package/types/sdk/globals.d.ts +6 -0
- package/types/sdk/globals.d.ts.map +1 -0
- package/types/sdk/hub.d.ts +7 -0
- package/types/sdk/hub.d.ts.map +1 -0
- package/types/sdk/init.d.ts +9 -0
- package/types/sdk/init.d.ts.map +1 -0
- package/types/sdk/initOtel.d.ts +9 -0
- package/types/sdk/initOtel.d.ts.map +1 -0
- package/types/sdk/scope.d.ts +7 -0
- package/types/sdk/scope.d.ts.map +1 -0
- package/types/transports/http-module.d.ts +2 -5
- package/types/transports/http-module.d.ts.map +1 -1
- package/types/transports/http.d.ts.map +1 -1
- package/types/types.d.ts +18 -25
- package/types/types.d.ts.map +1 -1
- package/types/utils/addOriginToSpan.d.ts +5 -0
- package/types/utils/addOriginToSpan.d.ts.map +1 -0
- package/types/utils/errorhandling.d.ts.map +1 -0
- package/types/utils/getRequestUrl.d.ts +5 -0
- package/types/utils/getRequestUrl.d.ts.map +1 -0
- package/types/utils/module.d.ts.map +1 -0
- package/types/utils/prepareEvent.d.ts +17 -0
- package/types/utils/prepareEvent.d.ts.map +1 -0
- package/types-ts3.8/cron/index.d.ts +10 -0
- package/types-ts3.8/index.d.ts +30 -142
- package/types-ts3.8/integrations/anr/index.d.ts +0 -15
- package/types-ts3.8/integrations/console.d.ts +2 -8
- package/types-ts3.8/integrations/context.d.ts +3 -18
- package/types-ts3.8/integrations/contextlines.d.ts +8 -10
- package/types-ts3.8/integrations/http.d.ts +8 -89
- package/types-ts3.8/integrations/local-variables/index.d.ts +0 -11
- package/types-ts3.8/integrations/local-variables/local-variables-async.d.ts +1 -1
- package/types-ts3.8/integrations/local-variables/local-variables-sync.d.ts +1 -1
- package/types-ts3.8/integrations/modules.d.ts +1 -7
- package/types-ts3.8/integrations/node-fetch.d.ts +15 -0
- package/types-ts3.8/integrations/onuncaughtexception.d.ts +3 -12
- package/types-ts3.8/integrations/onunhandledrejection.d.ts +3 -10
- package/types-ts3.8/integrations/spotlight.d.ts +1 -10
- package/types-ts3.8/integrations/tracing/express.d.ts +37 -0
- package/types-ts3.8/integrations/tracing/fastify.d.ts +7 -0
- package/types-ts3.8/integrations/tracing/graphql.d.ts +7 -0
- package/types-ts3.8/integrations/tracing/hapi/index.d.ts +18 -0
- package/types-ts3.8/integrations/{hapi → tracing/hapi}/types.d.ts +1 -2
- package/types-ts3.8/integrations/tracing/index.d.ts +6 -0
- package/types-ts3.8/integrations/tracing/koa.d.ts +2 -0
- package/types-ts3.8/integrations/tracing/mongo.d.ts +7 -0
- package/types-ts3.8/integrations/tracing/mongoose.d.ts +7 -0
- package/types-ts3.8/integrations/tracing/mysql.d.ts +7 -0
- package/types-ts3.8/integrations/tracing/mysql2.d.ts +7 -0
- package/types-ts3.8/integrations/tracing/nest.d.ts +7 -0
- package/types-ts3.8/integrations/tracing/postgres.d.ts +7 -0
- package/types-ts3.8/integrations/tracing/prisma.d.ts +11 -0
- package/types-ts3.8/nodeVersion.d.ts +3 -3
- package/types-ts3.8/otel/contextManager.d.ts +10 -0
- package/types-ts3.8/proxy/helpers.d.ts +0 -1
- package/types-ts3.8/proxy/index.d.ts +0 -1
- package/types-ts3.8/sdk/api.d.ts +18 -0
- package/types-ts3.8/sdk/client.d.ts +17 -0
- package/types-ts3.8/sdk/globals.d.ts +6 -0
- package/types-ts3.8/sdk/hub.d.ts +7 -0
- package/types-ts3.8/sdk/init.d.ts +9 -0
- package/types-ts3.8/sdk/initOtel.d.ts +9 -0
- package/types-ts3.8/sdk/scope.d.ts +7 -0
- package/types-ts3.8/transports/http-module.d.ts +2 -4
- package/types-ts3.8/types.d.ts +18 -25
- package/types-ts3.8/utils/addOriginToSpan.d.ts +5 -0
- package/types-ts3.8/utils/getRequestUrl.d.ts +5 -0
- package/types-ts3.8/utils/prepareEvent.d.ts +17 -0
- package/cjs/async/domain.js +0 -61
- package/cjs/async/domain.js.map +0 -1
- package/cjs/async/hooks.js +0 -50
- package/cjs/async/hooks.js.map +0 -1
- package/cjs/async/index.js +0 -22
- package/cjs/async/index.js.map +0 -1
- package/cjs/client.js +0 -39
- package/cjs/client.js.map +0 -1
- package/cjs/handlers.js +0 -340
- package/cjs/handlers.js.map +0 -1
- package/cjs/integrations/anr/legacy.js +0 -29
- package/cjs/integrations/anr/legacy.js.map +0 -1
- package/cjs/integrations/hapi/index.js +0 -161
- package/cjs/integrations/hapi/index.js.map +0 -1
- package/cjs/integrations/index.js +0 -32
- package/cjs/integrations/index.js.map +0 -1
- package/cjs/integrations/undici/index.js +0 -307
- package/cjs/integrations/undici/index.js.map +0 -1
- package/cjs/integrations/utils/errorhandling.js.map +0 -1
- package/cjs/integrations/utils/http.js +0 -225
- package/cjs/integrations/utils/http.js.map +0 -1
- package/cjs/module.js.map +0 -1
- package/cjs/requestDataDeprecated.js +0 -45
- package/cjs/requestDataDeprecated.js.map +0 -1
- package/cjs/sdk.js +0 -284
- package/cjs/sdk.js.map +0 -1
- package/cjs/tracing/index.js +0 -29
- package/cjs/tracing/index.js.map +0 -1
- package/cjs/tracing/integrations.js +0 -14
- package/cjs/tracing/integrations.js.map +0 -1
- package/cjs/utils.js +0 -45
- package/cjs/utils.js.map +0 -1
- package/esm/async/domain.js +0 -56
- package/esm/async/domain.js.map +0 -1
- package/esm/async/hooks.js +0 -45
- package/esm/async/hooks.js.map +0 -1
- package/esm/async/index.js +0 -20
- package/esm/async/index.js.map +0 -1
- package/esm/client.js +0 -37
- package/esm/client.js.map +0 -1
- package/esm/handlers.js +0 -330
- package/esm/handlers.js.map +0 -1
- package/esm/integrations/anr/legacy.js +0 -27
- package/esm/integrations/anr/legacy.js.map +0 -1
- package/esm/integrations/hapi/index.js +0 -156
- package/esm/integrations/hapi/index.js.map +0 -1
- package/esm/integrations/index.js +0 -16
- package/esm/integrations/index.js.map +0 -1
- package/esm/integrations/undici/index.js +0 -301
- package/esm/integrations/undici/index.js.map +0 -1
- package/esm/integrations/utils/errorhandling.js.map +0 -1
- package/esm/integrations/utils/http.js +0 -216
- package/esm/integrations/utils/http.js.map +0 -1
- package/esm/module.js.map +0 -1
- package/esm/requestDataDeprecated.js +0 -42
- package/esm/requestDataDeprecated.js.map +0 -1
- package/esm/sdk.js +0 -274
- package/esm/sdk.js.map +0 -1
- package/esm/tracing/index.js +0 -27
- package/esm/tracing/index.js.map +0 -1
- package/esm/tracing/integrations.js +0 -2
- package/esm/tracing/integrations.js.map +0 -1
- package/esm/utils.js +0 -43
- package/esm/utils.js.map +0 -1
- package/types/async/domain.d.ts +0 -5
- package/types/async/domain.d.ts.map +0 -1
- package/types/async/hooks.d.ts +0 -5
- package/types/async/hooks.d.ts.map +0 -1
- package/types/async/index.d.ts +0 -8
- package/types/async/index.d.ts.map +0 -1
- package/types/client.d.ts +0 -16
- package/types/client.d.ts.map +0 -1
- package/types/handlers.d.ts +0 -57
- package/types/handlers.d.ts.map +0 -1
- package/types/integrations/anr/legacy.d.ts +0 -22
- package/types/integrations/anr/legacy.d.ts.map +0 -1
- package/types/integrations/hapi/index.d.ts +0 -22
- package/types/integrations/hapi/index.d.ts.map +0 -1
- package/types/integrations/hapi/types.d.ts.map +0 -1
- package/types/integrations/index.d.ts +0 -14
- package/types/integrations/index.d.ts.map +0 -1
- package/types/integrations/undici/index.d.ts +0 -58
- package/types/integrations/undici/index.d.ts.map +0 -1
- package/types/integrations/undici/types.d.ts +0 -224
- package/types/integrations/undici/types.d.ts.map +0 -1
- package/types/integrations/utils/errorhandling.d.ts.map +0 -1
- package/types/integrations/utils/http.d.ts +0 -70
- package/types/integrations/utils/http.d.ts.map +0 -1
- package/types/module.d.ts.map +0 -1
- package/types/requestDataDeprecated.d.ts +0 -45
- package/types/requestDataDeprecated.d.ts.map +0 -1
- package/types/sdk.d.ts +0 -74
- package/types/sdk.d.ts.map +0 -1
- package/types/tracing/index.d.ts +0 -6
- package/types/tracing/index.d.ts.map +0 -1
- package/types/tracing/integrations.d.ts +0 -2
- package/types/tracing/integrations.d.ts.map +0 -1
- package/types/utils.d.ts +0 -10
- package/types/utils.d.ts.map +0 -1
- package/types-ts3.8/async/domain.d.ts +0 -5
- package/types-ts3.8/async/hooks.d.ts +0 -5
- package/types-ts3.8/async/index.d.ts +0 -8
- package/types-ts3.8/client.d.ts +0 -16
- package/types-ts3.8/handlers.d.ts +0 -57
- package/types-ts3.8/integrations/anr/legacy.d.ts +0 -22
- package/types-ts3.8/integrations/hapi/index.d.ts +0 -22
- package/types-ts3.8/integrations/index.d.ts +0 -14
- package/types-ts3.8/integrations/undici/index.d.ts +0 -58
- package/types-ts3.8/integrations/undici/types.d.ts +0 -223
- package/types-ts3.8/integrations/utils/http.d.ts +0 -80
- package/types-ts3.8/requestDataDeprecated.d.ts +0 -45
- package/types-ts3.8/sdk.d.ts +0 -74
- package/types-ts3.8/tracing/index.d.ts +0 -6
- package/types-ts3.8/tracing/integrations.d.ts +0 -2
- package/types-ts3.8/utils.d.ts +0 -10
- /package/cjs/{module.js → utils/module.js} +0 -0
- /package/esm/{module.js → utils/module.js} +0 -0
- /package/types/{integrations/utils → utils}/errorhandling.d.ts +0 -0
- /package/types/{module.d.ts → utils/module.d.ts} +0 -0
- /package/types-ts3.8/{integrations/utils → utils}/errorhandling.d.ts +0 -0
- /package/types-ts3.8/{module.d.ts → utils/module.d.ts} +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Server } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Hapi integration
|
|
4
|
+
*
|
|
5
|
+
* Capture tracing data for Hapi.
|
|
6
|
+
* If you also want to capture errors, you need to call `setupHapiErrorHandler(server)` after you set up your server.
|
|
7
|
+
*/
|
|
8
|
+
export declare const hapiIntegration: () => import("@sentry/types").IntegrationFnResult;
|
|
9
|
+
export declare const hapiErrorPlugin: {
|
|
10
|
+
name: string;
|
|
11
|
+
version: string;
|
|
12
|
+
register: (serverArg: Record<any, any>) => Promise<void>;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* Add a Hapi plugin to capture errors to Sentry.
|
|
16
|
+
*/
|
|
17
|
+
export declare function setupHapiErrorHandler(server: Server): Promise<void>;
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import * as stream from 'stream';
|
|
3
|
-
import * as url from 'url';
|
|
4
3
|
interface Podium {
|
|
5
4
|
new (events?: Events[]): Podium;
|
|
6
5
|
new (events?: Events): Podium;
|
|
@@ -150,7 +149,7 @@ interface Request extends Podium {
|
|
|
150
149
|
readonly path: string;
|
|
151
150
|
response: ResponseObject | Boom | null;
|
|
152
151
|
readonly route: RequestRoute;
|
|
153
|
-
readonly url:
|
|
152
|
+
readonly url: URL;
|
|
154
153
|
}
|
|
155
154
|
interface ResponseObjectHeaderOptions {
|
|
156
155
|
append?: boolean | undefined;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Integration } from '@sentry/types';
|
|
2
|
+
/**
|
|
3
|
+
* With OTEL, all performance integrations will be added, as OTEL only initializes them when the patched package is actually required.
|
|
4
|
+
*/
|
|
5
|
+
export declare function getAutoPerformanceIntegrations(): Integration[];
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Prisma integration
|
|
3
|
+
*
|
|
4
|
+
* Capture tracing data for prisma.
|
|
5
|
+
* Note: This requieres to set:
|
|
6
|
+
* previewFeatures = ["tracing"]
|
|
7
|
+
* For the prisma client.
|
|
8
|
+
* See https://www.prisma.io/docs/concepts/components/prisma-client/opentelemetry-tracing for more details.
|
|
9
|
+
*/
|
|
10
|
+
export declare const prismaIntegration: () => import("@sentry/types").IntegrationFnResult;
|
|
11
|
+
//# sourceMappingURL=prisma.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AsyncLocalStorageContextManager } from '@opentelemetry/context-async-hooks';
|
|
2
|
+
/**
|
|
3
|
+
* This is a custom ContextManager for OpenTelemetry, which extends the default AsyncLocalStorageContextManager.
|
|
4
|
+
* It ensures that we create a new hub per context, so that the OTEL Context & the Sentry Hub are always in sync.
|
|
5
|
+
*
|
|
6
|
+
* Note that we currently only support AsyncHooks with this,
|
|
7
|
+
* but since this should work for Node 14+ anyhow that should be good enough.
|
|
8
|
+
*/
|
|
9
|
+
export declare const SentryContextManager: new (...args: unknown[]) => AsyncLocalStorageContextManager;
|
|
10
|
+
//# sourceMappingURL=contextManager.d.ts.map
|
|
@@ -30,7 +30,6 @@ import * as http from 'http';
|
|
|
30
30
|
import { OutgoingHttpHeaders } from 'http';
|
|
31
31
|
import * as net from 'net';
|
|
32
32
|
import * as tls from 'tls';
|
|
33
|
-
import { URL } from 'url';
|
|
34
33
|
import { Agent } from './base';
|
|
35
34
|
import { AgentConnectOpts } from './base';
|
|
36
35
|
type Protocol<T> = T extends string ? Protocol : never;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Client, StackParser } from '@sentry/types';
|
|
2
|
+
import { Hub } from '@sentry/types';
|
|
3
|
+
/** Get the currently active client. */
|
|
4
|
+
export declare function getClient<C extends Client>(): C;
|
|
5
|
+
/**
|
|
6
|
+
* Returns a release dynamically from environment variables.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getSentryRelease(fallback?: string): string | undefined;
|
|
9
|
+
/** Node.js stack parser */
|
|
10
|
+
export declare const defaultStackParser: StackParser;
|
|
11
|
+
/**
|
|
12
|
+
* This method is a noop and only here to ensure vite-plugin v0.6.0 (which is used by Sveltekit) still works,
|
|
13
|
+
* as that uses this.
|
|
14
|
+
*
|
|
15
|
+
* @deprecated This will be removed before v8 is finalized.
|
|
16
|
+
*/
|
|
17
|
+
export declare function makeMain(hub: Hub): Hub;
|
|
18
|
+
//# sourceMappingURL=api.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Tracer } from '@opentelemetry/api';
|
|
2
|
+
import { BasicTracerProvider } from '@opentelemetry/sdk-trace-base';
|
|
3
|
+
import { ServerRuntimeClient } from '@sentry/core';
|
|
4
|
+
import { NodeClientOptions } from '../types';
|
|
5
|
+
/** A client for using Sentry with Node & OpenTelemetry. */
|
|
6
|
+
export declare class NodeClient extends ServerRuntimeClient<NodeClientOptions> {
|
|
7
|
+
traceProvider: BasicTracerProvider | undefined;
|
|
8
|
+
private _tracer;
|
|
9
|
+
constructor(options: NodeClientOptions);
|
|
10
|
+
/*Get the OTEL tracer. */
|
|
11
|
+
readonly tracer: Tracer;
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
15
|
+
flush(timeout?: number): Promise<boolean>;
|
|
16
|
+
}
|
|
17
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Integration, Options } from '@sentry/types';
|
|
2
|
+
import { NodeOptions } from '../types';
|
|
3
|
+
/** Get the default integrations for the Node Experimental SDK. */
|
|
4
|
+
export declare function getDefaultIntegrations(options: Options): Integration[];
|
|
5
|
+
/**
|
|
6
|
+
* Initialize Sentry for Node.
|
|
7
|
+
*/
|
|
8
|
+
export declare function init(options?: NodeOptions | undefined): void;
|
|
9
|
+
//# sourceMappingURL=init.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BasicTracerProvider } from '@opentelemetry/sdk-trace-base';
|
|
2
|
+
import { NodeClient } from './client';
|
|
3
|
+
/**
|
|
4
|
+
* Initialize OpenTelemetry for Node.
|
|
5
|
+
*/
|
|
6
|
+
export declare function initOtel(): void;
|
|
7
|
+
/** Just exported for tests. */
|
|
8
|
+
export declare function setupOtel(client: NodeClient): BasicTracerProvider;
|
|
9
|
+
//# sourceMappingURL=initOtel.d.ts.map
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import { IncomingHttpHeaders, RequestOptions as HTTPRequestOptions } from 'http';
|
|
2
|
+
import { ClientRequest, IncomingHttpHeaders, RequestOptions as HTTPRequestOptions } from 'http';
|
|
3
3
|
import { RequestOptions as HTTPSRequestOptions } from 'https';
|
|
4
|
-
import { Writable } from 'stream';
|
|
5
|
-
import { URL } from 'url';
|
|
6
4
|
export type HTTPModuleRequestOptions = HTTPRequestOptions | HTTPSRequestOptions | string | URL;
|
|
7
5
|
/**
|
|
8
6
|
* Cut version of http.IncomingMessage.
|
|
@@ -24,6 +22,6 @@ export interface HTTPModule {
|
|
|
24
22
|
* @param options These are {@see TransportOptions}
|
|
25
23
|
* @param callback Callback when request is finished
|
|
26
24
|
*/
|
|
27
|
-
request(options: HTTPModuleRequestOptions, callback?: (res: HTTPModuleRequestIncomingMessage) => void):
|
|
25
|
+
request(options: HTTPModuleRequestOptions, callback?: (res: HTTPModuleRequestIncomingMessage) => void): ClientRequest;
|
|
28
26
|
}
|
|
29
27
|
//# sourceMappingURL=http-module.d.ts.map
|
package/types-ts3.8/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { Span as WriteableSpan } from '@opentelemetry/api';
|
|
2
|
+
import { ReadableSpan, Span } from '@opentelemetry/sdk-trace-base';
|
|
3
|
+
import { ClientOptions, Options, SamplingContext, Scope, TracePropagationTargets } from '@sentry/types';
|
|
3
4
|
import { NodeTransportOptions } from './transports';
|
|
4
5
|
export interface BaseNodeOptions {
|
|
5
6
|
/**
|
|
@@ -44,13 +45,6 @@ export interface BaseNodeOptions {
|
|
|
44
45
|
* Requires the `LocalVariables` integration.
|
|
45
46
|
*/
|
|
46
47
|
includeLocalVariables?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Specify a custom NodeClient to be used. Must extend NodeClient!
|
|
49
|
-
* This is not a public, supported API, but used internally only.
|
|
50
|
-
*
|
|
51
|
-
* @hidden
|
|
52
|
-
* */
|
|
53
|
-
clientClass?: typeof NodeClient;
|
|
54
48
|
/**
|
|
55
49
|
* If you use Spotlight by Sentry during development, use
|
|
56
50
|
* this option to forward captured Sentry events to Spotlight.
|
|
@@ -62,22 +56,6 @@ export interface BaseNodeOptions {
|
|
|
62
56
|
* IMPORTANT: Only set this option to `true` while developing, not in production!
|
|
63
57
|
*/
|
|
64
58
|
spotlight?: boolean | string;
|
|
65
|
-
/**
|
|
66
|
-
* @deprecated Moved to constructor options of the `Http` and `Undici` integration.
|
|
67
|
-
* @example
|
|
68
|
-
* ```js
|
|
69
|
-
* Sentry.init({
|
|
70
|
-
* integrations: [
|
|
71
|
-
* new Sentry.Integrations.Http({
|
|
72
|
-
* tracing: {
|
|
73
|
-
* shouldCreateSpanForRequest: (url: string) => false,
|
|
74
|
-
* }
|
|
75
|
-
* });
|
|
76
|
-
* ],
|
|
77
|
-
* });
|
|
78
|
-
* ```
|
|
79
|
-
*/
|
|
80
|
-
shouldCreateSpanForRequest?(this: void, url: string): boolean;
|
|
81
59
|
/** Callback that is executed when a fatal global error occurs. */
|
|
82
60
|
onFatalError?(this: void, error: Error): void;
|
|
83
61
|
}
|
|
@@ -93,4 +71,19 @@ export interface NodeOptions extends Options<NodeTransportOptions>, BaseNodeOpti
|
|
|
93
71
|
*/
|
|
94
72
|
export interface NodeClientOptions extends ClientOptions<NodeTransportOptions>, BaseNodeOptions {
|
|
95
73
|
}
|
|
74
|
+
export interface CurrentScopes {
|
|
75
|
+
scope: Scope;
|
|
76
|
+
isolationScope: Scope;
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* The base `Span` type is basically a `WriteableSpan`.
|
|
80
|
+
* There are places where we basically want to allow passing _any_ span,
|
|
81
|
+
* so in these cases we type this as `AbstractSpan` which could be either a regular `Span` or a `ReadableSpan`.
|
|
82
|
+
* You'll have to make sur to check revelant fields before accessing them.
|
|
83
|
+
*
|
|
84
|
+
* Note that technically, the `Span` exported from `@opentelemwetry/sdk-trace-base` matches this,
|
|
85
|
+
* but we cannot be 100% sure that we are actually getting such a span, so this type is more defensive.
|
|
86
|
+
*/
|
|
87
|
+
export type AbstractSpan = WriteableSpan | ReadableSpan;
|
|
88
|
+
export { Span };
|
|
96
89
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CaptureContext, EventHint, ScopeContext } from '@sentry/types';
|
|
2
|
+
/**
|
|
3
|
+
* This type makes sure that we get either a CaptureContext, OR an EventHint.
|
|
4
|
+
* It does not allow mixing them, which could lead to unexpected outcomes, e.g. this is disallowed:
|
|
5
|
+
* { user: { id: '123' }, mechanism: { handled: false } }
|
|
6
|
+
*/
|
|
7
|
+
export type ExclusiveEventHintOrCaptureContext = (CaptureContext & Partial<{
|
|
8
|
+
[key in keyof EventHint]: never;
|
|
9
|
+
}>) | (EventHint & Partial<{
|
|
10
|
+
[key in keyof ScopeContext]: never;
|
|
11
|
+
}>);
|
|
12
|
+
/**
|
|
13
|
+
* Parse either an `EventHint` directly, or convert a `CaptureContext` to an `EventHint`.
|
|
14
|
+
* This is used to allow to update method signatures that used to accept a `CaptureContext` but should now accept an `EventHint`.
|
|
15
|
+
*/
|
|
16
|
+
export declare function parseEventHintOrCaptureContext(hint: ExclusiveEventHintOrCaptureContext | undefined): EventHint | undefined;
|
|
17
|
+
//# sourceMappingURL=prepareEvent.d.ts.map
|
package/cjs/async/domain.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
var {
|
|
2
|
-
_optionalChain
|
|
3
|
-
} = require('@sentry/utils');
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6
|
-
|
|
7
|
-
const domain = require('domain');
|
|
8
|
-
const core = require('@sentry/core');
|
|
9
|
-
|
|
10
|
-
function getActiveDomain() {
|
|
11
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any
|
|
12
|
-
return (domain ).active ;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
function getCurrentHub() {
|
|
16
|
-
const activeDomain = getActiveDomain();
|
|
17
|
-
|
|
18
|
-
// If there's no active domain, just return undefined and the global hub will be used
|
|
19
|
-
if (!activeDomain) {
|
|
20
|
-
return undefined;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
core.ensureHubOnCarrier(activeDomain);
|
|
24
|
-
|
|
25
|
-
return core.getHubFromCarrier(activeDomain);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
function createNewHub(parent) {
|
|
29
|
-
const carrier = {};
|
|
30
|
-
core.ensureHubOnCarrier(carrier, parent);
|
|
31
|
-
return core.getHubFromCarrier(carrier);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
function runWithAsyncContext(callback, options) {
|
|
35
|
-
const activeDomain = getActiveDomain();
|
|
36
|
-
|
|
37
|
-
if (activeDomain && _optionalChain([options, 'optionalAccess', _ => _.reuseExisting])) {
|
|
38
|
-
// We're already in a domain, so we don't need to create a new one, just call the callback with the current hub
|
|
39
|
-
return callback();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const local = domain.create() ;
|
|
43
|
-
|
|
44
|
-
const parentHub = activeDomain ? core.getHubFromCarrier(activeDomain) : undefined;
|
|
45
|
-
const newHub = createNewHub(parentHub);
|
|
46
|
-
core.setHubOnCarrier(local, newHub);
|
|
47
|
-
|
|
48
|
-
return local.bind(() => {
|
|
49
|
-
return callback();
|
|
50
|
-
})();
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Sets the async context strategy to use Node.js domains.
|
|
55
|
-
*/
|
|
56
|
-
function setDomainAsyncContextStrategy() {
|
|
57
|
-
core.setAsyncContextStrategy({ getCurrentHub, runWithAsyncContext });
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
exports.setDomainAsyncContextStrategy = setDomainAsyncContextStrategy;
|
|
61
|
-
//# sourceMappingURL=domain.js.map
|
package/cjs/async/domain.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"domain.js","sources":["../../../src/async/domain.ts"],"sourcesContent":["import * as domain from 'domain';\nimport type { Carrier, Hub, RunWithAsyncContextOptions } from '@sentry/core';\nimport { ensureHubOnCarrier, getHubFromCarrier, setAsyncContextStrategy, setHubOnCarrier } from '@sentry/core';\n\nfunction getActiveDomain<T>(): T | undefined {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-explicit-any\n return (domain as any).active as T | undefined;\n}\n\nfunction getCurrentHub(): Hub | undefined {\n const activeDomain = getActiveDomain<Carrier>();\n\n // If there's no active domain, just return undefined and the global hub will be used\n if (!activeDomain) {\n return undefined;\n }\n\n ensureHubOnCarrier(activeDomain);\n\n return getHubFromCarrier(activeDomain);\n}\n\nfunction createNewHub(parent: Hub | undefined): Hub {\n const carrier: Carrier = {};\n ensureHubOnCarrier(carrier, parent);\n return getHubFromCarrier(carrier);\n}\n\nfunction runWithAsyncContext<T>(callback: () => T, options: RunWithAsyncContextOptions): T {\n const activeDomain = getActiveDomain<domain.Domain & Carrier>();\n\n if (activeDomain && options?.reuseExisting) {\n // We're already in a domain, so we don't need to create a new one, just call the callback with the current hub\n return callback();\n }\n\n const local = domain.create() as domain.Domain & Carrier;\n\n const parentHub = activeDomain ? getHubFromCarrier(activeDomain) : undefined;\n const newHub = createNewHub(parentHub);\n setHubOnCarrier(local, newHub);\n\n return local.bind(() => {\n return callback();\n })();\n}\n\n/**\n * Sets the async context strategy to use Node.js domains.\n */\nexport function setDomainAsyncContextStrategy(): void {\n setAsyncContextStrategy({ getCurrentHub, runWithAsyncContext });\n}\n"],"names":["ensureHubOnCarrier","getHubFromCarrier","setHubOnCarrier","setAsyncContextStrategy"],"mappings":";;;;;;;;;AAIA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAS,eAAe,CAAqB,EAAA;EAC7C,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA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,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;CACA,CAAA;AACO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAS,6BAA6B,CAAS,EAAA;EACpDC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAuB,CAAC,EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAqB,CAAC;AACjE;;"}
|
package/cjs/async/hooks.js
DELETED
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
var {
|
|
2
|
-
_optionalChain
|
|
3
|
-
} = require('@sentry/utils');
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6
|
-
|
|
7
|
-
const core = require('@sentry/core');
|
|
8
|
-
const async_hooks = require('async_hooks');
|
|
9
|
-
|
|
10
|
-
let asyncStorage;
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Sets the async context strategy to use AsyncLocalStorage which requires Node v12.17.0 or v13.10.0.
|
|
14
|
-
*/
|
|
15
|
-
function setHooksAsyncContextStrategy() {
|
|
16
|
-
if (!asyncStorage) {
|
|
17
|
-
asyncStorage = new (async_hooks ).AsyncLocalStorage();
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function getCurrentHub() {
|
|
21
|
-
return asyncStorage.getStore();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
function createNewHub(parent) {
|
|
25
|
-
const carrier = {};
|
|
26
|
-
core.ensureHubOnCarrier(carrier, parent);
|
|
27
|
-
return core.getHubFromCarrier(carrier);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
function runWithAsyncContext(callback, options) {
|
|
31
|
-
const existingHub = getCurrentHub();
|
|
32
|
-
|
|
33
|
-
if (existingHub && _optionalChain([options, 'optionalAccess', _ => _.reuseExisting])) {
|
|
34
|
-
// We're already in an async context, so we don't need to create a new one
|
|
35
|
-
// just call the callback with the current hub
|
|
36
|
-
return callback();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const newHub = createNewHub(existingHub);
|
|
40
|
-
|
|
41
|
-
return asyncStorage.run(newHub, () => {
|
|
42
|
-
return callback();
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
core.setAsyncContextStrategy({ getCurrentHub, runWithAsyncContext });
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
exports.setHooksAsyncContextStrategy = setHooksAsyncContextStrategy;
|
|
50
|
-
//# sourceMappingURL=hooks.js.map
|
package/cjs/async/hooks.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sources":["../../../src/async/hooks.ts"],"sourcesContent":["import type { Carrier, Hub, RunWithAsyncContextOptions } from '@sentry/core';\nimport { ensureHubOnCarrier, getHubFromCarrier, setAsyncContextStrategy } from '@sentry/core';\nimport * as async_hooks from 'async_hooks';\n\ninterface AsyncLocalStorage<T> {\n getStore(): T | undefined;\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n run<R, TArgs extends any[]>(store: T, callback: (...args: TArgs) => R, ...args: TArgs): R;\n}\n\ntype AsyncLocalStorageConstructor = { new <T>(): AsyncLocalStorage<T> };\n// AsyncLocalStorage only exists in async_hook after Node v12.17.0 or v13.10.0\ntype NewerAsyncHooks = typeof async_hooks & { AsyncLocalStorage: AsyncLocalStorageConstructor };\n\nlet asyncStorage: AsyncLocalStorage<Hub>;\n\n/**\n * Sets the async context strategy to use AsyncLocalStorage which requires Node v12.17.0 or v13.10.0.\n */\nexport function setHooksAsyncContextStrategy(): void {\n if (!asyncStorage) {\n asyncStorage = new (async_hooks as NewerAsyncHooks).AsyncLocalStorage<Hub>();\n }\n\n function getCurrentHub(): Hub | undefined {\n return asyncStorage.getStore();\n }\n\n function createNewHub(parent: Hub | undefined): Hub {\n const carrier: Carrier = {};\n ensureHubOnCarrier(carrier, parent);\n return getHubFromCarrier(carrier);\n }\n\n function runWithAsyncContext<T>(callback: () => T, options: RunWithAsyncContextOptions): T {\n const existingHub = getCurrentHub();\n\n if (existingHub && options?.reuseExisting) {\n // We're already in an async context, so we don't need to create a new one\n // just call the callback with the current hub\n return callback();\n }\n\n const newHub = createNewHub(existingHub);\n\n return asyncStorage.run(newHub, () => {\n return callback();\n });\n }\n\n setAsyncContextStrategy({ getCurrentHub, runWithAsyncContext });\n}\n"],"names":["ensureHubOnCarrier","getHubFromCarrier","setAsyncContextStrategy"],"mappings":";;;;;;;;;AAcA,CAAA,CAAA,EAAI,YAAY;;AAEhB,CAAA,CAAA;CACA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;CACA,CAAA;AACO,CAAA,CAAA,CAAA,C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.js');
|
|
4
|
-
const domain = require('./domain.js');
|
|
5
|
-
const hooks = require('./hooks.js');
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Sets the correct async context strategy for Node.js
|
|
9
|
-
*
|
|
10
|
-
* Node.js >= 14 uses AsyncLocalStorage
|
|
11
|
-
* Node.js < 14 uses domains
|
|
12
|
-
*/
|
|
13
|
-
function setNodeAsyncContextStrategy() {
|
|
14
|
-
if (nodeVersion.NODE_VERSION.major >= 14) {
|
|
15
|
-
hooks.setHooksAsyncContextStrategy();
|
|
16
|
-
} else {
|
|
17
|
-
domain.setDomainAsyncContextStrategy();
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
exports.setNodeAsyncContextStrategy = setNodeAsyncContextStrategy;
|
|
22
|
-
//# sourceMappingURL=index.js.map
|
package/cjs/async/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/async/index.ts"],"sourcesContent":["import { NODE_VERSION } from '../nodeVersion';\nimport { setDomainAsyncContextStrategy } from './domain';\nimport { setHooksAsyncContextStrategy } from './hooks';\n\n/**\n * Sets the correct async context strategy for Node.js\n *\n * Node.js >= 14 uses AsyncLocalStorage\n * Node.js < 14 uses domains\n */\nexport function setNodeAsyncContextStrategy(): void {\n if (NODE_VERSION.major >= 14) {\n setHooksAsyncContextStrategy();\n } else {\n setDomainAsyncContextStrategy();\n }\n}\n"],"names":["NODE_VERSION","setHooksAsyncContextStrategy","setDomainAsyncContextStrategy"],"mappings":";;;;;;AAIA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,2BAA2B,GAAS;AACpD,EAAE,IAAIA,wBAAY,CAAC,KAAM,IAAG,EAAE,EAAE;AAChC,IAAIC,kCAA4B,EAAE,CAAA;AAClC,SAAS;AACT,IAAIC,oCAA6B,EAAE,CAAA;AACnC,GAAE;AACF;;;;"}
|
package/cjs/client.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2
|
-
|
|
3
|
-
const os = require('os');
|
|
4
|
-
const util = require('util');
|
|
5
|
-
const core = require('@sentry/core');
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* The Sentry Node SDK Client.
|
|
9
|
-
*
|
|
10
|
-
* @see NodeClientOptions for documentation on configuration options.
|
|
11
|
-
* @see SentryClient for usage documentation.
|
|
12
|
-
*/
|
|
13
|
-
class NodeClient extends core.ServerRuntimeClient {
|
|
14
|
-
/**
|
|
15
|
-
* Creates a new Node SDK instance.
|
|
16
|
-
* @param options Configuration options for this SDK.
|
|
17
|
-
*/
|
|
18
|
-
constructor(options) {
|
|
19
|
-
core.applySdkMetadata(options, 'node');
|
|
20
|
-
|
|
21
|
-
// Until node supports global TextEncoder in all versions we support, we are forced to pass it from util
|
|
22
|
-
options.transportOptions = {
|
|
23
|
-
textEncoder: new util.TextEncoder(),
|
|
24
|
-
...options.transportOptions,
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
const clientOptions = {
|
|
28
|
-
...options,
|
|
29
|
-
platform: 'node',
|
|
30
|
-
runtime: { name: 'node', version: global.process.version },
|
|
31
|
-
serverName: options.serverName || global.process.env.SENTRY_NAME || os.hostname(),
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
super(clientOptions);
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
exports.NodeClient = NodeClient;
|
|
39
|
-
//# sourceMappingURL=client.js.map
|
package/cjs/client.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client.js","sources":["../../src/client.ts"],"sourcesContent":["import * as os from 'os';\nimport { TextEncoder } from 'util';\nimport type { ServerRuntimeClientOptions } from '@sentry/core';\nimport { ServerRuntimeClient, applySdkMetadata } from '@sentry/core';\n\nimport type { NodeClientOptions } from './types';\n\n/**\n * The Sentry Node SDK Client.\n *\n * @see NodeClientOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class NodeClient extends ServerRuntimeClient<NodeClientOptions> {\n /**\n * Creates a new Node SDK instance.\n * @param options Configuration options for this SDK.\n */\n public constructor(options: NodeClientOptions) {\n applySdkMetadata(options, 'node');\n\n // Until node supports global TextEncoder in all versions we support, we are forced to pass it from util\n options.transportOptions = {\n textEncoder: new TextEncoder(),\n ...options.transportOptions,\n };\n\n const clientOptions: ServerRuntimeClientOptions = {\n ...options,\n platform: 'node',\n runtime: { name: 'node', version: global.process.version },\n serverName: options.serverName || global.process.env.SENTRY_NAME || os.hostname(),\n };\n\n super(clientOptions);\n }\n}\n"],"names":["ServerRuntimeClient","applySdkMetadata","TextEncoder"],"mappings":";;;;;;AAOA;AACA;AACA;AACA;AACA;AACA;AACO,MAAM,UAAA,SAAmBA,wBAAmB,CAAoB;AACvE;AACA;AACA;AACA;AACA,GAAS,WAAW,CAAC,OAAO,EAAqB;AACjD,IAAIC,qBAAgB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;AACrC;AACA;AACA,IAAI,OAAO,CAAC,gBAAA,GAAmB;AAC/B,MAAM,WAAW,EAAE,IAAIC,gBAAW,EAAE;AACpC,MAAM,GAAG,OAAO,CAAC,gBAAgB;AACjC,KAAK,CAAA;AACL;AACA,IAAI,MAAM,aAAa,GAA+B;AACtD,MAAM,GAAG,OAAO;AAChB,MAAM,QAAQ,EAAE,MAAM;AACtB,MAAM,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,SAAS;AAChE,MAAM,UAAU,EAAE,OAAO,CAAC,UAAW,IAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,WAAY,IAAG,EAAE,CAAC,QAAQ,EAAE;AACvF,KAAK,CAAA;AACL;AACA,IAAI,KAAK,CAAC,aAAa,CAAC,CAAA;AACxB,GAAE;AACF;;;;"}
|