@sentry/node 7.105.0 → 8.0.0-alpha.2
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 -99
- package/cjs/index.js.map +1 -1
- package/cjs/integrations/anr/index.js +5 -32
- 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 +31 -41
- 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 +252 -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 +8 -34
- 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 +32 -41
- 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 +249 -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 -145
- 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/common.d.ts +1 -0
- package/types/integrations/local-variables/common.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-sync.d.ts +2 -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 +25 -23
- 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 -145
- 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/common.d.ts +1 -0
- package/types-ts3.8/integrations/local-variables/index.d.ts +0 -11
- package/types-ts3.8/integrations/local-variables/local-variables-sync.d.ts +2 -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 +25 -23
- 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/local-variables/local-variables-async.d.ts +0 -14
- package/types/integrations/local-variables/local-variables-async.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/local-variables/local-variables-async.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
package/types/sdk.d.ts
DELETED
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import type { Integration, Options, StackParser } from '@sentry/types';
|
|
2
|
-
import { NodeClient } from './client';
|
|
3
|
-
import type { NodeOptions } from './types';
|
|
4
|
-
/** @deprecated Use `getDefaultIntegrations(options)` instead. */
|
|
5
|
-
export declare const defaultIntegrations: import("@sentry/types").IntegrationFnResult[];
|
|
6
|
-
/** Get the default integrations for the Node SDK. */
|
|
7
|
-
export declare function getDefaultIntegrations(_options: Options): Integration[];
|
|
8
|
-
/**
|
|
9
|
-
* The Sentry Node SDK Client.
|
|
10
|
-
*
|
|
11
|
-
* To use this SDK, call the {@link init} function as early as possible in the
|
|
12
|
-
* main entry module. To set context information or send manual events, use the
|
|
13
|
-
* provided methods.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```
|
|
17
|
-
*
|
|
18
|
-
* const { init } = require('@sentry/node');
|
|
19
|
-
*
|
|
20
|
-
* init({
|
|
21
|
-
* dsn: '__DSN__',
|
|
22
|
-
* // ...
|
|
23
|
-
* });
|
|
24
|
-
* ```
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* ```
|
|
28
|
-
*
|
|
29
|
-
* const { configureScope } = require('@sentry/node');
|
|
30
|
-
* configureScope((scope: Scope) => {
|
|
31
|
-
* scope.setExtra({ battery: 0.7 });
|
|
32
|
-
* scope.setTag({ user_mode: 'admin' });
|
|
33
|
-
* scope.setUser({ id: '4711' });
|
|
34
|
-
* });
|
|
35
|
-
* ```
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
|
-
* const { addBreadcrumb } = require('@sentry/node');
|
|
41
|
-
* addBreadcrumb({
|
|
42
|
-
* message: 'My Breadcrumb',
|
|
43
|
-
* // ...
|
|
44
|
-
* });
|
|
45
|
-
* ```
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```
|
|
49
|
-
*
|
|
50
|
-
* const Sentry = require('@sentry/node');
|
|
51
|
-
* Sentry.captureMessage('Hello, world!');
|
|
52
|
-
* Sentry.captureException(new Error('Good bye'));
|
|
53
|
-
* Sentry.captureEvent({
|
|
54
|
-
* message: 'Manual',
|
|
55
|
-
* stacktrace: [
|
|
56
|
-
* // ...
|
|
57
|
-
* ],
|
|
58
|
-
* });
|
|
59
|
-
* ```
|
|
60
|
-
*
|
|
61
|
-
* @see {@link NodeOptions} for documentation on configuration options.
|
|
62
|
-
*/
|
|
63
|
-
export declare function init(options?: NodeOptions): void;
|
|
64
|
-
/**
|
|
65
|
-
* Function that takes an instance of NodeClient and checks if autoSessionTracking option is enabled for that client
|
|
66
|
-
*/
|
|
67
|
-
export declare function isAutoSessionTrackingEnabled(client?: NodeClient): boolean;
|
|
68
|
-
/**
|
|
69
|
-
* Returns a release dynamically from environment variables.
|
|
70
|
-
*/
|
|
71
|
-
export declare function getSentryRelease(fallback?: string): string | undefined;
|
|
72
|
-
/** Node.js stack parser */
|
|
73
|
-
export declare const defaultStackParser: StackParser;
|
|
74
|
-
//# sourceMappingURL=sdk.d.ts.map
|
package/types/sdk.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAiB,WAAW,EAAE,MAAM,eAAe,CAAC;AAUtF,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAatC,OAAO,KAAK,EAAqB,WAAW,EAAE,MAAM,SAAS,CAAC;AAE9D,iEAAiE;AACjE,eAAO,MAAM,mBAAmB,+CAkB/B,CAAC;AAEF,qDAAqD;AACrD,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,OAAO,GAAG,WAAW,EAAE,CAUvE;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsDG;AAEH,wBAAgB,IAAI,CAAC,OAAO,GAAE,WAAgB,GAAG,IAAI,CAuEpD;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,MAAM,CAAC,EAAE,UAAU,GAAG,OAAO,CASzE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CA6BtE;AAED,2BAA2B;AAC3B,eAAO,MAAM,kBAAkB,EAAE,WAAmF,CAAC"}
|
package/types/tracing/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { Integration } from '@sentry/types';
|
|
2
|
-
/**
|
|
3
|
-
* Automatically detects and returns integrations that will work with your dependencies.
|
|
4
|
-
*/
|
|
5
|
-
export declare function autoDiscoverNodePerformanceMonitoringIntegrations(): Integration[];
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tracing/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjD;;GAEG;AACH,wBAAgB,iDAAiD,IAAI,WAAW,EAAE,CAiBjF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"integrations.d.ts","sourceRoot":"","sources":["../../../src/tracing/integrations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC"}
|
package/types/utils.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Recursively read the contents of a directory.
|
|
3
|
-
*
|
|
4
|
-
* @param targetDir Absolute or relative path of the directory to scan. All returned paths will be relative to this
|
|
5
|
-
* directory.
|
|
6
|
-
* @returns Array holding all relative paths
|
|
7
|
-
* @deprecated This function will be removed in the next major version.
|
|
8
|
-
*/
|
|
9
|
-
export declare function deepReadDirSync(targetDir: string): string[];
|
|
10
|
-
//# sourceMappingURL=utils.d.ts.map
|
package/types/utils.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CA4B3D"}
|
package/types-ts3.8/client.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ServerRuntimeClient } from '@sentry/core';
|
|
2
|
-
import { NodeClientOptions } from './types';
|
|
3
|
-
/**
|
|
4
|
-
* The Sentry Node SDK Client.
|
|
5
|
-
*
|
|
6
|
-
* @see NodeClientOptions for documentation on configuration options.
|
|
7
|
-
* @see SentryClient for usage documentation.
|
|
8
|
-
*/
|
|
9
|
-
export declare class NodeClient extends ServerRuntimeClient<NodeClientOptions> {
|
|
10
|
-
/**
|
|
11
|
-
* Creates a new Node SDK instance.
|
|
12
|
-
* @param options Configuration options for this SDK.
|
|
13
|
-
*/
|
|
14
|
-
constructor(options: NodeClientOptions);
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import * as http from 'http';
|
|
3
|
-
import { AddRequestDataToEventOptions } from '@sentry/utils';
|
|
4
|
-
import { ParseRequestOptions } from './requestDataDeprecated';
|
|
5
|
-
/**
|
|
6
|
-
* Express-compatible tracing handler.
|
|
7
|
-
* @see Exposed as `Handlers.tracingHandler`
|
|
8
|
-
*/
|
|
9
|
-
export declare function tracingHandler(): (req: http.IncomingMessage, res: http.ServerResponse, next: (error?: any) => void) => void;
|
|
10
|
-
export type RequestHandlerOptions = (ParseRequestOptions | AddRequestDataToEventOptions) & {
|
|
11
|
-
flushTimeout?: number;
|
|
12
|
-
};
|
|
13
|
-
/**
|
|
14
|
-
* Express compatible request handler.
|
|
15
|
-
* @see Exposed as `Handlers.requestHandler`
|
|
16
|
-
*/
|
|
17
|
-
export declare function requestHandler(options?: RequestHandlerOptions): (req: http.IncomingMessage, res: http.ServerResponse, next: (error?: any) => void) => void;
|
|
18
|
-
/** JSDoc */
|
|
19
|
-
interface MiddlewareError extends Error {
|
|
20
|
-
status?: number | string;
|
|
21
|
-
statusCode?: number | string;
|
|
22
|
-
status_code?: number | string;
|
|
23
|
-
output?: {
|
|
24
|
-
statusCode?: number | string;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Express compatible error handler.
|
|
29
|
-
* @see Exposed as `Handlers.errorHandler`
|
|
30
|
-
*/
|
|
31
|
-
export declare function errorHandler(options?: {
|
|
32
|
-
/**
|
|
33
|
-
* Callback method deciding whether error should be captured and sent to Sentry
|
|
34
|
-
* @param error Captured middleware error
|
|
35
|
-
*/
|
|
36
|
-
shouldHandleError?(this: void, error: MiddlewareError): boolean;
|
|
37
|
-
}): (error: MiddlewareError, req: http.IncomingMessage, res: http.ServerResponse, next: (error: MiddlewareError) => void) => void;
|
|
38
|
-
interface SentryTrpcMiddlewareOptions {
|
|
39
|
-
/** Whether to include procedure inputs in reported events. Defaults to `false`. */
|
|
40
|
-
attachRpcInput?: boolean;
|
|
41
|
-
}
|
|
42
|
-
interface TrpcMiddlewareArguments<T> {
|
|
43
|
-
path: string;
|
|
44
|
-
type: string;
|
|
45
|
-
next: () => T;
|
|
46
|
-
rawInput: unknown;
|
|
47
|
-
}
|
|
48
|
-
/**
|
|
49
|
-
* Sentry tRPC middleware that names the handling transaction after the called procedure.
|
|
50
|
-
*
|
|
51
|
-
* Use the Sentry tRPC middleware in combination with the Sentry server integration,
|
|
52
|
-
* e.g. Express Request Handlers or Next.js SDK.
|
|
53
|
-
*/
|
|
54
|
-
export declare function trpcMiddleware(options?: SentryTrpcMiddlewareOptions): <T>({ path, type, next, rawInput }: TrpcMiddlewareArguments<T>) => T;
|
|
55
|
-
export { ParseRequestOptions, ExpressRequest } from './requestDataDeprecated';
|
|
56
|
-
export { parseRequest, extractRequestData } from './requestDataDeprecated';
|
|
57
|
-
//# sourceMappingURL=handlers.d.ts.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
interface LegacyOptions {
|
|
2
|
-
entryScript: string;
|
|
3
|
-
pollInterval: number;
|
|
4
|
-
anrThreshold: number;
|
|
5
|
-
captureStackTrace: boolean;
|
|
6
|
-
debug: boolean;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated Use the `Anr` integration instead.
|
|
10
|
-
*
|
|
11
|
-
* ```ts
|
|
12
|
-
* import * as Sentry from '@sentry/node';
|
|
13
|
-
*
|
|
14
|
-
* Sentry.init({
|
|
15
|
-
* dsn: '__DSN__',
|
|
16
|
-
* integrations: [new Sentry.Integrations.Anr({ captureStackTrace: true })],
|
|
17
|
-
* });
|
|
18
|
-
* ```
|
|
19
|
-
*/
|
|
20
|
-
export declare function enableAnrDetection(options: Partial<LegacyOptions>): Promise<void>;
|
|
21
|
-
export {};
|
|
22
|
-
//# sourceMappingURL=legacy.d.ts.map
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
export declare const hapiErrorPlugin: {
|
|
2
|
-
name: string;
|
|
3
|
-
version: string;
|
|
4
|
-
register: (serverArg: Record<any, any>) => Promise<void>;
|
|
5
|
-
};
|
|
6
|
-
export declare const hapiTracingPlugin: {
|
|
7
|
-
name: string;
|
|
8
|
-
version: string;
|
|
9
|
-
register: (serverArg: Record<any, any>) => Promise<void>;
|
|
10
|
-
};
|
|
11
|
-
export type HapiOptions = {
|
|
12
|
-
/** Hapi server instance */
|
|
13
|
-
server?: Record<any, any>;
|
|
14
|
-
};
|
|
15
|
-
export declare const hapiIntegration: (options?: HapiOptions | undefined) => import("@sentry/types").IntegrationFnResult;
|
|
16
|
-
/**
|
|
17
|
-
* Hapi Framework Integration.
|
|
18
|
-
* @deprecated Use `hapiIntegration()` instead.
|
|
19
|
-
*/
|
|
20
|
-
export declare const Hapi: import("@sentry/types").IntegrationClass<import("@sentry/types").Integration>;
|
|
21
|
-
export type Hapi = typeof Hapi;
|
|
22
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export { Console } from './console';
|
|
2
|
-
export { Http } from './http';
|
|
3
|
-
export { OnUncaughtException } from './onuncaughtexception';
|
|
4
|
-
export { OnUnhandledRejection } from './onunhandledrejection';
|
|
5
|
-
export { Modules } from './modules';
|
|
6
|
-
export { ContextLines } from './contextlines';
|
|
7
|
-
export { Context } from './context';
|
|
8
|
-
export { RequestData } from '@sentry/core';
|
|
9
|
-
export { LocalVariables } from './local-variables';
|
|
10
|
-
export { Undici } from './undici';
|
|
11
|
-
export { Spotlight } from './spotlight';
|
|
12
|
-
export { Anr } from './anr';
|
|
13
|
-
export { Hapi } from './hapi';
|
|
14
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { Event, Integration, IntegrationClass } from '@sentry/types';
|
|
2
|
-
import { NodeClient } from '../../client';
|
|
3
|
-
import { LocalVariablesIntegrationOptions } from './common';
|
|
4
|
-
export declare const localVariablesAsyncIntegration: (options?: LocalVariablesIntegrationOptions | undefined) => import("@sentry/types").IntegrationFnResult;
|
|
5
|
-
/**
|
|
6
|
-
* Adds local variables to exception frames.
|
|
7
|
-
* @deprecated Use `localVariablesAsyncIntegration()` instead.
|
|
8
|
-
*/
|
|
9
|
-
export declare const LocalVariablesAsync: IntegrationClass<Integration & {
|
|
10
|
-
processEvent: (event: Event) => Event;
|
|
11
|
-
setup: (client: NodeClient) => void;
|
|
12
|
-
}>;
|
|
13
|
-
export type LocalVariablesAsync = typeof LocalVariablesAsync;
|
|
14
|
-
//# sourceMappingURL=local-variables-async.d.ts.map
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { EventProcessor, Integration, IntegrationFnResult } from '@sentry/types';
|
|
2
|
-
export declare enum ChannelName {
|
|
3
|
-
RequestCreate = "undici:request:create",
|
|
4
|
-
RequestEnd = "undici:request:headers",
|
|
5
|
-
RequestError = "undici:request:error"
|
|
6
|
-
}
|
|
7
|
-
export interface UndiciOptions {
|
|
8
|
-
/**
|
|
9
|
-
* Whether breadcrumbs should be recorded for requests
|
|
10
|
-
* Defaults to true
|
|
11
|
-
*/
|
|
12
|
-
breadcrumbs: boolean;
|
|
13
|
-
/**
|
|
14
|
-
* Whether tracing spans should be created for requests
|
|
15
|
-
* If not set, this will be enabled/disabled based on if tracing is enabled.
|
|
16
|
-
*/
|
|
17
|
-
tracing?: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Function determining whether or not to create spans to track outgoing requests to the given URL.
|
|
20
|
-
* By default, spans will be created for all outgoing requests.
|
|
21
|
-
*/
|
|
22
|
-
shouldCreateSpanForRequest?: (url: string) => boolean;
|
|
23
|
-
}
|
|
24
|
-
export declare const nativeNodeFetchintegration: (options?: Partial<UndiciOptions> | undefined) => IntegrationFnResult;
|
|
25
|
-
/**
|
|
26
|
-
* Instruments outgoing HTTP requests made with the `undici` package via
|
|
27
|
-
* Node's `diagnostics_channel` API.
|
|
28
|
-
*
|
|
29
|
-
* Supports Undici 4.7.0 or higher.
|
|
30
|
-
*
|
|
31
|
-
* Requires Node 16.17.0 or higher.
|
|
32
|
-
*
|
|
33
|
-
* @deprecated Use `nativeNodeFetchintegration()` instead.
|
|
34
|
-
*/
|
|
35
|
-
export declare class Undici implements Integration {
|
|
36
|
-
/**
|
|
37
|
-
* @inheritDoc
|
|
38
|
-
*/
|
|
39
|
-
static id: string;
|
|
40
|
-
/**
|
|
41
|
-
* @inheritDoc
|
|
42
|
-
*/
|
|
43
|
-
name: string;
|
|
44
|
-
private readonly _options;
|
|
45
|
-
private readonly _createSpanUrlMap;
|
|
46
|
-
private readonly _headersUrlMap;
|
|
47
|
-
constructor(_options?: Partial<UndiciOptions>);
|
|
48
|
-
/**
|
|
49
|
-
* @inheritDoc
|
|
50
|
-
*/
|
|
51
|
-
setupOnce(_addGlobalEventProcessor: (callback: EventProcessor) => void): void;
|
|
52
|
-
/** Helper that wraps shouldCreateSpanForRequest option */
|
|
53
|
-
private _shouldCreateSpan;
|
|
54
|
-
private _onRequestCreate;
|
|
55
|
-
private _onRequestEnd;
|
|
56
|
-
private _onRequestError;
|
|
57
|
-
}
|
|
58
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,223 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { URL } from 'url';
|
|
3
|
-
import { Span } from '@sentry/types';
|
|
4
|
-
export type ChannelListener = (message: unknown, name: string | symbol) => void;
|
|
5
|
-
/**
|
|
6
|
-
* The `diagnostics_channel` module provides an API to create named channels
|
|
7
|
-
* to report arbitrary message data for diagnostics purposes.
|
|
8
|
-
*
|
|
9
|
-
* It can be accessed using:
|
|
10
|
-
*
|
|
11
|
-
* ```js
|
|
12
|
-
* import diagnostics_channel from 'diagnostics_channel';
|
|
13
|
-
* ```
|
|
14
|
-
*
|
|
15
|
-
* It is intended that a module writer wanting to report diagnostics messages
|
|
16
|
-
* will create one or many top-level channels to report messages through.
|
|
17
|
-
* Channels may also be acquired at runtime but it is not encouraged
|
|
18
|
-
* due to the additional overhead of doing so. Channels may be exported for
|
|
19
|
-
* convenience, but as long as the name is known it can be acquired anywhere.
|
|
20
|
-
*
|
|
21
|
-
* If you intend for your module to produce diagnostics data for others to
|
|
22
|
-
* consume it is recommended that you include documentation of what named
|
|
23
|
-
* channels are used along with the shape of the message data. Channel names
|
|
24
|
-
* should generally include the module name to avoid collisions with data from
|
|
25
|
-
* other modules.
|
|
26
|
-
* @experimental
|
|
27
|
-
* @see [source](https://github.com/nodejs/node/blob/v18.0.0/lib/diagnostics_channel.js)
|
|
28
|
-
*/
|
|
29
|
-
export interface DiagnosticsChannel {
|
|
30
|
-
/**
|
|
31
|
-
* Check if there are active subscribers to the named channel. This is helpful if
|
|
32
|
-
* the message you want to send might be expensive to prepare.
|
|
33
|
-
*
|
|
34
|
-
* This API is optional but helpful when trying to publish messages from very
|
|
35
|
-
* performance-sensitive code.
|
|
36
|
-
*
|
|
37
|
-
* ```js
|
|
38
|
-
* import diagnostics_channel from 'diagnostics_channel';
|
|
39
|
-
*
|
|
40
|
-
* if (diagnostics_channel.hasSubscribers('my-channel')) {
|
|
41
|
-
* // There are subscribers, prepare and publish message
|
|
42
|
-
* }
|
|
43
|
-
* ```
|
|
44
|
-
* @since v15.1.0, v14.17.0
|
|
45
|
-
* @param name The channel name
|
|
46
|
-
* @return If there are active subscribers
|
|
47
|
-
*/
|
|
48
|
-
hasSubscribers(name: string | symbol): boolean;
|
|
49
|
-
/**
|
|
50
|
-
* This is the primary entry-point for anyone wanting to interact with a named
|
|
51
|
-
* channel. It produces a channel object which is optimized to reduce overhead at
|
|
52
|
-
* publish time as much as possible.
|
|
53
|
-
*
|
|
54
|
-
* ```js
|
|
55
|
-
* import diagnostics_channel from 'diagnostics_channel';
|
|
56
|
-
*
|
|
57
|
-
* const channel = diagnostics_channel.channel('my-channel');
|
|
58
|
-
* ```
|
|
59
|
-
* @since v15.1.0, v14.17.0
|
|
60
|
-
* @param name The channel name
|
|
61
|
-
* @return The named channel object
|
|
62
|
-
*/
|
|
63
|
-
channel(name: string | symbol): Channel;
|
|
64
|
-
/**
|
|
65
|
-
* Register a message handler to subscribe to this channel. This message handler will be run synchronously
|
|
66
|
-
* whenever a message is published to the channel. Any errors thrown in the message handler will
|
|
67
|
-
* trigger an 'uncaughtException'.
|
|
68
|
-
*
|
|
69
|
-
* ```js
|
|
70
|
-
* import diagnostics_channel from 'diagnostics_channel';
|
|
71
|
-
*
|
|
72
|
-
* diagnostics_channel.subscribe('my-channel', (message, name) => {
|
|
73
|
-
* // Received data
|
|
74
|
-
* });
|
|
75
|
-
* ```
|
|
76
|
-
*
|
|
77
|
-
* @since v18.7.0, v16.17.0
|
|
78
|
-
* @param name The channel name
|
|
79
|
-
* @param onMessage The handler to receive channel messages
|
|
80
|
-
*/
|
|
81
|
-
subscribe(name: string | symbol, onMessage: ChannelListener): void;
|
|
82
|
-
/**
|
|
83
|
-
* Remove a message handler previously registered to this channel with diagnostics_channel.subscribe(name, onMessage).
|
|
84
|
-
*
|
|
85
|
-
* ```js
|
|
86
|
-
* import diagnostics_channel from 'diagnostics_channel';
|
|
87
|
-
*
|
|
88
|
-
* function onMessage(message, name) {
|
|
89
|
-
* // Received data
|
|
90
|
-
* }
|
|
91
|
-
*
|
|
92
|
-
* diagnostics_channel.subscribe('my-channel', onMessage);
|
|
93
|
-
*
|
|
94
|
-
* diagnostics_channel.unsubscribe('my-channel', onMessage);
|
|
95
|
-
* ```
|
|
96
|
-
*
|
|
97
|
-
* @since v18.7.0, v16.17.0
|
|
98
|
-
* @param name The channel name
|
|
99
|
-
* @param onMessage The previous subscribed handler to remove
|
|
100
|
-
* @returns `true` if the handler was found, `false` otherwise
|
|
101
|
-
*/
|
|
102
|
-
unsubscribe(name: string | symbol, onMessage: ChannelListener): boolean;
|
|
103
|
-
}
|
|
104
|
-
/**
|
|
105
|
-
* The class `Channel` represents an individual named channel within the data
|
|
106
|
-
* pipeline. It is use to track subscribers and to publish messages when there
|
|
107
|
-
* are subscribers present. It exists as a separate object to avoid channel
|
|
108
|
-
* lookups at publish time, enabling very fast publish speeds and allowing
|
|
109
|
-
* for heavy use while incurring very minimal cost. Channels are created with {@link channel}, constructing a channel directly
|
|
110
|
-
* with `new Channel(name)` is not supported.
|
|
111
|
-
* @since v15.1.0, v14.17.0
|
|
112
|
-
*/
|
|
113
|
-
interface ChannelI {
|
|
114
|
-
readonly name: string | symbol;
|
|
115
|
-
/**
|
|
116
|
-
* Check if there are active subscribers to this channel. This is helpful if
|
|
117
|
-
* the message you want to send might be expensive to prepare.
|
|
118
|
-
*
|
|
119
|
-
* This API is optional but helpful when trying to publish messages from very
|
|
120
|
-
* performance-sensitive code.
|
|
121
|
-
*
|
|
122
|
-
* ```js
|
|
123
|
-
* import diagnostics_channel from 'diagnostics_channel';
|
|
124
|
-
*
|
|
125
|
-
* const channel = diagnostics_channel.channel('my-channel');
|
|
126
|
-
*
|
|
127
|
-
* if (channel.hasSubscribers) {
|
|
128
|
-
* // There are subscribers, prepare and publish message
|
|
129
|
-
* }
|
|
130
|
-
* ```
|
|
131
|
-
* @since v15.1.0, v14.17.0
|
|
132
|
-
*/
|
|
133
|
-
readonly hasSubscribers: boolean;
|
|
134
|
-
/**
|
|
135
|
-
* Publish a message to any subscribers to the channel. This will
|
|
136
|
-
* trigger message handlers synchronously so they will execute within
|
|
137
|
-
* the same context.
|
|
138
|
-
*
|
|
139
|
-
* ```js
|
|
140
|
-
* import diagnostics_channel from 'diagnostics_channel';
|
|
141
|
-
*
|
|
142
|
-
* const channel = diagnostics_channel.channel('my-channel');
|
|
143
|
-
*
|
|
144
|
-
* channel.publish({
|
|
145
|
-
* some: 'message'
|
|
146
|
-
* });
|
|
147
|
-
* ```
|
|
148
|
-
* @since v15.1.0, v14.17.0
|
|
149
|
-
* @param message The message to send to the channel subscribers
|
|
150
|
-
*/
|
|
151
|
-
publish(message: unknown): void;
|
|
152
|
-
/**
|
|
153
|
-
* Register a message handler to subscribe to this channel. This message handler
|
|
154
|
-
* will be run synchronously whenever a message is published to the channel. Any
|
|
155
|
-
* errors thrown in the message handler will trigger an `'uncaughtException'`.
|
|
156
|
-
*
|
|
157
|
-
* ```js
|
|
158
|
-
* import diagnostics_channel from 'diagnostics_channel';
|
|
159
|
-
*
|
|
160
|
-
* const channel = diagnostics_channel.channel('my-channel');
|
|
161
|
-
*
|
|
162
|
-
* channel.subscribe((message, name) => {
|
|
163
|
-
* // Received data
|
|
164
|
-
* });
|
|
165
|
-
* ```
|
|
166
|
-
* @since v15.1.0, v14.17.0
|
|
167
|
-
* @param onMessage The handler to receive channel messages
|
|
168
|
-
*/
|
|
169
|
-
subscribe(onMessage: ChannelListener): void;
|
|
170
|
-
/**
|
|
171
|
-
* Remove a message handler previously registered to this channel with `channel.subscribe(onMessage)`.
|
|
172
|
-
*
|
|
173
|
-
* ```js
|
|
174
|
-
* import diagnostics_channel from 'diagnostics_channel';
|
|
175
|
-
*
|
|
176
|
-
* const channel = diagnostics_channel.channel('my-channel');
|
|
177
|
-
*
|
|
178
|
-
* function onMessage(message, name) {
|
|
179
|
-
* // Received data
|
|
180
|
-
* }
|
|
181
|
-
*
|
|
182
|
-
* channel.subscribe(onMessage);
|
|
183
|
-
*
|
|
184
|
-
* channel.unsubscribe(onMessage);
|
|
185
|
-
* ```
|
|
186
|
-
* @since v15.1.0, v14.17.0
|
|
187
|
-
* @param onMessage The previous subscribed handler to remove
|
|
188
|
-
* @return `true` if the handler was found, `false` otherwise.
|
|
189
|
-
*/
|
|
190
|
-
unsubscribe(onMessage: ChannelListener): void;
|
|
191
|
-
}
|
|
192
|
-
export interface Channel extends ChannelI {
|
|
193
|
-
new (name: string | symbol): void;
|
|
194
|
-
}
|
|
195
|
-
export interface UndiciRequest {
|
|
196
|
-
origin?: string | URL;
|
|
197
|
-
completed: boolean;
|
|
198
|
-
method?: string;
|
|
199
|
-
path: string;
|
|
200
|
-
headers: string;
|
|
201
|
-
addHeader(key: string, value: string): RequestWithSentry;
|
|
202
|
-
}
|
|
203
|
-
export interface UndiciResponse {
|
|
204
|
-
statusCode: number;
|
|
205
|
-
statusText: string;
|
|
206
|
-
headers: Array<Buffer>;
|
|
207
|
-
}
|
|
208
|
-
export interface RequestWithSentry extends UndiciRequest {
|
|
209
|
-
__sentry_span__?: Span;
|
|
210
|
-
}
|
|
211
|
-
export interface RequestCreateMessage {
|
|
212
|
-
request: RequestWithSentry;
|
|
213
|
-
}
|
|
214
|
-
export interface RequestEndMessage {
|
|
215
|
-
request: RequestWithSentry;
|
|
216
|
-
response: UndiciResponse;
|
|
217
|
-
}
|
|
218
|
-
export interface RequestErrorMessage {
|
|
219
|
-
request: RequestWithSentry;
|
|
220
|
-
error: Error;
|
|
221
|
-
}
|
|
222
|
-
export {};
|
|
223
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import * as http from 'http';
|
|
3
|
-
import * as https from 'https';
|
|
4
|
-
import { URL } from 'url';
|
|
5
|
-
/**
|
|
6
|
-
* Assembles a URL that's passed to the users to filter on.
|
|
7
|
-
* It can include raw (potentially PII containing) data, which we'll allow users to access to filter
|
|
8
|
-
* but won't include in spans or breadcrumbs.
|
|
9
|
-
*
|
|
10
|
-
* @param requestOptions RequestOptions object containing the component parts for a URL
|
|
11
|
-
* @returns Fully-formed URL
|
|
12
|
-
*/
|
|
13
|
-
export declare function extractRawUrl(requestOptions: RequestOptions): string;
|
|
14
|
-
/**
|
|
15
|
-
* Assemble a URL to be used for breadcrumbs and spans.
|
|
16
|
-
*
|
|
17
|
-
* @param requestOptions RequestOptions object containing the component parts for a URL
|
|
18
|
-
* @returns Fully-formed URL
|
|
19
|
-
*/
|
|
20
|
-
export declare function extractUrl(requestOptions: RequestOptions): string;
|
|
21
|
-
/**
|
|
22
|
-
* Handle various edge cases in the span description (for spans representing http(s) requests).
|
|
23
|
-
*
|
|
24
|
-
* @param description current `description` property of the span representing the request
|
|
25
|
-
* @param requestOptions Configuration data for the request
|
|
26
|
-
* @param Request Request object
|
|
27
|
-
*
|
|
28
|
-
* @returns The cleaned description
|
|
29
|
-
*/
|
|
30
|
-
export declare function cleanSpanDescription(description: string | undefined, requestOptions: RequestOptions, request: http.ClientRequest): string | undefined;
|
|
31
|
-
export type RequestOptions = http.RequestOptions & {
|
|
32
|
-
hash?: string;
|
|
33
|
-
search?: string;
|
|
34
|
-
pathname?: string;
|
|
35
|
-
href?: string;
|
|
36
|
-
};
|
|
37
|
-
type RequestCallback = (response: http.IncomingMessage) => void;
|
|
38
|
-
export type RequestMethodArgs = [
|
|
39
|
-
RequestOptions | string | URL,
|
|
40
|
-
RequestCallback?
|
|
41
|
-
] | [
|
|
42
|
-
string | URL,
|
|
43
|
-
RequestOptions,
|
|
44
|
-
RequestCallback?
|
|
45
|
-
];
|
|
46
|
-
export type RequestMethod = (...args: RequestMethodArgs) => http.ClientRequest;
|
|
47
|
-
/**
|
|
48
|
-
* Convert a URL object into a RequestOptions object.
|
|
49
|
-
*
|
|
50
|
-
* Copied from Node's internals (where it's used in http(s).request() and http(s).get()), modified only to use the
|
|
51
|
-
* RequestOptions type above.
|
|
52
|
-
*
|
|
53
|
-
* See https://github.com/nodejs/node/blob/master/lib/internal/url.js.
|
|
54
|
-
*/
|
|
55
|
-
export declare function urlToOptions(url: URL): RequestOptions;
|
|
56
|
-
/**
|
|
57
|
-
* Normalize inputs to `http(s).request()` and `http(s).get()`.
|
|
58
|
-
*
|
|
59
|
-
* Legal inputs to `http(s).request()` and `http(s).get()` can take one of ten forms:
|
|
60
|
-
* [ RequestOptions | string | URL ],
|
|
61
|
-
* [ RequestOptions | string | URL, RequestCallback ],
|
|
62
|
-
* [ string | URL, RequestOptions ], and
|
|
63
|
-
* [ string | URL, RequestOptions, RequestCallback ].
|
|
64
|
-
*
|
|
65
|
-
* This standardizes to one of two forms: [ RequestOptions ] and [ RequestOptions, RequestCallback ]. A similar thing is
|
|
66
|
-
* done as the first step of `http(s).request()` and `http(s).get()`; this just does it early so that we can interact
|
|
67
|
-
* with the args in a standard way.
|
|
68
|
-
*
|
|
69
|
-
* @param requestArgs The inputs to `http(s).request()` or `http(s).get()`, as an array.
|
|
70
|
-
*
|
|
71
|
-
* @returns Equivalent args of the form [ RequestOptions ] or [ RequestOptions, RequestCallback ].
|
|
72
|
-
*/
|
|
73
|
-
export declare function normalizeRequestArgs(httpModule: typeof http | typeof https, requestArgs: RequestMethodArgs): [
|
|
74
|
-
RequestOptions
|
|
75
|
-
] | [
|
|
76
|
-
RequestOptions,
|
|
77
|
-
RequestCallback
|
|
78
|
-
];
|
|
79
|
-
export {};
|
|
80
|
-
//# sourceMappingURL=http.d.ts.map
|