@sentry/node 9.32.0 → 9.34.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/index.js +50 -56
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/launchDarkly.js +43 -0
- package/build/cjs/integrations/featureFlagShims/launchDarkly.js.map +1 -0
- package/build/cjs/integrations/featureFlagShims/openFeature.js +55 -0
- package/build/cjs/integrations/featureFlagShims/openFeature.js.map +1 -0
- package/build/cjs/integrations/featureFlagShims/statsig.js +23 -0
- package/build/cjs/integrations/featureFlagShims/statsig.js.map +1 -0
- package/build/cjs/integrations/featureFlagShims/unleash.js +23 -0
- package/build/cjs/integrations/featureFlagShims/unleash.js.map +1 -0
- package/build/cjs/integrations/fs.js +2 -2
- package/build/cjs/integrations/fs.js.map +1 -1
- package/build/cjs/integrations/http/index.js +7 -11
- package/build/cjs/integrations/http/index.js.map +1 -1
- package/build/cjs/integrations/node-fetch/index.js +4 -5
- package/build/cjs/integrations/node-fetch/index.js.map +1 -1
- package/build/cjs/integrations/tracing/amqplib.js +4 -5
- package/build/cjs/integrations/tracing/amqplib.js.map +1 -1
- package/build/cjs/integrations/tracing/connect.js +3 -4
- package/build/cjs/integrations/tracing/connect.js.map +1 -1
- package/build/cjs/integrations/tracing/dataloader.js +3 -3
- package/build/cjs/integrations/tracing/dataloader.js.map +1 -1
- package/build/cjs/integrations/tracing/express.js +5 -7
- package/build/cjs/integrations/tracing/express.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/fastify-otel/index.js +5 -10
- package/build/cjs/integrations/tracing/fastify/fastify-otel/index.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/index.js +47 -10
- package/build/cjs/integrations/tracing/fastify/index.js.map +1 -1
- package/build/cjs/integrations/tracing/genericPool.js +3 -3
- package/build/cjs/integrations/tracing/genericPool.js.map +1 -1
- package/build/cjs/integrations/tracing/graphql.js +3 -4
- package/build/cjs/integrations/tracing/graphql.js.map +1 -1
- package/build/cjs/integrations/tracing/hapi/index.js +3 -4
- package/build/cjs/integrations/tracing/hapi/index.js.map +1 -1
- package/build/cjs/integrations/tracing/index.js +3 -0
- package/build/cjs/integrations/tracing/index.js.map +1 -1
- package/build/cjs/integrations/tracing/kafka.js +4 -5
- package/build/cjs/integrations/tracing/kafka.js.map +1 -1
- package/build/cjs/integrations/tracing/knex.js +3 -3
- package/build/cjs/integrations/tracing/knex.js.map +1 -1
- package/build/cjs/integrations/tracing/koa.js +4 -6
- package/build/cjs/integrations/tracing/koa.js.map +1 -1
- package/build/cjs/integrations/tracing/lrumemoizer.js +2 -2
- package/build/cjs/integrations/tracing/lrumemoizer.js.map +1 -1
- package/build/cjs/integrations/tracing/mongo.js +3 -4
- package/build/cjs/integrations/tracing/mongo.js.map +1 -1
- package/build/cjs/integrations/tracing/mongoose.js +3 -4
- package/build/cjs/integrations/tracing/mongoose.js.map +1 -1
- package/build/cjs/integrations/tracing/mysql.js +2 -2
- package/build/cjs/integrations/tracing/mysql.js.map +1 -1
- package/build/cjs/integrations/tracing/mysql2.js +3 -4
- package/build/cjs/integrations/tracing/mysql2.js.map +1 -1
- package/build/cjs/integrations/tracing/postgres.js +3 -4
- package/build/cjs/integrations/tracing/postgres.js.map +1 -1
- package/build/cjs/integrations/tracing/postgresjs.js +282 -0
- package/build/cjs/integrations/tracing/postgresjs.js.map +1 -0
- package/build/cjs/integrations/tracing/prisma.js +2 -2
- package/build/cjs/integrations/tracing/prisma.js.map +1 -1
- package/build/cjs/integrations/tracing/redis.js +3 -3
- package/build/cjs/integrations/tracing/redis.js.map +1 -1
- package/build/cjs/integrations/tracing/tedious.js +3 -3
- package/build/cjs/integrations/tracing/tedious.js.map +1 -1
- package/build/cjs/integrations/tracing/vercelai/index.js +9 -185
- package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/cjs/preload.js +2 -2
- package/build/cjs/preload.js.map +1 -1
- package/build/cjs/sdk/index.js +22 -203
- package/build/cjs/sdk/index.js.map +1 -1
- package/build/cjs/sdk/initOtel.js +4 -22
- package/build/cjs/sdk/initOtel.js.map +1 -1
- package/build/esm/index.js +7 -21
- package/build/esm/index.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/launchDarkly.js +40 -0
- package/build/esm/integrations/featureFlagShims/launchDarkly.js.map +1 -0
- package/build/esm/integrations/featureFlagShims/openFeature.js +52 -0
- package/build/esm/integrations/featureFlagShims/openFeature.js.map +1 -0
- package/build/esm/integrations/featureFlagShims/statsig.js +21 -0
- package/build/esm/integrations/featureFlagShims/statsig.js.map +1 -0
- package/build/esm/integrations/featureFlagShims/unleash.js +21 -0
- package/build/esm/integrations/featureFlagShims/unleash.js.map +1 -0
- package/build/esm/integrations/fs.js +1 -1
- package/build/esm/integrations/fs.js.map +1 -1
- package/build/esm/integrations/http/index.js +1 -5
- package/build/esm/integrations/http/index.js.map +1 -1
- package/build/esm/integrations/node-fetch/index.js +2 -3
- package/build/esm/integrations/node-fetch/index.js.map +1 -1
- package/build/esm/integrations/tracing/amqplib.js +1 -2
- package/build/esm/integrations/tracing/amqplib.js.map +1 -1
- package/build/esm/integrations/tracing/connect.js +1 -2
- package/build/esm/integrations/tracing/connect.js.map +1 -1
- package/build/esm/integrations/tracing/dataloader.js +1 -1
- package/build/esm/integrations/tracing/dataloader.js.map +1 -1
- package/build/esm/integrations/tracing/express.js +2 -4
- package/build/esm/integrations/tracing/express.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/fastify-otel/index.js +5 -10
- package/build/esm/integrations/tracing/fastify/fastify-otel/index.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/index.js +46 -9
- package/build/esm/integrations/tracing/fastify/index.js.map +1 -1
- package/build/esm/integrations/tracing/genericPool.js +1 -1
- package/build/esm/integrations/tracing/genericPool.js.map +1 -1
- package/build/esm/integrations/tracing/graphql.js +2 -3
- package/build/esm/integrations/tracing/graphql.js.map +1 -1
- package/build/esm/integrations/tracing/hapi/index.js +1 -2
- package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
- package/build/esm/integrations/tracing/index.js +3 -0
- package/build/esm/integrations/tracing/index.js.map +1 -1
- package/build/esm/integrations/tracing/kafka.js +1 -2
- package/build/esm/integrations/tracing/kafka.js.map +1 -1
- package/build/esm/integrations/tracing/knex.js +1 -1
- package/build/esm/integrations/tracing/knex.js.map +1 -1
- package/build/esm/integrations/tracing/koa.js +2 -4
- package/build/esm/integrations/tracing/koa.js.map +1 -1
- package/build/esm/integrations/tracing/lrumemoizer.js +1 -1
- package/build/esm/integrations/tracing/lrumemoizer.js.map +1 -1
- package/build/esm/integrations/tracing/mongo.js +1 -2
- package/build/esm/integrations/tracing/mongo.js.map +1 -1
- package/build/esm/integrations/tracing/mongoose.js +1 -2
- package/build/esm/integrations/tracing/mongoose.js.map +1 -1
- package/build/esm/integrations/tracing/mysql.js +1 -1
- package/build/esm/integrations/tracing/mysql.js.map +1 -1
- package/build/esm/integrations/tracing/mysql2.js +1 -2
- package/build/esm/integrations/tracing/mysql2.js.map +1 -1
- package/build/esm/integrations/tracing/postgres.js +1 -2
- package/build/esm/integrations/tracing/postgres.js.map +1 -1
- package/build/esm/integrations/tracing/postgresjs.js +278 -0
- package/build/esm/integrations/tracing/postgresjs.js.map +1 -0
- package/build/esm/integrations/tracing/prisma.js +1 -1
- package/build/esm/integrations/tracing/prisma.js.map +1 -1
- package/build/esm/integrations/tracing/redis.js +1 -1
- package/build/esm/integrations/tracing/redis.js.map +1 -1
- package/build/esm/integrations/tracing/tedious.js +1 -1
- package/build/esm/integrations/tracing/tedious.js.map +1 -1
- package/build/esm/integrations/tracing/vercelai/index.js +9 -185
- package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/preload.js +1 -1
- package/build/esm/preload.js.map +1 -1
- package/build/esm/sdk/index.js +22 -202
- package/build/esm/sdk/index.js.map +1 -1
- package/build/esm/sdk/initOtel.js +3 -21
- package/build/esm/sdk/initOtel.js.map +1 -1
- package/build/types/index.d.ts +4 -21
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/featureFlagShims/index.d.ts +5 -0
- package/build/types/integrations/featureFlagShims/index.d.ts.map +1 -0
- package/build/types/integrations/featureFlagShims/launchDarkly.d.ts +10 -0
- package/build/types/integrations/featureFlagShims/launchDarkly.d.ts.map +1 -0
- package/build/types/integrations/featureFlagShims/openFeature.d.ts +23 -0
- package/build/types/integrations/featureFlagShims/openFeature.d.ts.map +1 -0
- package/build/types/integrations/featureFlagShims/statsig.d.ts +6 -0
- package/build/types/integrations/featureFlagShims/statsig.d.ts.map +1 -0
- package/build/types/integrations/featureFlagShims/unleash.d.ts +6 -0
- package/build/types/integrations/featureFlagShims/unleash.d.ts.map +1 -0
- package/build/types/integrations/http/index.d.ts +1 -1
- package/build/types/integrations/http/index.d.ts.map +1 -1
- package/build/types/integrations/node-fetch/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/amqplib.d.ts.map +1 -1
- package/build/types/integrations/tracing/connect.d.ts.map +1 -1
- package/build/types/integrations/tracing/express.d.ts.map +1 -1
- package/build/types/integrations/tracing/fastify/index.d.ts +1 -1
- package/build/types/integrations/tracing/fastify/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/graphql.d.ts.map +1 -1
- package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/kafka.d.ts.map +1 -1
- package/build/types/integrations/tracing/koa.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongo.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongoose.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql2.d.ts.map +1 -1
- package/build/types/integrations/tracing/postgres.d.ts.map +1 -1
- package/build/types/integrations/tracing/postgresjs.d.ts +81 -0
- package/build/types/integrations/tracing/postgresjs.d.ts.map +1 -0
- package/build/types/integrations/tracing/vercelai/index.d.ts +5 -7
- package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -1
- package/build/types/sdk/index.d.ts +2 -6
- package/build/types/sdk/index.d.ts.map +1 -1
- package/build/types/sdk/initOtel.d.ts +1 -1
- package/build/types/sdk/initOtel.d.ts.map +1 -1
- package/build/types/types.d.ts +1 -1
- package/build/types/types.d.ts.map +1 -1
- package/build/types-ts3.8/index.d.ts +4 -21
- package/build/types-ts3.8/integrations/featureFlagShims/index.d.ts +5 -0
- package/build/types-ts3.8/integrations/featureFlagShims/launchDarkly.d.ts +10 -0
- package/build/types-ts3.8/integrations/featureFlagShims/openFeature.d.ts +23 -0
- package/build/types-ts3.8/integrations/featureFlagShims/statsig.d.ts +6 -0
- package/build/types-ts3.8/integrations/featureFlagShims/unleash.d.ts +6 -0
- package/build/types-ts3.8/integrations/http/index.d.ts +1 -1
- package/build/types-ts3.8/integrations/tracing/fastify/index.d.ts +1 -1
- package/build/types-ts3.8/integrations/tracing/postgresjs.d.ts +81 -0
- package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +5 -7
- package/build/types-ts3.8/sdk/index.d.ts +2 -6
- package/build/types-ts3.8/sdk/initOtel.d.ts +1 -1
- package/build/types-ts3.8/types.d.ts +1 -1
- package/package.json +4 -3
- package/build/cjs/cron/common.js +0 -56
- package/build/cjs/cron/common.js.map +0 -1
- package/build/cjs/cron/cron.js +0 -112
- package/build/cjs/cron/cron.js.map +0 -1
- package/build/cjs/cron/index.js +0 -15
- package/build/cjs/cron/index.js.map +0 -1
- package/build/cjs/cron/node-cron.js +0 -71
- package/build/cjs/cron/node-cron.js.map +0 -1
- package/build/cjs/cron/node-schedule.js +0 -65
- package/build/cjs/cron/node-schedule.js.map +0 -1
- package/build/cjs/integrations/anr/index.js +0 -238
- package/build/cjs/integrations/anr/index.js.map +0 -1
- package/build/cjs/integrations/childProcess.js +0 -100
- package/build/cjs/integrations/childProcess.js.map +0 -1
- package/build/cjs/integrations/context.js +0 -457
- package/build/cjs/integrations/context.js.map +0 -1
- package/build/cjs/integrations/contextlines.js +0 -405
- package/build/cjs/integrations/contextlines.js.map +0 -1
- package/build/cjs/integrations/http/SentryHttpInstrumentation.js +0 -558
- package/build/cjs/integrations/http/SentryHttpInstrumentation.js.map +0 -1
- package/build/cjs/integrations/local-variables/common.js +0 -69
- package/build/cjs/integrations/local-variables/common.js.map +0 -1
- package/build/cjs/integrations/local-variables/index.js +0 -12
- package/build/cjs/integrations/local-variables/index.js.map +0 -1
- package/build/cjs/integrations/local-variables/local-variables-async.js +0 -143
- package/build/cjs/integrations/local-variables/local-variables-async.js.map +0 -1
- package/build/cjs/integrations/local-variables/local-variables-sync.js +0 -410
- package/build/cjs/integrations/local-variables/local-variables-sync.js.map +0 -1
- package/build/cjs/integrations/modules.js +0 -135
- package/build/cjs/integrations/modules.js.map +0 -1
- package/build/cjs/integrations/node-fetch/SentryNodeFetchInstrumentation.js +0 -291
- package/build/cjs/integrations/node-fetch/SentryNodeFetchInstrumentation.js.map +0 -1
- package/build/cjs/integrations/onuncaughtexception.js +0 -134
- package/build/cjs/integrations/onuncaughtexception.js.map +0 -1
- package/build/cjs/integrations/onunhandledrejection.js +0 -89
- package/build/cjs/integrations/onunhandledrejection.js.map +0 -1
- package/build/cjs/integrations/processSession.js +0 -36
- package/build/cjs/integrations/processSession.js.map +0 -1
- package/build/cjs/integrations/spotlight.js +0 -101
- package/build/cjs/integrations/spotlight.js.map +0 -1
- package/build/cjs/integrations/tracing/vercelai/ai_sdk_attributes.js +0 -168
- package/build/cjs/integrations/tracing/vercelai/ai_sdk_attributes.js.map +0 -1
- package/build/cjs/integrations/winston.js +0 -151
- package/build/cjs/integrations/winston.js.map +0 -1
- package/build/cjs/logs/capture.js +0 -29
- package/build/cjs/logs/capture.js.map +0 -1
- package/build/cjs/logs/exports.js +0 -178
- package/build/cjs/logs/exports.js.map +0 -1
- package/build/cjs/nodeVersion.js +0 -12
- package/build/cjs/nodeVersion.js.map +0 -1
- package/build/cjs/otel/contextManager.js +0 -16
- package/build/cjs/otel/contextManager.js.map +0 -1
- package/build/cjs/otel/instrument.js +0 -139
- package/build/cjs/otel/instrument.js.map +0 -1
- package/build/cjs/proxy/base.js +0 -122
- package/build/cjs/proxy/base.js.map +0 -1
- package/build/cjs/proxy/index.js +0 -173
- package/build/cjs/proxy/index.js.map +0 -1
- package/build/cjs/proxy/parse-proxy-response.js +0 -104
- package/build/cjs/proxy/parse-proxy-response.js.map +0 -1
- package/build/cjs/sdk/api.js +0 -117
- package/build/cjs/sdk/api.js.map +0 -1
- package/build/cjs/sdk/client.js +0 -156
- package/build/cjs/sdk/client.js.map +0 -1
- package/build/cjs/transports/http.js +0 -158
- package/build/cjs/transports/http.js.map +0 -1
- package/build/cjs/utils/addOriginToSpan.js +0 -11
- package/build/cjs/utils/addOriginToSpan.js.map +0 -1
- package/build/cjs/utils/baggage.js +0 -36
- package/build/cjs/utils/baggage.js.map +0 -1
- package/build/cjs/utils/commonjs.js +0 -13
- package/build/cjs/utils/commonjs.js.map +0 -1
- package/build/cjs/utils/createMissingInstrumentationContext.js +0 -11
- package/build/cjs/utils/createMissingInstrumentationContext.js.map +0 -1
- package/build/cjs/utils/debug.js +0 -23
- package/build/cjs/utils/debug.js.map +0 -1
- package/build/cjs/utils/ensureIsWrapped.js +0 -41
- package/build/cjs/utils/ensureIsWrapped.js.map +0 -1
- package/build/cjs/utils/envToBool.js +0 -32
- package/build/cjs/utils/envToBool.js.map +0 -1
- package/build/cjs/utils/errorhandling.js +0 -42
- package/build/cjs/utils/errorhandling.js.map +0 -1
- package/build/cjs/utils/getRequestUrl.js +0 -18
- package/build/cjs/utils/getRequestUrl.js.map +0 -1
- package/build/cjs/utils/module.js +0 -60
- package/build/cjs/utils/module.js.map +0 -1
- package/build/esm/cron/common.js +0 -54
- package/build/esm/cron/common.js.map +0 -1
- package/build/esm/cron/cron.js +0 -110
- package/build/esm/cron/cron.js.map +0 -1
- package/build/esm/cron/index.js +0 -13
- package/build/esm/cron/index.js.map +0 -1
- package/build/esm/cron/node-cron.js +0 -69
- package/build/esm/cron/node-cron.js.map +0 -1
- package/build/esm/cron/node-schedule.js +0 -63
- package/build/esm/cron/node-schedule.js.map +0 -1
- package/build/esm/integrations/anr/index.js +0 -234
- package/build/esm/integrations/anr/index.js.map +0 -1
- package/build/esm/integrations/anr/worker-script.js +0 -2
- package/build/esm/integrations/childProcess.js +0 -98
- package/build/esm/integrations/childProcess.js.map +0 -1
- package/build/esm/integrations/context.js +0 -451
- package/build/esm/integrations/context.js.map +0 -1
- package/build/esm/integrations/contextlines.js +0 -399
- package/build/esm/integrations/contextlines.js.map +0 -1
- package/build/esm/integrations/http/SentryHttpInstrumentation.js +0 -555
- package/build/esm/integrations/http/SentryHttpInstrumentation.js.map +0 -1
- package/build/esm/integrations/local-variables/common.js +0 -64
- package/build/esm/integrations/local-variables/common.js.map +0 -1
- package/build/esm/integrations/local-variables/index.js +0 -10
- package/build/esm/integrations/local-variables/index.js.map +0 -1
- package/build/esm/integrations/local-variables/local-variables-async.js +0 -140
- package/build/esm/integrations/local-variables/local-variables-async.js.map +0 -1
- package/build/esm/integrations/local-variables/local-variables-sync.js +0 -405
- package/build/esm/integrations/local-variables/local-variables-sync.js.map +0 -1
- package/build/esm/integrations/local-variables/worker-script.js +0 -2
- package/build/esm/integrations/modules.js +0 -133
- package/build/esm/integrations/modules.js.map +0 -1
- package/build/esm/integrations/node-fetch/SentryNodeFetchInstrumentation.js +0 -289
- package/build/esm/integrations/node-fetch/SentryNodeFetchInstrumentation.js.map +0 -1
- package/build/esm/integrations/onuncaughtexception.js +0 -131
- package/build/esm/integrations/onuncaughtexception.js.map +0 -1
- package/build/esm/integrations/onunhandledrejection.js +0 -86
- package/build/esm/integrations/onunhandledrejection.js.map +0 -1
- package/build/esm/integrations/processSession.js +0 -34
- package/build/esm/integrations/processSession.js.map +0 -1
- package/build/esm/integrations/spotlight.js +0 -98
- package/build/esm/integrations/spotlight.js.map +0 -1
- package/build/esm/integrations/tracing/vercelai/ai_sdk_attributes.js +0 -152
- package/build/esm/integrations/tracing/vercelai/ai_sdk_attributes.js.map +0 -1
- package/build/esm/integrations/winston.js +0 -149
- package/build/esm/integrations/winston.js.map +0 -1
- package/build/esm/logs/capture.js +0 -27
- package/build/esm/logs/capture.js.map +0 -1
- package/build/esm/logs/exports.js +0 -170
- package/build/esm/logs/exports.js.map +0 -1
- package/build/esm/nodeVersion.js +0 -8
- package/build/esm/nodeVersion.js.map +0 -1
- package/build/esm/otel/contextManager.js +0 -14
- package/build/esm/otel/contextManager.js.map +0 -1
- package/build/esm/otel/instrument.js +0 -135
- package/build/esm/otel/instrument.js.map +0 -1
- package/build/esm/proxy/base.js +0 -120
- package/build/esm/proxy/base.js.map +0 -1
- package/build/esm/proxy/index.js +0 -171
- package/build/esm/proxy/index.js.map +0 -1
- package/build/esm/proxy/parse-proxy-response.js +0 -102
- package/build/esm/proxy/parse-proxy-response.js.map +0 -1
- package/build/esm/sdk/api.js +0 -114
- package/build/esm/sdk/api.js.map +0 -1
- package/build/esm/sdk/client.js +0 -154
- package/build/esm/sdk/client.js.map +0 -1
- package/build/esm/transports/http.js +0 -156
- package/build/esm/transports/http.js.map +0 -1
- package/build/esm/utils/addOriginToSpan.js +0 -9
- package/build/esm/utils/addOriginToSpan.js.map +0 -1
- package/build/esm/utils/baggage.js +0 -34
- package/build/esm/utils/baggage.js.map +0 -1
- package/build/esm/utils/commonjs.js +0 -11
- package/build/esm/utils/commonjs.js.map +0 -1
- package/build/esm/utils/createMissingInstrumentationContext.js +0 -9
- package/build/esm/utils/createMissingInstrumentationContext.js.map +0 -1
- package/build/esm/utils/debug.js +0 -21
- package/build/esm/utils/debug.js.map +0 -1
- package/build/esm/utils/ensureIsWrapped.js +0 -39
- package/build/esm/utils/ensureIsWrapped.js.map +0 -1
- package/build/esm/utils/envToBool.js +0 -28
- package/build/esm/utils/envToBool.js.map +0 -1
- package/build/esm/utils/errorhandling.js +0 -40
- package/build/esm/utils/errorhandling.js.map +0 -1
- package/build/esm/utils/getRequestUrl.js +0 -16
- package/build/esm/utils/getRequestUrl.js.map +0 -1
- package/build/esm/utils/module.js +0 -58
- package/build/esm/utils/module.js.map +0 -1
- package/build/types/cron/common.d.ts +0 -5
- package/build/types/cron/common.d.ts.map +0 -1
- package/build/types/cron/cron.d.ts +0 -43
- package/build/types/cron/cron.d.ts.map +0 -1
- package/build/types/cron/index.d.ts +0 -10
- package/build/types/cron/index.d.ts.map +0 -1
- package/build/types/cron/node-cron.d.ts +0 -27
- package/build/types/cron/node-cron.d.ts.map +0 -1
- package/build/types/cron/node-schedule.d.ts +0 -19
- package/build/types/cron/node-schedule.d.ts.map +0 -1
- package/build/types/integrations/anr/common.d.ts +0 -52
- package/build/types/integrations/anr/common.d.ts.map +0 -1
- package/build/types/integrations/anr/index.d.ts +0 -13
- package/build/types/integrations/anr/index.d.ts.map +0 -1
- package/build/types/integrations/anr/worker.d.ts +0 -2
- package/build/types/integrations/anr/worker.d.ts.map +0 -1
- package/build/types/integrations/childProcess.d.ts +0 -20
- package/build/types/integrations/childProcess.d.ts.map +0 -1
- package/build/types/integrations/context.d.ts +0 -30
- package/build/types/integrations/context.d.ts.map +0 -1
- package/build/types/integrations/contextlines.d.ts +0 -31
- package/build/types/integrations/contextlines.d.ts.map +0 -1
- package/build/types/integrations/http/SentryHttpInstrumentation.d.ts +0 -131
- package/build/types/integrations/http/SentryHttpInstrumentation.d.ts.map +0 -1
- package/build/types/integrations/local-variables/common.d.ts +0 -66
- package/build/types/integrations/local-variables/common.d.ts.map +0 -1
- package/build/types/integrations/local-variables/index.d.ts +0 -4
- package/build/types/integrations/local-variables/index.d.ts.map +0 -1
- package/build/types/integrations/local-variables/local-variables-async.d.ts +0 -7
- package/build/types/integrations/local-variables/local-variables-async.d.ts.map +0 -1
- package/build/types/integrations/local-variables/local-variables-sync.d.ts +0 -34
- package/build/types/integrations/local-variables/local-variables-sync.d.ts.map +0 -1
- package/build/types/integrations/local-variables/worker.d.ts +0 -2
- package/build/types/integrations/local-variables/worker.d.ts.map +0 -1
- package/build/types/integrations/modules.d.ts +0 -17
- package/build/types/integrations/modules.d.ts.map +0 -1
- package/build/types/integrations/node-fetch/SentryNodeFetchInstrumentation.d.ts +0 -56
- package/build/types/integrations/node-fetch/SentryNodeFetchInstrumentation.d.ts.map +0 -1
- package/build/types/integrations/onuncaughtexception.d.ts +0 -31
- package/build/types/integrations/onuncaughtexception.d.ts.map +0 -1
- package/build/types/integrations/onunhandledrejection.d.ts +0 -23
- package/build/types/integrations/onunhandledrejection.d.ts.map +0 -1
- package/build/types/integrations/processSession.d.ts +0 -5
- package/build/types/integrations/processSession.d.ts.map +0 -1
- package/build/types/integrations/spotlight.d.ts +0 -18
- package/build/types/integrations/spotlight.d.ts.map +0 -1
- package/build/types/integrations/tracing/vercelai/ai_sdk_attributes.d.ts +0 -669
- package/build/types/integrations/tracing/vercelai/ai_sdk_attributes.d.ts.map +0 -1
- package/build/types/integrations/winston.d.ts +0 -44
- package/build/types/integrations/winston.d.ts.map +0 -1
- package/build/types/logs/capture.d.ts +0 -11
- package/build/types/logs/capture.d.ts.map +0 -1
- package/build/types/logs/exports.d.ts +0 -150
- package/build/types/logs/exports.d.ts.map +0 -1
- package/build/types/nodeVersion.d.ts +0 -8
- package/build/types/nodeVersion.d.ts.map +0 -1
- package/build/types/otel/contextManager.d.ts +0 -10
- package/build/types/otel/contextManager.d.ts.map +0 -1
- package/build/types/otel/instrument.d.ts +0 -23
- package/build/types/otel/instrument.d.ts.map +0 -1
- package/build/types/proxy/base.d.ts +0 -65
- package/build/types/proxy/base.d.ts.map +0 -1
- package/build/types/proxy/helpers.d.ts +0 -42
- package/build/types/proxy/helpers.d.ts.map +0 -1
- package/build/types/proxy/index.d.ts +0 -73
- package/build/types/proxy/index.d.ts.map +0 -1
- package/build/types/proxy/parse-proxy-response.d.ts +0 -43
- package/build/types/proxy/parse-proxy-response.d.ts.map +0 -1
- package/build/types/sdk/api.d.ts +0 -8
- package/build/types/sdk/api.d.ts.map +0 -1
- package/build/types/sdk/client.d.ts +0 -29
- package/build/types/sdk/client.d.ts.map +0 -1
- package/build/types/sdk/scope.d.ts +0 -7
- package/build/types/sdk/scope.d.ts.map +0 -1
- package/build/types/transports/http-module.d.ts +0 -31
- package/build/types/transports/http-module.d.ts.map +0 -1
- package/build/types/transports/http.d.ts +0 -21
- package/build/types/transports/http.d.ts.map +0 -1
- package/build/types/transports/index.d.ts +0 -3
- package/build/types/transports/index.d.ts.map +0 -1
- package/build/types/utils/addOriginToSpan.d.ts +0 -5
- package/build/types/utils/addOriginToSpan.d.ts.map +0 -1
- package/build/types/utils/baggage.d.ts +0 -6
- package/build/types/utils/baggage.d.ts.map +0 -1
- package/build/types/utils/commonjs.d.ts +0 -3
- package/build/types/utils/commonjs.d.ts.map +0 -1
- package/build/types/utils/createMissingInstrumentationContext.d.ts +0 -3
- package/build/types/utils/createMissingInstrumentationContext.d.ts.map +0 -1
- package/build/types/utils/debug.d.ts +0 -5
- package/build/types/utils/debug.d.ts.map +0 -1
- package/build/types/utils/ensureIsWrapped.d.ts +0 -5
- package/build/types/utils/ensureIsWrapped.d.ts.map +0 -1
- package/build/types/utils/entry-point.d.ts +0 -24
- package/build/types/utils/entry-point.d.ts.map +0 -1
- package/build/types/utils/envToBool.d.ts +0 -13
- package/build/types/utils/envToBool.d.ts.map +0 -1
- package/build/types/utils/errorhandling.d.ts +0 -5
- package/build/types/utils/errorhandling.d.ts.map +0 -1
- package/build/types/utils/getRequestUrl.d.ts +0 -5
- package/build/types/utils/getRequestUrl.d.ts.map +0 -1
- package/build/types/utils/module.d.ts +0 -3
- package/build/types/utils/module.d.ts.map +0 -1
- package/build/types/utils/prepareEvent.d.ts +0 -17
- package/build/types/utils/prepareEvent.d.ts.map +0 -1
- package/build/types-ts3.8/cron/common.d.ts +0 -5
- package/build/types-ts3.8/cron/cron.d.ts +0 -43
- package/build/types-ts3.8/cron/index.d.ts +0 -10
- package/build/types-ts3.8/cron/node-cron.d.ts +0 -27
- package/build/types-ts3.8/cron/node-schedule.d.ts +0 -19
- package/build/types-ts3.8/integrations/anr/common.d.ts +0 -52
- package/build/types-ts3.8/integrations/anr/index.d.ts +0 -13
- package/build/types-ts3.8/integrations/anr/worker.d.ts +0 -2
- package/build/types-ts3.8/integrations/childProcess.d.ts +0 -20
- package/build/types-ts3.8/integrations/context.d.ts +0 -30
- package/build/types-ts3.8/integrations/contextlines.d.ts +0 -31
- package/build/types-ts3.8/integrations/http/SentryHttpInstrumentation.d.ts +0 -133
- package/build/types-ts3.8/integrations/local-variables/common.d.ts +0 -66
- package/build/types-ts3.8/integrations/local-variables/index.d.ts +0 -4
- package/build/types-ts3.8/integrations/local-variables/local-variables-async.d.ts +0 -7
- package/build/types-ts3.8/integrations/local-variables/local-variables-sync.d.ts +0 -34
- package/build/types-ts3.8/integrations/local-variables/worker.d.ts +0 -2
- package/build/types-ts3.8/integrations/modules.d.ts +0 -17
- package/build/types-ts3.8/integrations/node-fetch/SentryNodeFetchInstrumentation.d.ts +0 -56
- package/build/types-ts3.8/integrations/onuncaughtexception.d.ts +0 -31
- package/build/types-ts3.8/integrations/onunhandledrejection.d.ts +0 -23
- package/build/types-ts3.8/integrations/processSession.d.ts +0 -5
- package/build/types-ts3.8/integrations/spotlight.d.ts +0 -18
- package/build/types-ts3.8/integrations/tracing/vercelai/ai_sdk_attributes.d.ts +0 -669
- package/build/types-ts3.8/integrations/winston.d.ts +0 -44
- package/build/types-ts3.8/logs/capture.d.ts +0 -18
- package/build/types-ts3.8/logs/exports.d.ts +0 -150
- package/build/types-ts3.8/nodeVersion.d.ts +0 -8
- package/build/types-ts3.8/otel/contextManager.d.ts +0 -10
- package/build/types-ts3.8/otel/instrument.d.ts +0 -23
- package/build/types-ts3.8/proxy/base.d.ts +0 -60
- package/build/types-ts3.8/proxy/helpers.d.ts +0 -38
- package/build/types-ts3.8/proxy/index.d.ts +0 -74
- package/build/types-ts3.8/proxy/parse-proxy-response.d.ts +0 -40
- package/build/types-ts3.8/sdk/api.d.ts +0 -8
- package/build/types-ts3.8/sdk/client.d.ts +0 -32
- package/build/types-ts3.8/sdk/scope.d.ts +0 -7
- package/build/types-ts3.8/transports/http-module.d.ts +0 -28
- package/build/types-ts3.8/transports/http.d.ts +0 -20
- package/build/types-ts3.8/transports/index.d.ts +0 -3
- package/build/types-ts3.8/utils/addOriginToSpan.d.ts +0 -5
- package/build/types-ts3.8/utils/baggage.d.ts +0 -6
- package/build/types-ts3.8/utils/commonjs.d.ts +0 -3
- package/build/types-ts3.8/utils/createMissingInstrumentationContext.d.ts +0 -3
- package/build/types-ts3.8/utils/debug.d.ts +0 -5
- package/build/types-ts3.8/utils/ensureIsWrapped.d.ts +0 -5
- package/build/types-ts3.8/utils/entry-point.d.ts +0 -24
- package/build/types-ts3.8/utils/envToBool.d.ts +0 -13
- package/build/types-ts3.8/utils/errorhandling.d.ts +0 -5
- package/build/types-ts3.8/utils/getRequestUrl.d.ts +0 -5
- package/build/types-ts3.8/utils/module.d.ts +0 -3
- package/build/types-ts3.8/utils/prepareEvent.d.ts +0 -17
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { posix, sep } from 'node:path';
|
|
2
|
-
import { dirname } from '@sentry/core';
|
|
3
|
-
|
|
4
|
-
/** normalizes Windows paths */
|
|
5
|
-
function normalizeWindowsPath(path) {
|
|
6
|
-
return path
|
|
7
|
-
.replace(/^[A-Z]:/, '') // remove Windows-style prefix
|
|
8
|
-
.replace(/\\/g, '/'); // replace all `\` instances with `/`
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
/** Creates a function that gets the module name from a filename */
|
|
12
|
-
function createGetModuleFromFilename(
|
|
13
|
-
basePath = process.argv[1] ? dirname(process.argv[1]) : process.cwd(),
|
|
14
|
-
isWindows = sep === '\\',
|
|
15
|
-
) {
|
|
16
|
-
const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;
|
|
17
|
-
|
|
18
|
-
return (filename) => {
|
|
19
|
-
if (!filename) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const normalizedFilename = isWindows ? normalizeWindowsPath(filename) : filename;
|
|
24
|
-
|
|
25
|
-
// eslint-disable-next-line prefer-const
|
|
26
|
-
let { dir, base: file, ext } = posix.parse(normalizedFilename);
|
|
27
|
-
|
|
28
|
-
if (ext === '.js' || ext === '.mjs' || ext === '.cjs') {
|
|
29
|
-
file = file.slice(0, ext.length * -1);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// The file name might be URI-encoded which we want to decode to
|
|
33
|
-
// the original file name.
|
|
34
|
-
const decodedFile = decodeURIComponent(file);
|
|
35
|
-
|
|
36
|
-
if (!dir) {
|
|
37
|
-
// No dirname whatsoever
|
|
38
|
-
dir = '.';
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
const n = dir.lastIndexOf('/node_modules');
|
|
42
|
-
if (n > -1) {
|
|
43
|
-
return `${dir.slice(n + 14).replace(/\//g, '.')}:${decodedFile}`;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
// Let's see if it's a part of the main module
|
|
47
|
-
// To be a part of main module, it has to share the same base
|
|
48
|
-
if (dir.startsWith(normalizedBase)) {
|
|
49
|
-
const moduleName = dir.slice(normalizedBase.length + 1).replace(/\//g, '.');
|
|
50
|
-
return moduleName ? `${moduleName}:${decodedFile}` : decodedFile;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return decodedFile;
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export { createGetModuleFromFilename };
|
|
58
|
-
//# sourceMappingURL=module.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"module.js","sources":["../../../src/utils/module.ts"],"sourcesContent":["import { posix, sep } from 'node:path';\nimport { dirname } from '@sentry/core';\n\n/** normalizes Windows paths */\nfunction normalizeWindowsPath(path: string): string {\n return path\n .replace(/^[A-Z]:/, '') // remove Windows-style prefix\n .replace(/\\\\/g, '/'); // replace all `\\` instances with `/`\n}\n\n/** Creates a function that gets the module name from a filename */\nexport function createGetModuleFromFilename(\n basePath: string = process.argv[1] ? dirname(process.argv[1]) : process.cwd(),\n isWindows: boolean = sep === '\\\\',\n): (filename: string | undefined) => string | undefined {\n const normalizedBase = isWindows ? normalizeWindowsPath(basePath) : basePath;\n\n return (filename: string | undefined) => {\n if (!filename) {\n return;\n }\n\n const normalizedFilename = isWindows ? normalizeWindowsPath(filename) : filename;\n\n // eslint-disable-next-line prefer-const\n let { dir, base: file, ext } = posix.parse(normalizedFilename);\n\n if (ext === '.js' || ext === '.mjs' || ext === '.cjs') {\n file = file.slice(0, ext.length * -1);\n }\n\n // The file name might be URI-encoded which we want to decode to\n // the original file name.\n const decodedFile = decodeURIComponent(file);\n\n if (!dir) {\n // No dirname whatsoever\n dir = '.';\n }\n\n const n = dir.lastIndexOf('/node_modules');\n if (n > -1) {\n return `${dir.slice(n + 14).replace(/\\//g, '.')}:${decodedFile}`;\n }\n\n // Let's see if it's a part of the main module\n // To be a part of main module, it has to share the same base\n if (dir.startsWith(normalizedBase)) {\n const moduleName = dir.slice(normalizedBase.length + 1).replace(/\\//g, '.');\n return moduleName ? `${moduleName}:${decodedFile}` : decodedFile;\n }\n\n return decodedFile;\n };\n}\n"],"names":[],"mappings":";;;AAGA;AACA,SAAS,oBAAoB,CAAC,IAAI,EAAkB;AACpD,EAAE,OAAO;AACT,KAAK,OAAO,CAAC,SAAS,EAAE,EAAE,CAAA;AAC1B,KAAK,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;AACxB;;AAEA;AACO,SAAS,2BAA2B;AAC3C,EAAE,QAAQ,GAAW,OAAO,CAAC,IAAI,CAAC,CAAC,CAAE,GAAE,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA,GAAI,OAAO,CAAC,GAAG,EAAE;AAC/E,EAAE,SAAS,GAAY,GAAA,KAAQ,IAAI;AACnC,EAAwD;AACxD,EAAE,MAAM,cAAe,GAAE,SAAU,GAAE,oBAAoB,CAAC,QAAQ,CAAE,GAAE,QAAQ;;AAE9E,EAAE,OAAO,CAAC,QAAQ,KAAyB;AAC3C,IAAI,IAAI,CAAC,QAAQ,EAAE;AACnB,MAAM;AACN;;AAEA,IAAI,MAAM,kBAAmB,GAAE,SAAU,GAAE,oBAAoB,CAAC,QAAQ,CAAE,GAAE,QAAQ;;AAEpF;AACA,IAAI,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,GAAI,EAAA,GAAI,KAAK,CAAC,KAAK,CAAC,kBAAkB,CAAC;;AAElE,IAAI,IAAI,GAAI,KAAI,KAAM,IAAG,GAAI,KAAI,MAAO,IAAG,GAAI,KAAI,MAAM,EAAE;AAC3D,MAAM,IAAK,GAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,MAAA,GAAS,EAAE,CAAC;AAC3C;;AAEA;AACA;AACA,IAAI,MAAM,WAAY,GAAE,kBAAkB,CAAC,IAAI,CAAC;;AAEhD,IAAI,IAAI,CAAC,GAAG,EAAE;AACd;AACA,MAAM,GAAA,GAAM,GAAG;AACf;;AAEA,IAAI,MAAM,IAAI,GAAG,CAAC,WAAW,CAAC,eAAe,CAAC;AAC9C,IAAI,IAAI,CAAA,GAAI,EAAE,EAAE;AAChB,MAAM,OAAO,CAAC,EAAA,GAAA,CAAA,KAAA,CAAA,CAAA,GAAA,EAAA,CAAA,CAAA,OAAA,CAAA,KAAA,EAAA,GAAA,CAAA,CAAA,CAAA,EAAA,WAAA,CAAA,CAAA;AACA;;AAEA;AACA;AACA,IAAA,IAAA,GAAA,CAAA,UAAA,CAAA,cAAA,CAAA,EAAA;AACA,MAAA,MAAA,UAAA,GAAA,GAAA,CAAA,KAAA,CAAA,cAAA,CAAA,MAAA,GAAA,CAAA,CAAA,CAAA,OAAA,CAAA,KAAA,EAAA,GAAA,CAAA;AACA,MAAA,OAAA,UAAA,GAAA,CAAA,EAAA,UAAA,CAAA,CAAA,EAAA,WAAA,CAAA,CAAA,GAAA,WAAA;AACA;;AAEA,IAAA,OAAA,WAAA;AACA,GAAA;AACA;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../src/cron/common.ts"],"names":[],"mappings":"AAyCA;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAM/D"}
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
export type CronJobParams = {
|
|
2
|
-
cronTime: string | Date;
|
|
3
|
-
onTick: (context: unknown, onComplete?: unknown) => void | Promise<void>;
|
|
4
|
-
onComplete?: () => void | Promise<void>;
|
|
5
|
-
start?: boolean | null;
|
|
6
|
-
context?: unknown;
|
|
7
|
-
runOnInit?: boolean | null;
|
|
8
|
-
unrefTimeout?: boolean | null;
|
|
9
|
-
} & ({
|
|
10
|
-
timeZone?: string | null;
|
|
11
|
-
utcOffset?: never;
|
|
12
|
-
} | {
|
|
13
|
-
timeZone?: never;
|
|
14
|
-
utcOffset?: number | null;
|
|
15
|
-
});
|
|
16
|
-
export type CronJob = {};
|
|
17
|
-
export type CronJobConstructor = {
|
|
18
|
-
from: (param: CronJobParams) => CronJob;
|
|
19
|
-
new (cronTime: CronJobParams['cronTime'], onTick: CronJobParams['onTick'], onComplete?: CronJobParams['onComplete'], start?: CronJobParams['start'], timeZone?: CronJobParams['timeZone'], context?: CronJobParams['context'], runOnInit?: CronJobParams['runOnInit'], utcOffset?: null, unrefTimeout?: CronJobParams['unrefTimeout']): CronJob;
|
|
20
|
-
new (cronTime: CronJobParams['cronTime'], onTick: CronJobParams['onTick'], onComplete?: CronJobParams['onComplete'], start?: CronJobParams['start'], timeZone?: null, context?: CronJobParams['context'], runOnInit?: CronJobParams['runOnInit'], utcOffset?: CronJobParams['utcOffset'], unrefTimeout?: CronJobParams['unrefTimeout']): CronJob;
|
|
21
|
-
};
|
|
22
|
-
/**
|
|
23
|
-
* Instruments the `cron` library to send a check-in event to Sentry for each job execution.
|
|
24
|
-
*
|
|
25
|
-
* ```ts
|
|
26
|
-
* import * as Sentry from '@sentry/node';
|
|
27
|
-
* import { CronJob } from 'cron';
|
|
28
|
-
*
|
|
29
|
-
* const CronJobWithCheckIn = Sentry.cron.instrumentCron(CronJob, 'my-cron-job');
|
|
30
|
-
*
|
|
31
|
-
* // use the constructor
|
|
32
|
-
* const job = new CronJobWithCheckIn('* * * * *', () => {
|
|
33
|
-
* console.log('You will see this message every minute');
|
|
34
|
-
* });
|
|
35
|
-
*
|
|
36
|
-
* // or from
|
|
37
|
-
* const job = CronJobWithCheckIn.from({ cronTime: '* * * * *', onTick: () => {
|
|
38
|
-
* console.log('You will see this message every minute');
|
|
39
|
-
* });
|
|
40
|
-
* ```
|
|
41
|
-
*/
|
|
42
|
-
export declare function instrumentCron<T>(lib: T & CronJobConstructor, monitorSlug: string): T;
|
|
43
|
-
//# sourceMappingURL=cron.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cron.d.ts","sourceRoot":"","sources":["../../../src/cron/cron.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACzE,UAAU,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,KAAK,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;IAC3B,YAAY,CAAC,EAAE,OAAO,GAAG,IAAI,CAAC;CAC/B,GAAG,CACA;IACE,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,SAAS,CAAC,EAAE,KAAK,CAAC;CACnB,GACD;IACE,QAAQ,CAAC,EAAE,KAAK,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B,CACJ,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG,EAErB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,CAAC,KAAK,EAAE,aAAa,KAAK,OAAO,CAAC;IAExC,KACE,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,EACnC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,EAC/B,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,EACxC,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,EAC9B,QAAQ,CAAC,EAAE,aAAa,CAAC,UAAU,CAAC,EACpC,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,EAClC,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,EACtC,SAAS,CAAC,EAAE,IAAI,EAChB,YAAY,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,GAC3C,OAAO,CAAC;IACX,KACE,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,EACnC,MAAM,EAAE,aAAa,CAAC,QAAQ,CAAC,EAC/B,UAAU,CAAC,EAAE,aAAa,CAAC,YAAY,CAAC,EACxC,KAAK,CAAC,EAAE,aAAa,CAAC,OAAO,CAAC,EAC9B,QAAQ,CAAC,EAAE,IAAI,EACf,OAAO,CAAC,EAAE,aAAa,CAAC,SAAS,CAAC,EAClC,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,EACtC,SAAS,CAAC,EAAE,aAAa,CAAC,WAAW,CAAC,EACtC,YAAY,CAAC,EAAE,aAAa,CAAC,cAAc,CAAC,GAC3C,OAAO,CAAC;CACZ,CAAC;AAIF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,kBAAkB,EAAE,WAAW,EAAE,MAAM,GAAG,CAAC,CAiFrF"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { instrumentCron } from './cron';
|
|
2
|
-
import { instrumentNodeCron } from './node-cron';
|
|
3
|
-
import { instrumentNodeSchedule } from './node-schedule';
|
|
4
|
-
/** Methods to instrument cron libraries for Sentry check-ins */
|
|
5
|
-
export declare const cron: {
|
|
6
|
-
instrumentCron: typeof instrumentCron;
|
|
7
|
-
instrumentNodeCron: typeof instrumentNodeCron;
|
|
8
|
-
instrumentNodeSchedule: typeof instrumentNodeSchedule;
|
|
9
|
-
};
|
|
10
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cron/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxC,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,gEAAgE;AAChE,eAAO,MAAM,IAAI;;;;CAIhB,CAAC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface NodeCronOptions {
|
|
2
|
-
name: string;
|
|
3
|
-
timezone?: string;
|
|
4
|
-
}
|
|
5
|
-
export interface NodeCron {
|
|
6
|
-
schedule: (cronExpression: string, callback: () => void, options: NodeCronOptions | undefined) => unknown;
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Wraps the `node-cron` library with check-in monitoring.
|
|
10
|
-
*
|
|
11
|
-
* ```ts
|
|
12
|
-
* import * as Sentry from "@sentry/node";
|
|
13
|
-
* import * as cron from "node-cron";
|
|
14
|
-
*
|
|
15
|
-
* const cronWithCheckIn = Sentry.cron.instrumentNodeCron(cron);
|
|
16
|
-
*
|
|
17
|
-
* cronWithCheckIn.schedule(
|
|
18
|
-
* "* * * * *",
|
|
19
|
-
* () => {
|
|
20
|
-
* console.log("running a task every minute");
|
|
21
|
-
* },
|
|
22
|
-
* { name: "my-cron-job" },
|
|
23
|
-
* );
|
|
24
|
-
* ```
|
|
25
|
-
*/
|
|
26
|
-
export declare function instrumentNodeCron<T>(lib: Partial<NodeCron> & T): T;
|
|
27
|
-
//# sourceMappingURL=node-cron.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-cron.d.ts","sourceRoot":"","sources":["../../../src/cron/node-cron.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,QAAQ;IACvB,QAAQ,EAAE,CAAC,cAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,IAAI,EAAE,OAAO,EAAE,eAAe,GAAG,SAAS,KAAK,OAAO,CAAC;CAC3G;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,GAAG,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,CAAC,CA4CnE"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface NodeSchedule {
|
|
2
|
-
scheduleJob(nameOrExpression: string | Date | object, expressionOrCallback: string | Date | object | (() => void), callback?: () => void): unknown;
|
|
3
|
-
}
|
|
4
|
-
/**
|
|
5
|
-
* Instruments the `node-schedule` library to send a check-in event to Sentry for each job execution.
|
|
6
|
-
*
|
|
7
|
-
* ```ts
|
|
8
|
-
* import * as Sentry from '@sentry/node';
|
|
9
|
-
* import * as schedule from 'node-schedule';
|
|
10
|
-
*
|
|
11
|
-
* const scheduleWithCheckIn = Sentry.cron.instrumentNodeSchedule(schedule);
|
|
12
|
-
*
|
|
13
|
-
* const job = scheduleWithCheckIn.scheduleJob('my-cron-job', '* * * * *', () => {
|
|
14
|
-
* console.log('You will see this message every minute');
|
|
15
|
-
* });
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export declare function instrumentNodeSchedule<T>(lib: T & NodeSchedule): T;
|
|
19
|
-
//# sourceMappingURL=node-schedule.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-schedule.d.ts","sourceRoot":"","sources":["../../../src/cron/node-schedule.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,WAAW,CACT,gBAAgB,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,EACxC,oBAAoB,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,CAAC,MAAM,IAAI,CAAC,EAC3D,QAAQ,CAAC,EAAE,MAAM,IAAI,GACpB,OAAO,CAAC;CACZ;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,YAAY,GAAG,CAAC,CA0ClE"}
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { Contexts, DsnComponents, Primitive, SdkMetadata } from '@sentry/core';
|
|
2
|
-
export interface AnrIntegrationOptions {
|
|
3
|
-
/**
|
|
4
|
-
* Interval to send heartbeat messages to the ANR worker.
|
|
5
|
-
*
|
|
6
|
-
* Defaults to 50ms.
|
|
7
|
-
*/
|
|
8
|
-
pollInterval: number;
|
|
9
|
-
/**
|
|
10
|
-
* Threshold in milliseconds to trigger an ANR event.
|
|
11
|
-
*
|
|
12
|
-
* Defaults to 5000ms.
|
|
13
|
-
*/
|
|
14
|
-
anrThreshold: number;
|
|
15
|
-
/**
|
|
16
|
-
* Whether to capture a stack trace when the ANR event is triggered.
|
|
17
|
-
*
|
|
18
|
-
* Defaults to `false`.
|
|
19
|
-
*
|
|
20
|
-
* This uses the node debugger which enables the inspector API and opens the required ports.
|
|
21
|
-
*/
|
|
22
|
-
captureStackTrace: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Maximum number of ANR events to send.
|
|
25
|
-
*
|
|
26
|
-
* Defaults to 1.
|
|
27
|
-
*/
|
|
28
|
-
maxAnrEvents: number;
|
|
29
|
-
/**
|
|
30
|
-
* Tags to include with ANR events.
|
|
31
|
-
*/
|
|
32
|
-
staticTags: {
|
|
33
|
-
[key: string]: Primitive;
|
|
34
|
-
};
|
|
35
|
-
/**
|
|
36
|
-
* @ignore Internal use only.
|
|
37
|
-
*
|
|
38
|
-
* If this is supplied, stack frame filenames will be rewritten to be relative to this path.
|
|
39
|
-
*/
|
|
40
|
-
appRootPath: string | undefined;
|
|
41
|
-
}
|
|
42
|
-
export interface WorkerStartData extends AnrIntegrationOptions {
|
|
43
|
-
debug: boolean;
|
|
44
|
-
sdkMetadata: SdkMetadata;
|
|
45
|
-
dsn: DsnComponents;
|
|
46
|
-
tunnel: string | undefined;
|
|
47
|
-
release: string | undefined;
|
|
48
|
-
environment: string;
|
|
49
|
-
dist: string | undefined;
|
|
50
|
-
contexts: Contexts;
|
|
51
|
-
}
|
|
52
|
-
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/integrations/anr/common.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEpF,MAAM,WAAW,qBAAqB;IACpC;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;;;;;OAMG;IACH,iBAAiB,EAAE,OAAO,CAAC;IAC3B;;;;OAIG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,UAAU,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAA;KAAE,CAAC;IACzC;;;;OAIG;IACH,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAED,MAAM,WAAW,eAAgB,SAAQ,qBAAqB;IAC5D,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,WAAW,CAAC;IACzB,GAAG,EAAE,aAAa,CAAC;IACnB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;CACpB"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { Integration } from '@sentry/core';
|
|
2
|
-
import type { AnrIntegrationOptions } from './common';
|
|
3
|
-
export declare const base64WorkerScript = "###AnrWorkerScript###";
|
|
4
|
-
type AnrInternal = {
|
|
5
|
-
startWorker: () => void;
|
|
6
|
-
stopWorker: () => void;
|
|
7
|
-
};
|
|
8
|
-
type AnrReturn = (options?: Partial<AnrIntegrationOptions>) => Integration & AnrInternal;
|
|
9
|
-
export declare const anrIntegration: AnrReturn;
|
|
10
|
-
export declare function disableAnrDetectionForCallback<T>(callback: () => T): T;
|
|
11
|
-
export declare function disableAnrDetectionForCallback<T>(callback: () => Promise<T>): Promise<T>;
|
|
12
|
-
export {};
|
|
13
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/anr/index.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAA8B,WAAW,EAA4B,MAAM,cAAc,CAAC;AAetG,OAAO,KAAK,EAAE,qBAAqB,EAAmB,MAAM,UAAU,CAAC;AAKvE,eAAO,MAAM,kBAAkB,0BAA0B,CAAC;AA4C1D,KAAK,WAAW,GAAG;IAAE,WAAW,EAAE,MAAM,IAAI,CAAC;IAAC,UAAU,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AAkDvE,KAAK,SAAS,GAAG,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,KAAK,WAAW,GAAG,WAAW,CAAC;AAEzF,eAAO,MAAM,cAAc,WAAkD,CAAC;AA8G9E,wBAAgB,8BAA8B,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;AACxE,wBAAgB,8BAA8B,CAAC,CAAC,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"worker.d.ts","sourceRoot":"","sources":["../../../../src/integrations/anr/worker.ts"],"names":[],"mappings":""}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
interface Options {
|
|
2
|
-
/**
|
|
3
|
-
* Whether to include child process arguments in breadcrumbs data.
|
|
4
|
-
*
|
|
5
|
-
* @default false
|
|
6
|
-
*/
|
|
7
|
-
includeChildProcessArgs?: boolean;
|
|
8
|
-
/**
|
|
9
|
-
* Whether to capture errors from worker threads.
|
|
10
|
-
*
|
|
11
|
-
* @default true
|
|
12
|
-
*/
|
|
13
|
-
captureWorkerErrors?: boolean;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Capture breadcrumbs and events for child processes and worker threads.
|
|
17
|
-
*/
|
|
18
|
-
export declare const childProcessIntegration: (options?: Options | undefined) => import("@sentry/core").Integration;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=childProcess.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"childProcess.d.ts","sourceRoot":"","sources":["../../../src/integrations/childProcess.ts"],"names":[],"mappings":"AAKA,UAAU,OAAO;IACf;;;;OAIG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAElC;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAID;;GAEG;AACH,eAAO,MAAM,uBAAuB,uEAiBlC,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { readdir, readFile } from 'node:fs';
|
|
3
|
-
import type { AppContext, DeviceContext } from '@sentry/core';
|
|
4
|
-
export declare const readFileAsync: typeof readFile.__promisify__;
|
|
5
|
-
export declare const readDirAsync: typeof readdir.__promisify__;
|
|
6
|
-
interface DeviceContextOptions {
|
|
7
|
-
cpu?: boolean;
|
|
8
|
-
memory?: boolean;
|
|
9
|
-
}
|
|
10
|
-
interface ContextOptions {
|
|
11
|
-
app?: boolean;
|
|
12
|
-
os?: boolean;
|
|
13
|
-
device?: DeviceContextOptions | boolean;
|
|
14
|
-
culture?: boolean;
|
|
15
|
-
cloudResource?: boolean;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Capture context about the environment and the device that the client is running on, to events.
|
|
19
|
-
*/
|
|
20
|
-
export declare const nodeContextIntegration: (options?: ContextOptions | undefined) => import("@sentry/core").Integration;
|
|
21
|
-
/**
|
|
22
|
-
* Get app context information from process
|
|
23
|
-
*/
|
|
24
|
-
export declare function getAppContext(): AppContext;
|
|
25
|
-
/**
|
|
26
|
-
* Gets device information from os
|
|
27
|
-
*/
|
|
28
|
-
export declare function getDeviceContext(deviceOpt: DeviceContextOptions | true): DeviceContext;
|
|
29
|
-
export {};
|
|
30
|
-
//# sourceMappingURL=context.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/integrations/context.ts"],"names":[],"mappings":";AAGA,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAI5C,OAAO,KAAK,EACV,UAAU,EAIV,aAAa,EAId,MAAM,cAAc,CAAC;AAGtB,eAAO,MAAM,aAAa,+BAAsB,CAAC;AACjD,eAAO,MAAM,YAAY,8BAAqB,CAAC;AAU/C,UAAU,oBAAoB;IAC5B,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,UAAU,cAAc;IACtB,GAAG,CAAC,EAAE,OAAO,CAAC;IACd,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,MAAM,CAAC,EAAE,oBAAoB,GAAG,OAAO,CAAC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AA0ED;;GAEG;AACH,eAAO,MAAM,sBAAsB,8EAA6C,CAAC;AAmFjF;;GAEG;AACH,wBAAgB,aAAa,IAAI,UAAU,CAc1C;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,oBAAoB,GAAG,IAAI,GAAG,aAAa,CAoCtF"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { Event, StackFrame } from '@sentry/core';
|
|
2
|
-
export declare const MAX_CONTEXTLINES_COLNO: number;
|
|
3
|
-
export declare const MAX_CONTEXTLINES_LINENO: number;
|
|
4
|
-
interface ContextLinesOptions {
|
|
5
|
-
/**
|
|
6
|
-
* Sets the number of context lines for each frame when loading a file.
|
|
7
|
-
* Defaults to 7.
|
|
8
|
-
*
|
|
9
|
-
* Set to 0 to disable loading and inclusion of source files.
|
|
10
|
-
**/
|
|
11
|
-
frameContextLines?: number;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Exported for testing purposes.
|
|
15
|
-
*/
|
|
16
|
-
export declare function resetFileContentCache(): void;
|
|
17
|
-
/**
|
|
18
|
-
* Resolves context lines before and after the given line number and appends them to the frame;
|
|
19
|
-
*/
|
|
20
|
-
export declare function addContextToFrame(lineno: number, frame: StackFrame, contextLines: number, contents: Record<number, string> | undefined): void;
|
|
21
|
-
/** Exported only for tests, as a type-safe variant. */
|
|
22
|
-
export declare const _contextLinesIntegration: (options?: ContextLinesOptions) => {
|
|
23
|
-
name: string;
|
|
24
|
-
processEvent(event: Event): Promise<Event>;
|
|
25
|
-
};
|
|
26
|
-
/**
|
|
27
|
-
* Capture the lines before and after the frame's context.
|
|
28
|
-
*/
|
|
29
|
-
export declare const contextLinesIntegration: (options?: ContextLinesOptions | undefined) => import("@sentry/core").Integration;
|
|
30
|
-
export {};
|
|
31
|
-
//# sourceMappingURL=contextlines.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contextlines.d.ts","sourceRoot":"","sources":["../../../src/integrations/contextlines.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,KAAK,EAAiB,UAAU,EAAE,MAAM,cAAc,CAAC;AAWrE,eAAO,MAAM,sBAAsB,EAAE,MAAa,CAAC;AACnD,eAAO,MAAM,uBAAuB,EAAE,MAAc,CAAC;AAErD,UAAU,mBAAmB;IAC3B;;;;;QAKI;IACJ,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C;AA0SD;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,UAAU,EACjB,YAAY,EAAE,MAAM,EACpB,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,GAC3C,IAAI,CA2CN;AAkBD,uDAAuD;AACvD,eAAO,MAAM,wBAAwB,aAAc,mBAAmB;;;CAS5C,CAAC;AAE3B;;GAEG;AACH,eAAO,MAAM,uBAAuB,mFAA8C,CAAC"}
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
|
-
import type * as http from 'node:http';
|
|
4
|
-
import type { EventEmitter } from 'node:stream';
|
|
5
|
-
import type { InstrumentationConfig } from '@opentelemetry/instrumentation';
|
|
6
|
-
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
|
|
7
|
-
import type { Scope } from '@sentry/core';
|
|
8
|
-
export type SentryHttpInstrumentationOptions = InstrumentationConfig & {
|
|
9
|
-
/**
|
|
10
|
-
* Whether breadcrumbs should be recorded for requests.
|
|
11
|
-
*
|
|
12
|
-
* @default `true`
|
|
13
|
-
*/
|
|
14
|
-
breadcrumbs?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Whether to extract the trace ID from the `sentry-trace` header for incoming requests.
|
|
17
|
-
* By default this is done by the HttpInstrumentation, but if that is not added (e.g. because tracing is disabled, ...)
|
|
18
|
-
* then this instrumentation can take over.
|
|
19
|
-
*
|
|
20
|
-
* @default `false`
|
|
21
|
-
*/
|
|
22
|
-
extractIncomingTraceFromHeader?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Whether to propagate Sentry trace headers in outgoing requests.
|
|
25
|
-
* By default this is done by the HttpInstrumentation, but if that is not added (e.g. because tracing is disabled)
|
|
26
|
-
* then this instrumentation can take over.
|
|
27
|
-
*
|
|
28
|
-
* @default `false`
|
|
29
|
-
*/
|
|
30
|
-
propagateTraceInOutgoingRequests?: boolean;
|
|
31
|
-
/**
|
|
32
|
-
* Do not capture breadcrumbs for outgoing HTTP requests to URLs where the given callback returns `true`.
|
|
33
|
-
* For the scope of this instrumentation, this callback only controls breadcrumb creation.
|
|
34
|
-
* The same option can be passed to the top-level httpIntegration where it controls both, breadcrumb and
|
|
35
|
-
* span creation.
|
|
36
|
-
*
|
|
37
|
-
* @param url Contains the entire URL, including query string (if any), protocol, host, etc. of the outgoing request.
|
|
38
|
-
* @param request Contains the {@type RequestOptions} object used to make the outgoing request.
|
|
39
|
-
*/
|
|
40
|
-
ignoreOutgoingRequests?: (url: string, request: http.RequestOptions) => boolean;
|
|
41
|
-
/**
|
|
42
|
-
* Do not capture the request body for incoming HTTP requests to URLs where the given callback returns `true`.
|
|
43
|
-
* This can be useful for long running requests where the body is not needed and we want to avoid capturing it.
|
|
44
|
-
*
|
|
45
|
-
* @param url Contains the entire URL, including query string (if any), protocol, host, etc. of the incoming request.
|
|
46
|
-
* @param request Contains the {@type RequestOptions} object used to make the incoming request.
|
|
47
|
-
*/
|
|
48
|
-
ignoreIncomingRequestBody?: (url: string, request: http.RequestOptions) => boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Controls the maximum size of incoming HTTP request bodies attached to events.
|
|
51
|
-
*
|
|
52
|
-
* Available options:
|
|
53
|
-
* - 'none': No request bodies will be attached
|
|
54
|
-
* - 'small': Request bodies up to 1,000 bytes will be attached
|
|
55
|
-
* - 'medium': Request bodies up to 10,000 bytes will be attached (default)
|
|
56
|
-
* - 'always': Request bodies will always be attached
|
|
57
|
-
*
|
|
58
|
-
* Note that even with 'always' setting, bodies exceeding 1MB will never be attached
|
|
59
|
-
* for performance and security reasons.
|
|
60
|
-
*
|
|
61
|
-
* @default 'medium'
|
|
62
|
-
*/
|
|
63
|
-
maxIncomingRequestBodySize?: 'none' | 'small' | 'medium' | 'always';
|
|
64
|
-
/**
|
|
65
|
-
* Whether the integration should create [Sessions](https://docs.sentry.io/product/releases/health/#sessions) for incoming requests to track the health and crash-free rate of your releases in Sentry.
|
|
66
|
-
* Read more about Release Health: https://docs.sentry.io/product/releases/health/
|
|
67
|
-
*
|
|
68
|
-
* Defaults to `true`.
|
|
69
|
-
*/
|
|
70
|
-
trackIncomingRequestsAsSessions?: boolean;
|
|
71
|
-
/**
|
|
72
|
-
* Number of milliseconds until sessions tracked with `trackIncomingRequestsAsSessions` will be flushed as a session aggregate.
|
|
73
|
-
*
|
|
74
|
-
* Defaults to `60000` (60s).
|
|
75
|
-
*/
|
|
76
|
-
sessionFlushingDelayMS?: number;
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* This custom HTTP instrumentation is used to isolate incoming requests and annotate them with additional information.
|
|
80
|
-
* It does not emit any spans.
|
|
81
|
-
*
|
|
82
|
-
* The reason this is isolated from the OpenTelemetry instrumentation is that users may overwrite this,
|
|
83
|
-
* which would lead to Sentry not working as expected.
|
|
84
|
-
*
|
|
85
|
-
* Important note: Contrary to other OTEL instrumentation, this one cannot be unwrapped.
|
|
86
|
-
* It only does minimal things though and does not emit any spans.
|
|
87
|
-
*
|
|
88
|
-
* This is heavily inspired & adapted from:
|
|
89
|
-
* https://github.com/open-telemetry/opentelemetry-js/blob/f8ab5592ddea5cba0a3b33bf8d74f27872c0367f/experimental/packages/opentelemetry-instrumentation-http/src/http.ts
|
|
90
|
-
*/
|
|
91
|
-
export declare class SentryHttpInstrumentation extends InstrumentationBase<SentryHttpInstrumentationOptions> {
|
|
92
|
-
private _propagationDecisionMap;
|
|
93
|
-
private _ignoreOutgoingRequestsMap;
|
|
94
|
-
constructor(config?: SentryHttpInstrumentationOptions);
|
|
95
|
-
/** @inheritdoc */
|
|
96
|
-
init(): [InstrumentationNodeModuleDefinition, InstrumentationNodeModuleDefinition];
|
|
97
|
-
/**
|
|
98
|
-
* This is triggered when an outgoing request finishes.
|
|
99
|
-
* It has access to the final request and response objects.
|
|
100
|
-
*/
|
|
101
|
-
private _onOutgoingRequestFinish;
|
|
102
|
-
/**
|
|
103
|
-
* This is triggered when an outgoing request is created.
|
|
104
|
-
* It has access to the request object, and can mutate it before the request is sent.
|
|
105
|
-
*/
|
|
106
|
-
private _onOutgoingRequestCreated;
|
|
107
|
-
/**
|
|
108
|
-
* Patch a server.emit function to handle process isolation for incoming requests.
|
|
109
|
-
* This will only patch the emit function if it was not already patched.
|
|
110
|
-
*/
|
|
111
|
-
private _patchServerEmitOnce;
|
|
112
|
-
/**
|
|
113
|
-
* Check if the given outgoing request should be ignored.
|
|
114
|
-
*/
|
|
115
|
-
private _shouldIgnoreOutgoingRequest;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Starts a session and tracks it in the context of a given isolation scope.
|
|
119
|
-
* When the passed response is finished, the session is put into a task and is
|
|
120
|
-
* aggregated with other sessions that may happen in a certain time window
|
|
121
|
-
* (sessionFlushingDelayMs).
|
|
122
|
-
*
|
|
123
|
-
* The sessions are always aggregated by the client that is on the current scope
|
|
124
|
-
* at the time of ending the response (if there is one).
|
|
125
|
-
*/
|
|
126
|
-
export declare function recordRequestSession({ requestIsolationScope, response, sessionFlushingDelayMS, }: {
|
|
127
|
-
requestIsolationScope: Scope;
|
|
128
|
-
response: EventEmitter;
|
|
129
|
-
sessionFlushingDelayMS?: number;
|
|
130
|
-
}): void;
|
|
131
|
-
//# sourceMappingURL=SentryHttpInstrumentation.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"SentryHttpInstrumentation.d.ts","sourceRoot":"","sources":["../../../../src/integrations/http/SentryHttpInstrumentation.ts"],"names":[],"mappings":";;AAGA,OAAO,KAAK,KAAK,IAAI,MAAM,WAAW,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGhD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,mCAAmC,EAAE,MAAM,gCAAgC,CAAC;AAC1G,OAAO,KAAK,EAAmD,KAAK,EAAE,MAAM,cAAc,CAAC;AA6B3F,MAAM,MAAM,gCAAgC,GAAG,qBAAqB,GAAG;IACrE;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;;;OAMG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;IAEzC;;;;;;OAMG;IACH,gCAAgC,CAAC,EAAE,OAAO,CAAC;IAE3C;;;;;;;;OAQG;IACH,sBAAsB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,cAAc,KAAK,OAAO,CAAC;IAEhF;;;;;;OAMG;IACH,yBAAyB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,IAAI,CAAC,cAAc,KAAK,OAAO,CAAC;IAEnF;;;;;;;;;;;;;OAaG;IACH,0BAA0B,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAEpE;;;;;OAKG;IACH,+BAA+B,CAAC,EAAE,OAAO,CAAC;IAE1C;;;;OAIG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAKF;;;;;;;;;;;;GAYG;AACH,qBAAa,yBAA0B,SAAQ,mBAAmB,CAAC,gCAAgC,CAAC;IAClG,OAAO,CAAC,uBAAuB,CAA0B;IACzD,OAAO,CAAC,0BAA0B,CAAuC;gBAEtD,MAAM,GAAE,gCAAqC;IAOhE,kBAAkB;IACX,IAAI,IAAI,CAAC,mCAAmC,EAAE,mCAAmC,CAAC;IAsEzF;;;OAGG;IACH,OAAO,CAAC,wBAAwB;IAehC;;;OAGG;IACH,OAAO,CAAC,yBAAyB;IA2DjC;;;OAGG;IACH,OAAO,CAAC,oBAAoB;IAmF5B;;OAEG;IACH,OAAO,CAAC,4BAA4B;CAerC;AAsLD;;;;;;;;GAQG;AAEH,wBAAgB,oBAAoB,CAAC,EACnC,qBAAqB,EACrB,QAAQ,EACR,sBAAsB,GACvB,EAAE;IACD,qBAAqB,EAAE,KAAK,CAAC;IAC7B,QAAQ,EAAE,YAAY,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,GAAG,IAAI,CAsDP"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import type { Debugger } from 'node:inspector';
|
|
3
|
-
export type Variables = Record<string, unknown>;
|
|
4
|
-
export type RateLimitIncrement = () => void;
|
|
5
|
-
/**
|
|
6
|
-
* The key used to store the local variables on the error object.
|
|
7
|
-
*/
|
|
8
|
-
export declare const LOCAL_VARIABLES_KEY = "__SENTRY_ERROR_LOCAL_VARIABLES__";
|
|
9
|
-
/**
|
|
10
|
-
* Creates a rate limiter that will call the disable callback when the rate limit is reached and the enable callback
|
|
11
|
-
* when a timeout has occurred.
|
|
12
|
-
* @param maxPerSecond Maximum number of calls per second
|
|
13
|
-
* @param enable Callback to enable capture
|
|
14
|
-
* @param disable Callback to disable capture
|
|
15
|
-
* @returns A function to call to increment the rate limiter count
|
|
16
|
-
*/
|
|
17
|
-
export declare function createRateLimiter(maxPerSecond: number, enable: () => void, disable: (seconds: number) => void): RateLimitIncrement;
|
|
18
|
-
export type PausedExceptionEvent = Debugger.PausedEventDataType & {
|
|
19
|
-
data: {
|
|
20
|
-
description: string;
|
|
21
|
-
objectId?: string;
|
|
22
|
-
};
|
|
23
|
-
};
|
|
24
|
-
/** Could this be an anonymous function? */
|
|
25
|
-
export declare function isAnonymous(name: string | undefined): boolean;
|
|
26
|
-
/** Do the function names appear to match? */
|
|
27
|
-
export declare function functionNamesMatch(a: string | undefined, b: string | undefined): boolean;
|
|
28
|
-
export interface FrameVariables {
|
|
29
|
-
function: string;
|
|
30
|
-
vars?: Variables;
|
|
31
|
-
}
|
|
32
|
-
export interface LocalVariablesIntegrationOptions {
|
|
33
|
-
/**
|
|
34
|
-
* Capture local variables for both caught and uncaught exceptions
|
|
35
|
-
*
|
|
36
|
-
* - When false, only uncaught exceptions will have local variables
|
|
37
|
-
* - When true, both caught and uncaught exceptions will have local variables.
|
|
38
|
-
*
|
|
39
|
-
* Defaults to `true`.
|
|
40
|
-
*
|
|
41
|
-
* Capturing local variables for all exceptions can be expensive since the debugger pauses for every throw to collect
|
|
42
|
-
* local variables.
|
|
43
|
-
*
|
|
44
|
-
* To reduce the likelihood of this feature impacting app performance or throughput, this feature is rate-limited.
|
|
45
|
-
* Once the rate limit is reached, local variables will only be captured for uncaught exceptions until a timeout has
|
|
46
|
-
* been reached.
|
|
47
|
-
*/
|
|
48
|
-
captureAllExceptions?: boolean;
|
|
49
|
-
/**
|
|
50
|
-
* Maximum number of exceptions to capture local variables for per second before rate limiting is triggered.
|
|
51
|
-
*/
|
|
52
|
-
maxExceptionsPerSecond?: number;
|
|
53
|
-
}
|
|
54
|
-
export interface LocalVariablesWorkerArgs extends LocalVariablesIntegrationOptions {
|
|
55
|
-
/**
|
|
56
|
-
* Whether to enable debug logging.
|
|
57
|
-
*/
|
|
58
|
-
debug: boolean;
|
|
59
|
-
/**
|
|
60
|
-
* Base path used to calculate module name.
|
|
61
|
-
*
|
|
62
|
-
* Defaults to `dirname(process.argv[1])` and falls back to `process.cwd()`
|
|
63
|
-
*/
|
|
64
|
-
basePath?: string;
|
|
65
|
-
}
|
|
66
|
-
//# sourceMappingURL=common.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../../../src/integrations/local-variables/common.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAEhD,MAAM,MAAM,kBAAkB,GAAG,MAAM,IAAI,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,mBAAmB,qCAAqC,CAAC;AAEtE;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,IAAI,EAClB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GACjC,kBAAkB,CA+BpB;AAGD,MAAM,MAAM,oBAAoB,GAAG,QAAQ,CAAC,mBAAmB,GAAG;IAChE,IAAI,EAAE;QAEJ,WAAW,EAAE,MAAM,CAAC;QACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH,CAAC;AAEF,2CAA2C;AAC3C,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAE7D;AAED,6CAA6C;AAC7C,wBAAgB,kBAAkB,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAExF;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,MAAM,WAAW,gCAAgC;IAC/C;;;;;;;;;;;;;;OAcG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B;;OAEG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,wBAAyB,SAAQ,gCAAgC;IAChF;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/local-variables/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,UAAU,CAAC;AAIjE,eAAO,MAAM,yBAAyB,aAAa,gCAAgC,KAAQ,WAE1F,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { LocalVariablesIntegrationOptions } from './common';
|
|
2
|
-
export declare const base64WorkerScript = "###LocalVariablesWorkerScript###";
|
|
3
|
-
/**
|
|
4
|
-
* Adds local variables to exception frames
|
|
5
|
-
*/
|
|
6
|
-
export declare const localVariablesAsyncIntegration: (integrationOptions?: LocalVariablesIntegrationOptions | undefined) => import("@sentry/core").Integration;
|
|
7
|
-
//# sourceMappingURL=local-variables-async.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"local-variables-async.d.ts","sourceRoot":"","sources":["../../../../src/integrations/local-variables/local-variables-async.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAkB,gCAAgC,EAA4B,MAAM,UAAU,CAAC;AAI3G,eAAO,MAAM,kBAAkB,qCAAqC,CAAC;AAMrE;;GAEG;AACH,eAAO,MAAM,8BAA8B,2GAyHhB,CAAC"}
|