@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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/graphql.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"graphql.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/graphql.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAMhF,UAAU,cAAc;IACtB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAE7B;;;;;;;;;OASG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;;;;OAKG;IACH,2BAA2B,CAAC,EAAE,OAAO,CAAC;CACvC;AAID,eAAO,MAAM,iBAAiB;;CAwD7B,CAAC;AAcF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,kBAAkB,8EAAyC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/hapi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/hapi/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAgB1E,OAAO,KAAK,EAAyB,MAAM,EAAE,MAAM,SAAS,CAAC;AAI7D,eAAO,MAAM,cAAc;;CAA4E,CAAC;AAWxG;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,eAAe,0CAAsC,CAAC;AAkBnE,eAAO,MAAM,eAAe;;;0BAIW,OAAO,GAAG,EAAE,GAAG,CAAC;CAmBtD,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAsB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAezE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAuBhD;;GAEG;AACH,wBAAgB,8BAA8B,IAAI,WAAW,EAAE,CAuB9D;AAED;;GAEG;AAEH,wBAAgB,wCAAwC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,CA0BzG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"kafka.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/kafka.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"kafka.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/kafka.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAOhF,eAAO,MAAM,eAAe;;CAW3B,CAAC;AAWF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,gBAAgB,0CAAuC,CAAC"}
|
|
@@ -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"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { InstrumentationConfig } from '@opentelemetry/instrumentation';
|
|
2
|
+
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
|
|
3
|
+
import type { Span } from '@sentry/core';
|
|
4
|
+
type PostgresConnectionContext = {
|
|
5
|
+
ATTR_DB_NAMESPACE?: string;
|
|
6
|
+
ATTR_SERVER_ADDRESS?: string;
|
|
7
|
+
ATTR_SERVER_PORT?: string;
|
|
8
|
+
};
|
|
9
|
+
type PostgresJsInstrumentationConfig = InstrumentationConfig & {
|
|
10
|
+
/**
|
|
11
|
+
* Whether to require a parent span for the instrumentation.
|
|
12
|
+
* If set to true, the instrumentation will only create spans if there is a parent span
|
|
13
|
+
* available in the current scope.
|
|
14
|
+
* @default true
|
|
15
|
+
*/
|
|
16
|
+
requireParentSpan?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Hook to modify the span before it is started.
|
|
19
|
+
* This can be used to set additional attributes or modify the span in any way.
|
|
20
|
+
*/
|
|
21
|
+
requestHook?: (span: Span, sanitizedSqlQuery: string, postgresConnectionContext?: PostgresConnectionContext) => void;
|
|
22
|
+
};
|
|
23
|
+
export declare const instrumentPostgresJs: ((options?: PostgresJsInstrumentationConfig | undefined) => PostgresJsInstrumentation) & {
|
|
24
|
+
id: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Instrumentation for the [postgres](https://www.npmjs.com/package/postgres) library.
|
|
28
|
+
* This instrumentation captures postgresjs queries and their attributes,
|
|
29
|
+
*/
|
|
30
|
+
export declare class PostgresJsInstrumentation extends InstrumentationBase<PostgresJsInstrumentationConfig> {
|
|
31
|
+
constructor(config: PostgresJsInstrumentationConfig);
|
|
32
|
+
/**
|
|
33
|
+
* Initializes the instrumentation.
|
|
34
|
+
*/
|
|
35
|
+
init(): InstrumentationNodeModuleDefinition[];
|
|
36
|
+
/**
|
|
37
|
+
* Determines whether a span should be created based on the current context.
|
|
38
|
+
* If `requireParentSpan` is set to true in the configuration, a span will
|
|
39
|
+
* only be created if there is a parent span available.
|
|
40
|
+
*/
|
|
41
|
+
private _shouldCreateSpans;
|
|
42
|
+
/**
|
|
43
|
+
* Patches the reject method of the Query class to set the span status and end it
|
|
44
|
+
*/
|
|
45
|
+
private _patchReject;
|
|
46
|
+
/**
|
|
47
|
+
* Patches the resolve method of the Query class to end the span when the query is resolved.
|
|
48
|
+
*/
|
|
49
|
+
private _patchResolve;
|
|
50
|
+
/**
|
|
51
|
+
* Patches the Query class to instrument the handle method.
|
|
52
|
+
*/
|
|
53
|
+
private _patchQuery;
|
|
54
|
+
/**
|
|
55
|
+
* Patches the Connection class to set the database, host, and port attributes
|
|
56
|
+
* when a new connection is created.
|
|
57
|
+
*/
|
|
58
|
+
private _patchConnection;
|
|
59
|
+
/**
|
|
60
|
+
* Sanitize SQL query as per the OTEL semantic conventions
|
|
61
|
+
* https://opentelemetry.io/docs/specs/semconv/database/database-spans/#sanitization-of-dbquerytext
|
|
62
|
+
*/
|
|
63
|
+
private _sanitizeSqlQuery;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Adds Sentry tracing instrumentation for the [postgres](https://www.npmjs.com/package/postgres) library.
|
|
67
|
+
*
|
|
68
|
+
* For more information, see the [`postgresIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/postgres/).
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```javascript
|
|
72
|
+
* const Sentry = require('@sentry/node');
|
|
73
|
+
*
|
|
74
|
+
* Sentry.init({
|
|
75
|
+
* integrations: [Sentry.postgresJsIntegration()],
|
|
76
|
+
* });
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
export declare const postgresJsIntegration: () => import("@sentry/core").Integration;
|
|
80
|
+
export {};
|
|
81
|
+
//# sourceMappingURL=postgresjs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgresjs.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/postgresjs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EACL,mBAAmB,EACnB,mCAAmC,EAGpC,MAAM,gCAAgC,CAAC;AAWxC,OAAO,KAAK,EAAiB,IAAI,EAAE,MAAM,cAAc,CAAC;AAcxD,KAAK,yBAAyB,GAAG;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B,CAAC;AAEF,KAAK,+BAA+B,GAAG,qBAAqB,GAAG;IAC7D;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B;;;OAGG;IACH,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,yBAAyB,CAAC,EAAE,yBAAyB,KAAK,IAAI,CAAC;CACtH,CAAC;AAEF,eAAO,MAAM,oBAAoB;;CAOhC,CAAC;AAEF;;;GAGG;AACH,qBAAa,yBAA0B,SAAQ,mBAAmB,CAAC,+BAA+B,CAAC;gBAC9E,MAAM,EAAE,+BAA+B;IAI1D;;OAEG;IACI,IAAI,IAAI,mCAAmC,EAAE;IA0BpD;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;IAM1B;;OAEG;IACH,OAAO,CAAC,YAAY;IAgCpB;;OAEG;IACH,OAAO,CAAC,aAAa;IAgBrB;;OAEG;IACH,OAAO,CAAC,WAAW;IAkFnB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAmBxB;;;OAGG;IACH,OAAO,CAAC,iBAAiB;CAqB1B;AAWD;;;;;;;;;;;;;GAaG;AAEH,eAAO,MAAM,qBAAqB,0CAA4C,CAAC"}
|
|
@@ -5,6 +5,7 @@ export declare const instrumentVercelAi: ((options?: unknown) => SentryVercelAiI
|
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
7
7
|
* Adds Sentry tracing instrumentation for the [ai](https://www.npmjs.com/package/ai) library.
|
|
8
|
+
* This integration is not enabled by default, you need to manually add it.
|
|
8
9
|
*
|
|
9
10
|
* For more information, see the [`ai` documentation](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry).
|
|
10
11
|
*
|
|
@@ -17,17 +18,14 @@ export declare const instrumentVercelAi: ((options?: unknown) => SentryVercelAiI
|
|
|
17
18
|
* });
|
|
18
19
|
* ```
|
|
19
20
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* By default this integration adds tracing support to all `ai` function calls. If you need to disable
|
|
24
|
-
* collecting spans for a specific call, you can do so by setting `experimental_telemetry.isEnabled` to
|
|
25
|
-
* `false` in the first argument of the function call.
|
|
21
|
+
* This integration adds tracing support to all `ai` function calls.
|
|
22
|
+
* You need to opt-in to collecting spans for a specific call,
|
|
23
|
+
* you can do so by setting `experimental_telemetry.isEnabled` to `true` in the first argument of the function call.
|
|
26
24
|
*
|
|
27
25
|
* ```javascript
|
|
28
26
|
* const result = await generateText({
|
|
29
27
|
* model: openai('gpt-4-turbo'),
|
|
30
|
-
* experimental_telemetry: { isEnabled:
|
|
28
|
+
* experimental_telemetry: { isEnabled: true },
|
|
31
29
|
* });
|
|
32
30
|
* ```
|
|
33
31
|
*
|
|
@@ -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,CAAC;IAEzE;;;OAGG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC;;;;;;;OAOG;IACH,gBAAgB,CAAC,EAAE,QAAQ,GAAG,OAAO,CAAC;IAEtC;;;;;;;OAOG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;;;OAIG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAEhC;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAE7B;;;;;;;;;OASG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;;OAIG;IACH,6BAA6B,CAAC,EAAE,eAAe,EAAE,CAAC;IAElD;;OAEG;IACH,2BAA2B,CAAC,EAAE,aAAa,EAAE,CAAC;IAE9C;;;;;;;;OAQG;IACH,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAE7B;;;;;;;OAOG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;OAEG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC;IAEnC;;;OAGG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;IAEzC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB,kEAAkE;IAClE,YAAY,CAAC,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CAC/C;AAED;;;GAGG;AACH,MAAM,WAAW,WAAY,SAAQ,OAAO,CAAC,oBAAoB,CAAC,EAAE,eAAe;CAAG;AAEtF;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,aAAa,CAAC,oBAAoB,CAAC,EAAE,eAAe;CAAG;AAElG,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,KAAK,CAAC;IACb,cAAc,EAAE,KAAK,CAAC;CACvB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,YAAY,GAAG,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';
|
|
@@ -20,33 +12,24 @@ export { mysqlIntegration } from './integrations/tracing/mysql';
|
|
|
20
12
|
export { mysql2Integration } from './integrations/tracing/mysql2';
|
|
21
13
|
export { redisIntegration } from './integrations/tracing/redis';
|
|
22
14
|
export { postgresIntegration } from './integrations/tracing/postgres';
|
|
15
|
+
export { postgresJsIntegration } from './integrations/tracing/postgresjs';
|
|
23
16
|
export { prismaIntegration } from './integrations/tracing/prisma';
|
|
24
17
|
export { hapiIntegration, setupHapiErrorHandler } from './integrations/tracing/hapi';
|
|
25
18
|
export { koaIntegration, setupKoaErrorHandler } from './integrations/tracing/koa';
|
|
26
19
|
export { connectIntegration, setupConnectErrorHandler } from './integrations/tracing/connect';
|
|
27
|
-
export { spotlightIntegration } from './integrations/spotlight';
|
|
28
20
|
export { knexIntegration } from './integrations/tracing/knex';
|
|
29
21
|
export { tediousIntegration } from './integrations/tracing/tedious';
|
|
30
22
|
export { genericPoolIntegration } from './integrations/tracing/genericPool';
|
|
31
23
|
export { dataloaderIntegration } from './integrations/tracing/dataloader';
|
|
32
24
|
export { amqplibIntegration } from './integrations/tracing/amqplib';
|
|
33
25
|
export { vercelAIIntegration } from './integrations/tracing/vercelai';
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export { SentryContextManager } from './otel/contextManager';
|
|
37
|
-
export { generateInstrumentOnce } from './otel/instrument';
|
|
38
|
-
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';
|
|
39
28
|
export { initOpenTelemetry, preloadOpenTelemetry } from './sdk/initOtel';
|
|
40
29
|
export { getAutoPerformanceIntegrations } from './integrations/tracing';
|
|
41
|
-
export { getSentryRelease, defaultStackParser } from './sdk/api';
|
|
42
|
-
export { createGetModuleFromFilename } from './utils/module';
|
|
43
|
-
export { makeNodeTransport } from './transports';
|
|
44
|
-
export { NodeClient } from './sdk/client';
|
|
45
|
-
export { cron } from './cron';
|
|
46
|
-
export { NODE_VERSION } from './nodeVersion';
|
|
47
30
|
export { NodeOptions } from './types';
|
|
48
31
|
export { setOpenTelemetryContextAsyncContextStrategy as setNodeAsyncContextStrategy, } from '@sentry/opentelemetry';
|
|
49
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';
|
|
50
33
|
export { Breadcrumb, BreadcrumbHint, PolymorphicRequest, RequestEventData, SdkInfo, Event, EventHint, ErrorEvent, Exception, Session, SeverityLevel, StackFrame, Stacktrace, Thread, User, Span, FeatureFlagsIntegration, } from '@sentry/core';
|
|
51
|
-
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';
|
|
52
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
|
/**
|
|
@@ -38,7 +38,7 @@ interface FastifyHandlerOptions {
|
|
|
38
38
|
export declare const instrumentFastifyV3: ((options?: unknown) => FastifyInstrumentationV3) & {
|
|
39
39
|
id: string;
|
|
40
40
|
};
|
|
41
|
-
export declare const instrumentFastify: ((options?: unknown) => Instrumentation<InstrumentationConfig>) & {
|
|
41
|
+
export declare const instrumentFastify: ((options?: unknown) => Instrumentation<InstrumentationConfig & FastifyHandlerOptions>) & {
|
|
42
42
|
id: string;
|
|
43
43
|
};
|
|
44
44
|
/**
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import { InstrumentationConfig } from '@opentelemetry/instrumentation';
|
|
2
|
+
import { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';
|
|
3
|
+
import { Span } from '@sentry/core';
|
|
4
|
+
type PostgresConnectionContext = {
|
|
5
|
+
ATTR_DB_NAMESPACE?: string;
|
|
6
|
+
ATTR_SERVER_ADDRESS?: string;
|
|
7
|
+
ATTR_SERVER_PORT?: string;
|
|
8
|
+
};
|
|
9
|
+
type PostgresJsInstrumentationConfig = InstrumentationConfig & {
|
|
10
|
+
/**
|
|
11
|
+
* Whether to require a parent span for the instrumentation.
|
|
12
|
+
* If set to true, the instrumentation will only create spans if there is a parent span
|
|
13
|
+
* available in the current scope.
|
|
14
|
+
* @default true
|
|
15
|
+
*/
|
|
16
|
+
requireParentSpan?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* Hook to modify the span before it is started.
|
|
19
|
+
* This can be used to set additional attributes or modify the span in any way.
|
|
20
|
+
*/
|
|
21
|
+
requestHook?: (span: Span, sanitizedSqlQuery: string, postgresConnectionContext?: PostgresConnectionContext) => void;
|
|
22
|
+
};
|
|
23
|
+
export declare const instrumentPostgresJs: ((options?: PostgresJsInstrumentationConfig | undefined) => PostgresJsInstrumentation) & {
|
|
24
|
+
id: string;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Instrumentation for the [postgres](https://www.npmjs.com/package/postgres) library.
|
|
28
|
+
* This instrumentation captures postgresjs queries and their attributes,
|
|
29
|
+
*/
|
|
30
|
+
export declare class PostgresJsInstrumentation extends InstrumentationBase<PostgresJsInstrumentationConfig> {
|
|
31
|
+
constructor(config: PostgresJsInstrumentationConfig);
|
|
32
|
+
/**
|
|
33
|
+
* Initializes the instrumentation.
|
|
34
|
+
*/
|
|
35
|
+
init(): InstrumentationNodeModuleDefinition[];
|
|
36
|
+
/**
|
|
37
|
+
* Determines whether a span should be created based on the current context.
|
|
38
|
+
* If `requireParentSpan` is set to true in the configuration, a span will
|
|
39
|
+
* only be created if there is a parent span available.
|
|
40
|
+
*/
|
|
41
|
+
private _shouldCreateSpans;
|
|
42
|
+
/**
|
|
43
|
+
* Patches the reject method of the Query class to set the span status and end it
|
|
44
|
+
*/
|
|
45
|
+
private _patchReject;
|
|
46
|
+
/**
|
|
47
|
+
* Patches the resolve method of the Query class to end the span when the query is resolved.
|
|
48
|
+
*/
|
|
49
|
+
private _patchResolve;
|
|
50
|
+
/**
|
|
51
|
+
* Patches the Query class to instrument the handle method.
|
|
52
|
+
*/
|
|
53
|
+
private _patchQuery;
|
|
54
|
+
/**
|
|
55
|
+
* Patches the Connection class to set the database, host, and port attributes
|
|
56
|
+
* when a new connection is created.
|
|
57
|
+
*/
|
|
58
|
+
private _patchConnection;
|
|
59
|
+
/**
|
|
60
|
+
* Sanitize SQL query as per the OTEL semantic conventions
|
|
61
|
+
* https://opentelemetry.io/docs/specs/semconv/database/database-spans/#sanitization-of-dbquerytext
|
|
62
|
+
*/
|
|
63
|
+
private _sanitizeSqlQuery;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Adds Sentry tracing instrumentation for the [postgres](https://www.npmjs.com/package/postgres) library.
|
|
67
|
+
*
|
|
68
|
+
* For more information, see the [`postgresIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/postgres/).
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```javascript
|
|
72
|
+
* const Sentry = require('@sentry/node');
|
|
73
|
+
*
|
|
74
|
+
* Sentry.init({
|
|
75
|
+
* integrations: [Sentry.postgresJsIntegration()],
|
|
76
|
+
* });
|
|
77
|
+
* ```
|
|
78
|
+
*/
|
|
79
|
+
export declare const postgresJsIntegration: () => import("@sentry/core").Integration;
|
|
80
|
+
export {};
|
|
81
|
+
//# sourceMappingURL=postgresjs.d.ts.map
|
|
@@ -5,6 +5,7 @@ export declare const instrumentVercelAi: ((options?: unknown) => SentryVercelAiI
|
|
|
5
5
|
};
|
|
6
6
|
/**
|
|
7
7
|
* Adds Sentry tracing instrumentation for the [ai](https://www.npmjs.com/package/ai) library.
|
|
8
|
+
* This integration is not enabled by default, you need to manually add it.
|
|
8
9
|
*
|
|
9
10
|
* For more information, see the [`ai` documentation](https://sdk.vercel.ai/docs/ai-sdk-core/telemetry).
|
|
10
11
|
*
|
|
@@ -17,17 +18,14 @@ export declare const instrumentVercelAi: ((options?: unknown) => SentryVercelAiI
|
|
|
17
18
|
* });
|
|
18
19
|
* ```
|
|
19
20
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* By default this integration adds tracing support to all `ai` function calls. If you need to disable
|
|
24
|
-
* collecting spans for a specific call, you can do so by setting `experimental_telemetry.isEnabled` to
|
|
25
|
-
* `false` in the first argument of the function call.
|
|
21
|
+
* This integration adds tracing support to all `ai` function calls.
|
|
22
|
+
* You need to opt-in to collecting spans for a specific call,
|
|
23
|
+
* you can do so by setting `experimental_telemetry.isEnabled` to `true` in the first argument of the function call.
|
|
26
24
|
*
|
|
27
25
|
* ```javascript
|
|
28
26
|
* const result = await generateText({
|
|
29
27
|
* model: openai('gpt-4-turbo'),
|
|
30
|
-
* experimental_telemetry: { isEnabled:
|
|
28
|
+
* experimental_telemetry: { isEnabled: true },
|
|
31
29
|
* });
|
|
32
30
|
* ```
|
|
33
31
|
*
|
|
@@ -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.34.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.34.0-alpha.1",
|
|
99
|
+
"@sentry/node-core": "9.34.0-alpha.1",
|
|
100
|
+
"@sentry/opentelemetry": "9.34.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,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC;AACd,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC;AACf,EAAE,CAAC,MAAM,EAAE,GAAG,CAAC;AACf,EAAE,CAAC,QAAQ,EAAE,GAAG,CAAC;AACjB,EAAE,CAAC,WAAW,EAAE,GAAG,CAAC;AACpB,EAAE,CAAC,SAAS,EAAE,IAAI,CAAC;AACnB,EAAE,CAAC,UAAU,EAAE,IAAI,CAAC;AACpB,EAAE,CAAC,UAAU,EAAE,IAAI,CAAC;AACpB,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,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,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC;AACd,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC;AACf,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC;AACf,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC;AACf,EAAE,CAAC,QAAQ,EAAE,GAAG,CAAC;AACjB,EAAE,CAAC,QAAQ,EAAE,GAAG,CAAC;AACjB,EAAE,CAAC,SAAS,EAAE,GAAG,CAAC;AAClB,EAAE,CAAC,WAAW,EAAE,GAAG,CAAC;AACpB,EAAE,CAAC,UAAU,EAAE,GAAG,CAAC;AACnB,EAAE,CAAC,QAAQ,EAAE,GAAG,CAAC;AACjB,EAAE,CAAC,UAAU,EAAE,GAAG,CAAC;AACnB,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,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;;;;"}
|