@sentry/node 9.34.0 → 9.36.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 +48 -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 +6 -6
- 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/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 +3 -4
- package/build/cjs/integrations/tracing/postgresjs.js.map +1 -1
- 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 +2 -2
- 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 +6 -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 +5 -5
- 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/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 +2 -3
- package/build/esm/integrations/tracing/postgresjs.js.map +1 -1
- 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 +1 -1
- 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 +3 -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/graphql.d.ts.map +1 -1
- package/build/types/integrations/tracing/hapi/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.map +1 -1
- 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 +3 -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/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/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/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/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/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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"koa.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/koa.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"koa.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/koa.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AAexE,UAAU,UAAU;IAClB;;OAEG;IACH,gBAAgB,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,QAAQ,CAAC,CAAC;CACnD;AAID,eAAO,MAAM,aAAa;;CAsCzB,CAAC;AAWF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,cAAc,0EAAqC,CAAC;AAEjE;;;;;;;;;;;;;;;;;;;;;GAqBG;AAEH,eAAO,MAAM,oBAAoB;sBAA6B,GAAG,QAAQ,GAAG,KAAK,QAAQ,IAAI,CAAC,KAAK,IAAI;MAAK,IAW3G,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mongo.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/mongo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"mongo.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/mongo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAOhF,eAAO,MAAM,eAAe;;CAS3B,CAAC;AAEF;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAGzF;AAgDD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,gBAAgB,0CAAuC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mongoose.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/mongoose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"mongoose.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/mongoose.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAOlF,eAAO,MAAM,kBAAkB;;CAQ9B,CAAC;AAWF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mBAAmB,0CAA0C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mysql2.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/mysql2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"mysql2.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/mysql2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uCAAuC,CAAC;AAO9E,eAAO,MAAM,gBAAgB;;CAQ5B,CAAC;AAWF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB,0CAAwC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/postgres.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"postgres.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/postgres.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAOtE,eAAO,MAAM,kBAAkB;;CAS9B,CAAC;AAWF;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,mBAAmB,0CAA0C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postgresjs.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/postgresjs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,E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xB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;CAqB1B;AAWD;;;;;;;;;;;;;GAaG;AAEH,eAAO,MAAM,qBAAqB,0CAA4C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/vercelai/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/vercelai/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAE/C,eAAO,MAAM,kBAAkB;;CAAwF,CAAC;AAkCxH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,eAAO,MAAM,mBAAmB,+EAA0C,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Integration, Options } from '@sentry/core';
|
|
2
|
+
import type { NodeClient } from '@sentry/node-core';
|
|
2
3
|
import type { NodeOptions } from '../types';
|
|
3
|
-
import { NodeClient } from './client';
|
|
4
4
|
/**
|
|
5
5
|
* Get default integrations, excluding performance.
|
|
6
6
|
*/
|
|
@@ -14,9 +14,5 @@ export declare function init(options?: NodeOptions | undefined): NodeClient | un
|
|
|
14
14
|
/**
|
|
15
15
|
* Initialize Sentry for Node, without any integrations added by default.
|
|
16
16
|
*/
|
|
17
|
-
export declare function initWithoutDefaultIntegrations(options?: NodeOptions | undefined): NodeClient;
|
|
18
|
-
/**
|
|
19
|
-
* Validate that your OpenTelemetry setup is correct.
|
|
20
|
-
*/
|
|
21
|
-
export declare function validateOpenTelemetrySetup(): void;
|
|
17
|
+
export declare function initWithoutDefaultIntegrations(options?: NodeOptions | undefined): NodeClient | undefined;
|
|
22
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/sdk/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEzD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AASpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAG5C;;GAEG;AACH,wBAAgB,wCAAwC,IAAI,WAAW,EAAE,CAOxE;AAED,qDAAqD;AACrD,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,WAAW,EAAE,CAStE;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,GAAE,WAAW,GAAG,SAAc,GAAG,UAAU,GAAG,SAAS,CAElF;AA0BD;;GAEG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,GAAE,WAAW,GAAG,SAAc,GAAG,UAAU,GAAG,SAAS,CAE5G"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SpanProcessor } from '@opentelemetry/sdk-trace-base';
|
|
2
2
|
import { BasicTracerProvider } from '@opentelemetry/sdk-trace-base';
|
|
3
|
-
import type
|
|
3
|
+
import { type NodeClient } from '@sentry/node-core';
|
|
4
4
|
interface AdditionalOpenTelemetryOptions {
|
|
5
5
|
/** Additional SpanProcessor instances that should be used. */
|
|
6
6
|
spanProcessors?: SpanProcessor[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"initOtel.d.ts","sourceRoot":"","sources":["../../../src/sdk/initOtel.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"initOtel.d.ts","sourceRoot":"","sources":["../../../src/sdk/initOtel.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAC;AAOpE,OAAO,EAAE,KAAK,UAAU,EAAyD,MAAM,mBAAmB,CAAC;AAU3G,UAAU,8BAA8B;IACtC,8DAA8D;IAC9D,cAAc,CAAC,EAAE,aAAa,EAAE,CAAC;CAClC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,GAAE,8BAAmC,GAAG,IAAI,CAOxG;AAED,iCAAiC;AACjC,wBAAgB,wBAAwB,IAAI,IAAI,CAyB/C;AAED,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,kBAAuB,GAAG,IAAI,CAmB3E;AAYD,+BAA+B;AAC/B,wBAAgB,SAAS,CAAC,MAAM,EAAE,UAAU,EAAE,OAAO,GAAE,8BAAmC,GAAG,mBAAmB,CAyB/G;AAED,+BAA+B;AAC/B,wBAAgB,0BAA0B,CAAC,mBAAmB,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAiBtG"}
|
package/build/types/types.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Span as WriteableSpan } from '@opentelemetry/api';
|
|
|
2
2
|
import type { Instrumentation } from '@opentelemetry/instrumentation';
|
|
3
3
|
import type { ReadableSpan, SpanProcessor } from '@opentelemetry/sdk-trace-base';
|
|
4
4
|
import type { ClientOptions, Options, SamplingContext, Scope, Span, TracePropagationTargets } from '@sentry/core';
|
|
5
|
-
import type { NodeTransportOptions } from '
|
|
5
|
+
import type { NodeTransportOptions } from '@sentry/node-core';
|
|
6
6
|
export interface BaseNodeOptions {
|
|
7
7
|
/**
|
|
8
8
|
* List of strings/regex controlling to which outgoing requests
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAClH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAChE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACtE,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAClH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,MAAM,WAAW,eAAe;IAC9B;;;;;;;;;;;;;;;OAeG;IACH,uBAAuB,CAAC,EAAE,uBAAuB,CAAC;IAElD;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;;;;;;;;;;;OAYG;IACH,eAAe,CAAC,EAAE,CAAC,eAAe,EAAE,eAAe,KAAK,MAAM,GAAG,OAAO,C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AG,aAAa,GAAG,YAAY,GAAG,IAAI,CAAC"}
|
|
@@ -1,14 +1,6 @@
|
|
|
1
|
-
import * as logger from './logs/exports';
|
|
2
1
|
export { httpIntegration } from './integrations/http';
|
|
3
2
|
export { nativeNodeFetchIntegration } from './integrations/node-fetch';
|
|
4
3
|
export { fsIntegration } from './integrations/fs';
|
|
5
|
-
export { nodeContextIntegration } from './integrations/context';
|
|
6
|
-
export { contextLinesIntegration } from './integrations/contextlines';
|
|
7
|
-
export { localVariablesIntegration } from './integrations/local-variables';
|
|
8
|
-
export { modulesIntegration } from './integrations/modules';
|
|
9
|
-
export { onUncaughtExceptionIntegration } from './integrations/onuncaughtexception';
|
|
10
|
-
export { onUnhandledRejectionIntegration } from './integrations/onunhandledrejection';
|
|
11
|
-
export { anrIntegration, disableAnrDetectionForCallback } from './integrations/anr';
|
|
12
4
|
export { expressIntegration, expressErrorHandler, setupExpressErrorHandler } from './integrations/tracing/express';
|
|
13
5
|
export { fastifyIntegration, setupFastifyErrorHandler } from './integrations/tracing/fastify';
|
|
14
6
|
export { graphqlIntegration } from './integrations/tracing/graphql';
|
|
@@ -25,29 +17,19 @@ export { prismaIntegration } from './integrations/tracing/prisma';
|
|
|
25
17
|
export { hapiIntegration, setupHapiErrorHandler } from './integrations/tracing/hapi';
|
|
26
18
|
export { koaIntegration, setupKoaErrorHandler } from './integrations/tracing/koa';
|
|
27
19
|
export { connectIntegration, setupConnectErrorHandler } from './integrations/tracing/connect';
|
|
28
|
-
export { spotlightIntegration } from './integrations/spotlight';
|
|
29
20
|
export { knexIntegration } from './integrations/tracing/knex';
|
|
30
21
|
export { tediousIntegration } from './integrations/tracing/tedious';
|
|
31
22
|
export { genericPoolIntegration } from './integrations/tracing/genericPool';
|
|
32
23
|
export { dataloaderIntegration } from './integrations/tracing/dataloader';
|
|
33
24
|
export { amqplibIntegration } from './integrations/tracing/amqplib';
|
|
34
25
|
export { vercelAIIntegration } from './integrations/tracing/vercelai';
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
37
|
-
export { SentryContextManager } from './otel/contextManager';
|
|
38
|
-
export { generateInstrumentOnce } from './otel/instrument';
|
|
39
|
-
export { init, getDefaultIntegrations, getDefaultIntegrationsWithoutPerformance, initWithoutDefaultIntegrations, validateOpenTelemetrySetup, } from './sdk';
|
|
26
|
+
export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler, openFeatureIntegration, OpenFeatureIntegrationHook, statsigIntegration, unleashIntegration, } from './integrations/featureFlagShims';
|
|
27
|
+
export { init, getDefaultIntegrations, getDefaultIntegrationsWithoutPerformance, initWithoutDefaultIntegrations, } from './sdk';
|
|
40
28
|
export { initOpenTelemetry, preloadOpenTelemetry } from './sdk/initOtel';
|
|
41
29
|
export { getAutoPerformanceIntegrations } from './integrations/tracing';
|
|
42
|
-
export { getSentryRelease, defaultStackParser } from './sdk/api';
|
|
43
|
-
export { createGetModuleFromFilename } from './utils/module';
|
|
44
|
-
export { makeNodeTransport } from './transports';
|
|
45
|
-
export { NodeClient } from './sdk/client';
|
|
46
|
-
export { cron } from './cron';
|
|
47
|
-
export { NODE_VERSION } from './nodeVersion';
|
|
48
30
|
export { NodeOptions } from './types';
|
|
49
31
|
export { setOpenTelemetryContextAsyncContextStrategy as setNodeAsyncContextStrategy, } from '@sentry/opentelemetry';
|
|
50
32
|
export { addBreadcrumb, isInitialized, isEnabled, getGlobalScope, lastEventId, close, createTransport, flush, SDK_VERSION, getSpanStatusFromHttpCode, setHttpStatus, captureCheckIn, withMonitor, requestDataIntegration, functionToStringIntegration, inboundFiltersIntegration, eventFiltersIntegration, linkedErrorsIntegration, addEventProcessor, setContext, setExtra, setExtras, setTag, setTags, setUser, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_SOURCE, SEMANTIC_ATTRIBUTE_SENTRY_SAMPLE_RATE, setCurrentClient, Scope, setMeasurement, getSpanDescendants, parameterize, getClient, getCurrentScope, getIsolationScope, getTraceData, getTraceMetaTags, continueTrace, withScope, withIsolationScope, captureException, captureEvent, captureMessage, captureFeedback, captureConsoleIntegration, dedupeIntegration, extraErrorDataIntegration, rewriteFramesIntegration, startSession, captureSession, endSession, addIntegration, startSpan, startSpanManual, startInactiveSpan, startNewTrace, suppressTracing, getActiveSpan, withActiveSpan, getRootSpan, spanToJSON, spanToTraceHeader, spanToBaggageHeader, trpcMiddleware, updateSpanName, supabaseIntegration, instrumentSupabaseClient, zodErrorsIntegration, profiler, consoleLoggingIntegration, consoleIntegration, wrapMcpServerWithSentry, featureFlagsIntegration, } from '@sentry/core';
|
|
51
33
|
export { Breadcrumb, BreadcrumbHint, PolymorphicRequest, RequestEventData, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, FeatureFlagsIntegration, } from '@sentry/core';
|
|
52
|
-
export { logger };
|
|
34
|
+
export { logger, nodeContextIntegration, contextLinesIntegration, localVariablesIntegration, modulesIntegration, onUncaughtExceptionIntegration, onUnhandledRejectionIntegration, anrIntegration, disableAnrDetectionForCallback, spotlightIntegration, childProcessIntegration, createSentryWinstonTransport, SentryContextManager, generateInstrumentOnce, getSentryRelease, defaultStackParser, createGetModuleFromFilename, makeNodeTransport, NodeClient, cron, NODE_VERSION, validateOpenTelemetrySetup, } from '@sentry/node-core';
|
|
53
35
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { launchDarklyIntegrationShim as launchDarklyIntegration, buildLaunchDarklyFlagUsedHandlerShim as buildLaunchDarklyFlagUsedHandler, } from './launchDarkly';
|
|
2
|
+
export { openFeatureIntegrationShim as openFeatureIntegration, OpenFeatureIntegrationHookShim as OpenFeatureIntegrationHook, } from './openFeature';
|
|
3
|
+
export { statsigIntegrationShim as statsigIntegration } from './statsig';
|
|
4
|
+
export { unleashIntegrationShim as unleashIntegration } from './unleash';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a shim for the LaunchDarkly integration.
|
|
3
|
+
* We need this in order to not throw runtime errors when accidentally importing this on the server through a meta framework like Next.js.
|
|
4
|
+
*/
|
|
5
|
+
export declare const launchDarklyIntegrationShim: (_options?: unknown) => import("@sentry/core").Integration;
|
|
6
|
+
/**
|
|
7
|
+
* This is a shim for the LaunchDarkly flag used handler.
|
|
8
|
+
*/
|
|
9
|
+
export declare function buildLaunchDarklyFlagUsedHandlerShim(): unknown;
|
|
10
|
+
//# sourceMappingURL=launchDarkly.d.ts.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a shim for the OpenFeature integration.
|
|
3
|
+
* We need this in order to not throw runtime errors when accidentally importing this on the server through a meta framework like Next.js.
|
|
4
|
+
*/
|
|
5
|
+
export declare const openFeatureIntegrationShim: (_options?: unknown) => import("@sentry/core").Integration;
|
|
6
|
+
/**
|
|
7
|
+
* This is a shim for the OpenFeature integration hook.
|
|
8
|
+
*/
|
|
9
|
+
export declare class OpenFeatureIntegrationHookShim {
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
*/
|
|
13
|
+
constructor();
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
after(): void;
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
*/
|
|
21
|
+
error(): void;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=openFeature.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a shim for the Statsig integration.
|
|
3
|
+
* We need this in order to not throw runtime errors when accidentally importing this on the server through a meta framework like Next.js.
|
|
4
|
+
*/
|
|
5
|
+
export declare const statsigIntegrationShim: (_options?: unknown) => import("@sentry/core").Integration;
|
|
6
|
+
//# sourceMappingURL=statsig.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This is a shim for the Unleash integration.
|
|
3
|
+
* We need this in order to not throw runtime errors when accidentally importing this on the server through a meta framework like Next.js.
|
|
4
|
+
*/
|
|
5
|
+
export declare const unleashIntegrationShim: (_options?: unknown) => import("@sentry/core").Integration;
|
|
6
|
+
//# sourceMappingURL=unleash.d.ts.map
|
|
@@ -3,7 +3,7 @@ import { ClientRequest, IncomingMessage, RequestOptions, ServerResponse } from '
|
|
|
3
3
|
import { HttpInstrumentationConfig } from '@opentelemetry/instrumentation-http';
|
|
4
4
|
import { HttpInstrumentation } from '@opentelemetry/instrumentation-http';
|
|
5
5
|
import { Span } from '@sentry/core';
|
|
6
|
-
import { HTTPModuleRequestIncomingMessage } from '
|
|
6
|
+
import { HTTPModuleRequestIncomingMessage } from '@sentry/node-core';
|
|
7
7
|
import { NodeClientOptions } from '../../types';
|
|
8
8
|
interface HttpOptions {
|
|
9
9
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Integration, Options } from '@sentry/core';
|
|
2
|
+
import { NodeClient } from '@sentry/node-core';
|
|
2
3
|
import { NodeOptions } from '../types';
|
|
3
|
-
import { NodeClient } from './client';
|
|
4
4
|
/**
|
|
5
5
|
* Get default integrations, excluding performance.
|
|
6
6
|
*/
|
|
@@ -14,9 +14,5 @@ export declare function init(options?: NodeOptions | undefined): NodeClient | un
|
|
|
14
14
|
/**
|
|
15
15
|
* Initialize Sentry for Node, without any integrations added by default.
|
|
16
16
|
*/
|
|
17
|
-
export declare function initWithoutDefaultIntegrations(options?: NodeOptions | undefined): NodeClient;
|
|
18
|
-
/**
|
|
19
|
-
* Validate that your OpenTelemetry setup is correct.
|
|
20
|
-
*/
|
|
21
|
-
export declare function validateOpenTelemetrySetup(): void;
|
|
17
|
+
export declare function initWithoutDefaultIntegrations(options?: NodeOptions | undefined): NodeClient | undefined;
|
|
22
18
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { SpanProcessor } from '@opentelemetry/sdk-trace-base';
|
|
2
2
|
import { BasicTracerProvider } from '@opentelemetry/sdk-trace-base';
|
|
3
|
-
import { NodeClient } from '
|
|
3
|
+
import { NodeClient } from '@sentry/node-core';
|
|
4
4
|
interface AdditionalOpenTelemetryOptions {
|
|
5
5
|
/** Additional SpanProcessor instances that should be used. */
|
|
6
6
|
spanProcessors?: SpanProcessor[];
|
|
@@ -2,7 +2,7 @@ import { Span as WriteableSpan } from '@opentelemetry/api';
|
|
|
2
2
|
import { Instrumentation } from '@opentelemetry/instrumentation';
|
|
3
3
|
import { ReadableSpan, SpanProcessor } from '@opentelemetry/sdk-trace-base';
|
|
4
4
|
import { ClientOptions, Options, SamplingContext, Scope, Span, TracePropagationTargets } from '@sentry/core';
|
|
5
|
-
import { NodeTransportOptions } from '
|
|
5
|
+
import { NodeTransportOptions } from '@sentry/node-core';
|
|
6
6
|
export interface BaseNodeOptions {
|
|
7
7
|
/**
|
|
8
8
|
* List of strings/regex controlling to which outgoing requests
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/node",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.36.0-alpha.1",
|
|
4
4
|
"description": "Sentry Node SDK using OpenTelemetry for performance instrumentation",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/node",
|
|
@@ -95,8 +95,9 @@
|
|
|
95
95
|
"@opentelemetry/sdk-trace-base": "^1.30.1",
|
|
96
96
|
"@opentelemetry/semantic-conventions": "^1.34.0",
|
|
97
97
|
"@prisma/instrumentation": "6.10.1",
|
|
98
|
-
"@sentry/core": "9.
|
|
99
|
-
"@sentry/
|
|
98
|
+
"@sentry/core": "9.36.0-alpha.1",
|
|
99
|
+
"@sentry/node-core": "9.36.0-alpha.1",
|
|
100
|
+
"@sentry/opentelemetry": "9.36.0-alpha.1",
|
|
100
101
|
"import-in-the-middle": "^1.14.2",
|
|
101
102
|
"minimatch": "^9.0.0"
|
|
102
103
|
},
|
package/build/cjs/cron/common.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
3
|
-
const replacements = [
|
|
4
|
-
['january', '1'],
|
|
5
|
-
['february', '2'],
|
|
6
|
-
['march', '3'],
|
|
7
|
-
['april', '4'],
|
|
8
|
-
['may', '5'],
|
|
9
|
-
['june', '6'],
|
|
10
|
-
['july', '7'],
|
|
11
|
-
['august', '8'],
|
|
12
|
-
['september', '9'],
|
|
13
|
-
['october', '10'],
|
|
14
|
-
['november', '11'],
|
|
15
|
-
['december', '12'],
|
|
16
|
-
['jan', '1'],
|
|
17
|
-
['feb', '2'],
|
|
18
|
-
['mar', '3'],
|
|
19
|
-
['apr', '4'],
|
|
20
|
-
['may', '5'],
|
|
21
|
-
['jun', '6'],
|
|
22
|
-
['jul', '7'],
|
|
23
|
-
['aug', '8'],
|
|
24
|
-
['sep', '9'],
|
|
25
|
-
['oct', '10'],
|
|
26
|
-
['nov', '11'],
|
|
27
|
-
['dec', '12'],
|
|
28
|
-
['sunday', '0'],
|
|
29
|
-
['monday', '1'],
|
|
30
|
-
['tuesday', '2'],
|
|
31
|
-
['wednesday', '3'],
|
|
32
|
-
['thursday', '4'],
|
|
33
|
-
['friday', '5'],
|
|
34
|
-
['saturday', '6'],
|
|
35
|
-
['sun', '0'],
|
|
36
|
-
['mon', '1'],
|
|
37
|
-
['tue', '2'],
|
|
38
|
-
['wed', '3'],
|
|
39
|
-
['thu', '4'],
|
|
40
|
-
['fri', '5'],
|
|
41
|
-
['sat', '6'],
|
|
42
|
-
];
|
|
43
|
-
|
|
44
|
-
/**
|
|
45
|
-
* Replaces names in cron expressions
|
|
46
|
-
*/
|
|
47
|
-
function replaceCronNames(cronExpression) {
|
|
48
|
-
return replacements.reduce(
|
|
49
|
-
// eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor
|
|
50
|
-
(acc, [name, replacement]) => acc.replace(new RegExp(name, 'gi'), replacement),
|
|
51
|
-
cronExpression,
|
|
52
|
-
);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
exports.replaceCronNames = replaceCronNames;
|
|
56
|
-
//# sourceMappingURL=common.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sources":["../../../src/cron/common.ts"],"sourcesContent":["const replacements: [string, string][] = [\n ['january', '1'],\n ['february', '2'],\n ['march', '3'],\n ['april', '4'],\n ['may', '5'],\n ['june', '6'],\n ['july', '7'],\n ['august', '8'],\n ['september', '9'],\n ['october', '10'],\n ['november', '11'],\n ['december', '12'],\n ['jan', '1'],\n ['feb', '2'],\n ['mar', '3'],\n ['apr', '4'],\n ['may', '5'],\n ['jun', '6'],\n ['jul', '7'],\n ['aug', '8'],\n ['sep', '9'],\n ['oct', '10'],\n ['nov', '11'],\n ['dec', '12'],\n ['sunday', '0'],\n ['monday', '1'],\n ['tuesday', '2'],\n ['wednesday', '3'],\n ['thursday', '4'],\n ['friday', '5'],\n ['saturday', '6'],\n ['sun', '0'],\n ['mon', '1'],\n ['tue', '2'],\n ['wed', '3'],\n ['thu', '4'],\n ['fri', '5'],\n ['sat', '6'],\n];\n\n/**\n * Replaces names in cron expressions\n */\nexport function replaceCronNames(cronExpression: string): string {\n return replacements.reduce(\n // eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor\n (acc, [name, replacement]) => acc.replace(new RegExp(name, 'gi'), replacement),\n cronExpression,\n );\n}\n"],"names":[],"mappings":";;AAAA,MAAM,YAAY,GAAuB;AACzC,EAAE,CAAC,SAAS,EAAE,GAAG,CAAC;AAClB,EAAE,CAAC,UAAU,EAAE,GAAG,CAAC;AACnB,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC;AAChB,EAAE,CAAC,OAAO,EAAE,GAAG,CAAC;AAChB,E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G,CAAC;AACd,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC;AACd,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC;AACd,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC;AACd,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC;AACd,CAAC;;AAED;AACA;AACA;AACO,SAAS,gBAAgB,CAAC,cAAc,EAAkB;AACjE,EAAE,OAAO,YAAY,CAAC,MAAM;AAC5B;AACA,IAAI,CAAC,GAAG,EAAE,CAAC,IAAI,EAAE,WAAW,CAAC,KAAK,GAAG,CAAC,OAAO,CAAC,IAAI,MAAM,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE,WAAW,CAAC;AAClF,IAAI,cAAc;AAClB,GAAG;AACH;;;;"}
|
package/build/cjs/cron/cron.js
DELETED
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
3
|
-
const core = require('@sentry/core');
|
|
4
|
-
const common = require('./common.js');
|
|
5
|
-
|
|
6
|
-
const ERROR_TEXT = 'Automatic instrumentation of CronJob only supports crontab string';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Instruments the `cron` library to send a check-in event to Sentry for each job execution.
|
|
10
|
-
*
|
|
11
|
-
* ```ts
|
|
12
|
-
* import * as Sentry from '@sentry/node';
|
|
13
|
-
* import { CronJob } from 'cron';
|
|
14
|
-
*
|
|
15
|
-
* const CronJobWithCheckIn = Sentry.cron.instrumentCron(CronJob, 'my-cron-job');
|
|
16
|
-
*
|
|
17
|
-
* // use the constructor
|
|
18
|
-
* const job = new CronJobWithCheckIn('* * * * *', () => {
|
|
19
|
-
* console.log('You will see this message every minute');
|
|
20
|
-
* });
|
|
21
|
-
*
|
|
22
|
-
* // or from
|
|
23
|
-
* const job = CronJobWithCheckIn.from({ cronTime: '* * * * *', onTick: () => {
|
|
24
|
-
* console.log('You will see this message every minute');
|
|
25
|
-
* });
|
|
26
|
-
* ```
|
|
27
|
-
*/
|
|
28
|
-
function instrumentCron(lib, monitorSlug) {
|
|
29
|
-
let jobScheduled = false;
|
|
30
|
-
|
|
31
|
-
return new Proxy(lib, {
|
|
32
|
-
construct(target, args) {
|
|
33
|
-
const [cronTime, onTick, onComplete, start, timeZone, ...rest] = args;
|
|
34
|
-
|
|
35
|
-
if (typeof cronTime !== 'string') {
|
|
36
|
-
throw new Error(ERROR_TEXT);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
if (jobScheduled) {
|
|
40
|
-
throw new Error(`A job named '${monitorSlug}' has already been scheduled`);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
jobScheduled = true;
|
|
44
|
-
|
|
45
|
-
const cronString = common.replaceCronNames(cronTime);
|
|
46
|
-
|
|
47
|
-
async function monitoredTick(context, onComplete) {
|
|
48
|
-
return core.withMonitor(
|
|
49
|
-
monitorSlug,
|
|
50
|
-
async () => {
|
|
51
|
-
try {
|
|
52
|
-
await onTick(context, onComplete);
|
|
53
|
-
} catch (e) {
|
|
54
|
-
core.captureException(e);
|
|
55
|
-
throw e;
|
|
56
|
-
}
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
schedule: { type: 'crontab', value: cronString },
|
|
60
|
-
timezone: timeZone || undefined,
|
|
61
|
-
},
|
|
62
|
-
);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
return new target(cronTime, monitoredTick, onComplete, start, timeZone, ...rest);
|
|
66
|
-
},
|
|
67
|
-
get(target, prop) {
|
|
68
|
-
if (prop === 'from') {
|
|
69
|
-
return (param) => {
|
|
70
|
-
const { cronTime, onTick, timeZone } = param;
|
|
71
|
-
|
|
72
|
-
if (typeof cronTime !== 'string') {
|
|
73
|
-
throw new Error(ERROR_TEXT);
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
if (jobScheduled) {
|
|
77
|
-
throw new Error(`A job named '${monitorSlug}' has already been scheduled`);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
jobScheduled = true;
|
|
81
|
-
|
|
82
|
-
const cronString = common.replaceCronNames(cronTime);
|
|
83
|
-
|
|
84
|
-
param.onTick = async (context, onComplete) => {
|
|
85
|
-
return core.withMonitor(
|
|
86
|
-
monitorSlug,
|
|
87
|
-
async () => {
|
|
88
|
-
try {
|
|
89
|
-
await onTick(context, onComplete);
|
|
90
|
-
} catch (e) {
|
|
91
|
-
core.captureException(e);
|
|
92
|
-
throw e;
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
schedule: { type: 'crontab', value: cronString },
|
|
97
|
-
timezone: timeZone || undefined,
|
|
98
|
-
},
|
|
99
|
-
);
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
return target.from(param);
|
|
103
|
-
};
|
|
104
|
-
} else {
|
|
105
|
-
return target[prop];
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
exports.instrumentCron = instrumentCron;
|
|
112
|
-
//# sourceMappingURL=cron.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cron.js","sources":["../../../src/cron/cron.ts"],"sourcesContent":["import { captureException, withMonitor } from '@sentry/core';\nimport { replaceCronNames } from './common';\n\nexport type CronJobParams = {\n cronTime: string | Date;\n onTick: (context: unknown, onComplete?: unknown) => void | Promise<void>;\n onComplete?: () => void | Promise<void>;\n start?: boolean | null;\n context?: unknown;\n runOnInit?: boolean | null;\n unrefTimeout?: boolean | null;\n} & (\n | {\n timeZone?: string | null;\n utcOffset?: never;\n }\n | {\n timeZone?: never;\n utcOffset?: number | null;\n }\n);\n\nexport type CronJob = {\n //\n};\n\nexport type CronJobConstructor = {\n from: (param: CronJobParams) => CronJob;\n\n new (\n cronTime: CronJobParams['cronTime'],\n onTick: CronJobParams['onTick'],\n onComplete?: CronJobParams['onComplete'],\n start?: CronJobParams['start'],\n timeZone?: CronJobParams['timeZone'],\n context?: CronJobParams['context'],\n runOnInit?: CronJobParams['runOnInit'],\n utcOffset?: null,\n unrefTimeout?: CronJobParams['unrefTimeout'],\n ): CronJob;\n new (\n cronTime: CronJobParams['cronTime'],\n onTick: CronJobParams['onTick'],\n onComplete?: CronJobParams['onComplete'],\n start?: CronJobParams['start'],\n timeZone?: null,\n context?: CronJobParams['context'],\n runOnInit?: CronJobParams['runOnInit'],\n utcOffset?: CronJobParams['utcOffset'],\n unrefTimeout?: CronJobParams['unrefTimeout'],\n ): CronJob;\n};\n\nconst ERROR_TEXT = 'Automatic instrumentation of CronJob only supports crontab string';\n\n/**\n * Instruments the `cron` library to send a check-in event to Sentry for each job execution.\n *\n * ```ts\n * import * as Sentry from '@sentry/node';\n * import { CronJob } from 'cron';\n *\n * const CronJobWithCheckIn = Sentry.cron.instrumentCron(CronJob, 'my-cron-job');\n *\n * // use the constructor\n * const job = new CronJobWithCheckIn('* * * * *', () => {\n * console.log('You will see this message every minute');\n * });\n *\n * // or from\n * const job = CronJobWithCheckIn.from({ cronTime: '* * * * *', onTick: () => {\n * console.log('You will see this message every minute');\n * });\n * ```\n */\nexport function instrumentCron<T>(lib: T & CronJobConstructor, monitorSlug: string): T {\n let jobScheduled = false;\n\n return new Proxy(lib, {\n construct(target, args: ConstructorParameters<CronJobConstructor>) {\n const [cronTime, onTick, onComplete, start, timeZone, ...rest] = args;\n\n if (typeof cronTime !== 'string') {\n throw new Error(ERROR_TEXT);\n }\n\n if (jobScheduled) {\n throw new Error(`A job named '${monitorSlug}' has already been scheduled`);\n }\n\n jobScheduled = true;\n\n const cronString = replaceCronNames(cronTime);\n\n async function monitoredTick(context: unknown, onComplete?: unknown): Promise<void> {\n return withMonitor(\n monitorSlug,\n async () => {\n try {\n await onTick(context, onComplete);\n } catch (e) {\n captureException(e);\n throw e;\n }\n },\n {\n schedule: { type: 'crontab', value: cronString },\n timezone: timeZone || undefined,\n },\n );\n }\n\n return new target(cronTime, monitoredTick, onComplete, start, timeZone, ...rest);\n },\n get(target, prop: keyof CronJobConstructor) {\n if (prop === 'from') {\n return (param: CronJobParams) => {\n const { cronTime, onTick, timeZone } = param;\n\n if (typeof cronTime !== 'string') {\n throw new Error(ERROR_TEXT);\n }\n\n if (jobScheduled) {\n throw new Error(`A job named '${monitorSlug}' has already been scheduled`);\n }\n\n jobScheduled = true;\n\n const cronString = replaceCronNames(cronTime);\n\n param.onTick = async (context: unknown, onComplete?: unknown) => {\n return withMonitor(\n monitorSlug,\n async () => {\n try {\n await onTick(context, onComplete);\n } catch (e) {\n captureException(e);\n throw e;\n }\n },\n {\n schedule: { type: 'crontab', value: cronString },\n timezone: timeZone || undefined,\n },\n );\n };\n\n return target.from(param);\n };\n } else {\n return target[prop];\n }\n },\n });\n}\n"],"names":["replaceCronNames","withMonitor","captureException"],"mappings":";;;;;AAqDA,MAAM,UAAA,GAAa,mEAAmE;;AAEtF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,cAAc,CAAI,GAAG,EAA0B,WAAW,EAAa;AACvF,EAAE,IAAI,YAAa,GAAE,KAAK;;AAE1B,EAAE,OAAO,IAAI,KAAK,CAAC,GAAG,EAAE;AACxB,IAAI,SAAS,CAAC,MAAM,EAAE,IAAI,EAA6C;AACvE,MAAM,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,IAAI,CAAA,GAAI,IAAI;;AAE3E,MAAM,IAAI,OAAO,QAAS,KAAI,QAAQ,EAAE;AACxC,QAAQ,MAAM,IAAI,KAAK,CAAC,UAAU,CAAC;AACnC;;AAEA,MAAM,IAAI,YAAY,EAAE;AACxB,QAAQ,MAAM,IAAI,KAAK,CAAC,CAAC,aAAa,EAAE,WAAW,CAAC,4BAA4B,CAAC,CAAC;AAClF;;AAEA,MAAM,YAAA,GAAe,IAAI;;AAEzB,MAAM,MAAM,UAAW,GAAEA,uB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3E,YAAY,OAAOC,gBAAW;AAC9B,cAAc,WAAW;AACzB,cAAc,YAAY;AAC1B,gBAAgB,IAAI;AACpB,kBAAkB,MAAM,MAAM,CAAC,OAAO,EAAE,UAAU,CAAC;AACnD,iBAAkB,CAAA,OAAO,CAAC,EAAE;AAC5B,kBAAkBC,qBAAgB,CAAC,CAAC,CAAC;AACrC,kBAAkB,MAAM,CAAC;AACzB;AACA,eAAe;AACf,cAAc;AACd,gBAAgB,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,UAAA,EAAY;AAChE,gBAAgB,QAAQ,EAAE,QAAS,IAAG,SAAS;AAC/C,eAAe;AACf,aAAa;AACb,WAAW;;AAEX,UAAU,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC;AACnC,SAAS;AACT,aAAa;AACb,QAAQ,OAAO,MAAM,CAAC,IAAI,CAAC;AAC3B;AACA,KAAK;AACL,GAAG,CAAC;AACJ;;;;"}
|
package/build/cjs/cron/index.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
3
|
-
const cron$1 = require('./cron.js');
|
|
4
|
-
const nodeCron = require('./node-cron.js');
|
|
5
|
-
const nodeSchedule = require('./node-schedule.js');
|
|
6
|
-
|
|
7
|
-
/** Methods to instrument cron libraries for Sentry check-ins */
|
|
8
|
-
const cron = {
|
|
9
|
-
instrumentCron: cron$1.instrumentCron,
|
|
10
|
-
instrumentNodeCron: nodeCron.instrumentNodeCron,
|
|
11
|
-
instrumentNodeSchedule: nodeSchedule.instrumentNodeSchedule,
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
exports.cron = cron;
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../src/cron/index.ts"],"sourcesContent":["import { instrumentCron } from './cron';\nimport { instrumentNodeCron } from './node-cron';\nimport { instrumentNodeSchedule } from './node-schedule';\n\n/** Methods to instrument cron libraries for Sentry check-ins */\nexport const cron = {\n instrumentCron,\n instrumentNodeCron,\n instrumentNodeSchedule,\n};\n"],"names":["instrumentCron","instrumentNodeCron","instrumentNodeSchedule"],"mappings":";;;;;;AAIA;AACO,MAAM,OAAO;AACpB,kBAAEA,qBAAc;AAChB,sBAAEC,2BAAkB;AACpB,0BAAEC,mCAAsB;AACxB;;;;"}
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
|
|
3
|
-
const core = require('@sentry/core');
|
|
4
|
-
const common = require('./common.js');
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* Wraps the `node-cron` library with check-in monitoring.
|
|
8
|
-
*
|
|
9
|
-
* ```ts
|
|
10
|
-
* import * as Sentry from "@sentry/node";
|
|
11
|
-
* import * as cron from "node-cron";
|
|
12
|
-
*
|
|
13
|
-
* const cronWithCheckIn = Sentry.cron.instrumentNodeCron(cron);
|
|
14
|
-
*
|
|
15
|
-
* cronWithCheckIn.schedule(
|
|
16
|
-
* "* * * * *",
|
|
17
|
-
* () => {
|
|
18
|
-
* console.log("running a task every minute");
|
|
19
|
-
* },
|
|
20
|
-
* { name: "my-cron-job" },
|
|
21
|
-
* );
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
function instrumentNodeCron(lib) {
|
|
25
|
-
return new Proxy(lib, {
|
|
26
|
-
get(target, prop) {
|
|
27
|
-
if (prop === 'schedule' && target.schedule) {
|
|
28
|
-
// When 'get' is called for schedule, return a proxied version of the schedule function
|
|
29
|
-
return new Proxy(target.schedule, {
|
|
30
|
-
apply(target, thisArg, argArray) {
|
|
31
|
-
const [expression, callback, options] = argArray;
|
|
32
|
-
|
|
33
|
-
const name = options?.name;
|
|
34
|
-
const timezone = options?.timezone;
|
|
35
|
-
|
|
36
|
-
if (!name) {
|
|
37
|
-
throw new Error('Missing "name" for scheduled job. A name is required for Sentry check-in monitoring.');
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
const monitoredCallback = async () => {
|
|
41
|
-
return core.withMonitor(
|
|
42
|
-
name,
|
|
43
|
-
async () => {
|
|
44
|
-
// We have to manually catch here and capture the exception because node-cron swallows errors
|
|
45
|
-
// https://github.com/node-cron/node-cron/issues/399
|
|
46
|
-
try {
|
|
47
|
-
return await callback();
|
|
48
|
-
} catch (e) {
|
|
49
|
-
core.captureException(e);
|
|
50
|
-
throw e;
|
|
51
|
-
}
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
schedule: { type: 'crontab', value: common.replaceCronNames(expression) },
|
|
55
|
-
timezone,
|
|
56
|
-
},
|
|
57
|
-
);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
return target.apply(thisArg, [expression, monitoredCallback, options]);
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
} else {
|
|
64
|
-
return target[prop ];
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
});
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
exports.instrumentNodeCron = instrumentNodeCron;
|
|
71
|
-
//# sourceMappingURL=node-cron.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"node-cron.js","sources":["../../../src/cron/node-cron.ts"],"sourcesContent":["import { captureException, withMonitor } from '@sentry/core';\nimport { replaceCronNames } from './common';\n\nexport interface NodeCronOptions {\n name: string;\n timezone?: string;\n}\n\nexport interface NodeCron {\n schedule: (cronExpression: string, callback: () => void, options: NodeCronOptions | undefined) => unknown;\n}\n\n/**\n * Wraps the `node-cron` library with check-in monitoring.\n *\n * ```ts\n * import * as Sentry from \"@sentry/node\";\n * import * as cron from \"node-cron\";\n *\n * const cronWithCheckIn = Sentry.cron.instrumentNodeCron(cron);\n *\n * cronWithCheckIn.schedule(\n * \"* * * * *\",\n * () => {\n * console.log(\"running a task every minute\");\n * },\n * { name: \"my-cron-job\" },\n * );\n * ```\n */\nexport function instrumentNodeCron<T>(lib: Partial<NodeCron> & T): T {\n return new Proxy(lib, {\n get(target, prop) {\n if (prop === 'schedule' && target.schedule) {\n // When 'get' is called for schedule, return a proxied version of the schedule function\n return new Proxy(target.schedule, {\n apply(target, thisArg, argArray: Parameters<NodeCron['schedule']>) {\n const [expression, callback, options] = argArray;\n\n const name = options?.name;\n const timezone = options?.timezone;\n\n if (!name) {\n throw new Error('Missing \"name\" for scheduled job. A name is required for Sentry check-in monitoring.');\n }\n\n const monitoredCallback = async (): Promise<void> => {\n return withMonitor(\n name,\n async () => {\n // We have to manually catch here and capture the exception because node-cron swallows errors\n // https://github.com/node-cron/node-cron/issues/399\n try {\n return await callback();\n } catch (e) {\n captureException(e);\n throw e;\n }\n },\n {\n schedule: { type: 'crontab', value: replaceCronNames(expression) },\n timezone,\n },\n );\n };\n\n return target.apply(thisArg, [expression, monitoredCallback, options]);\n },\n });\n } else {\n return target[prop as keyof T];\n }\n },\n });\n}\n"],"names":["withMonitor","captureException","replaceCronNames"],"mappings":";;;;;AAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,kBAAkB,CAAI,GAAG,EAA4B;AACrE,EAAE,OAAO,IAAI,KAAK,CAAC,GAAG,EAAE;AACxB,IAAI,GAAG,CAAC,MAAM,EAAE,IAAI,EAAE;AACtB,MAAM,IAAI,IAAK,KAAI,cAAc,MAAM,CAAC,QAAQ,EAAE;AAClD;AACA,QAAQ,OAAO,IAAI,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;AAC1C,UAAU,KAAK,CAAC,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAoC;AAC7E,YAAY,MAAM,CAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,CAAE,GAAE,QAAQ;;AAE5D,YAAY,MAAM,IAAA,GAAO,OAAO,EAAE,IAAI;AACtC,YAAY,MAAM,Q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