@sentry/node 10.58.0 → 10.60.0
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 +3 -0
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/integrations/fs/index.js +3 -84
- package/build/cjs/integrations/fs/index.js.map +1 -1
- package/build/cjs/integrations/fs/vendored/constants.js.map +1 -1
- package/build/cjs/integrations/fs/vendored/instrumentation.js +145 -175
- package/build/cjs/integrations/fs/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/fs/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/node-fetch/index.js +7 -8
- package/build/cjs/integrations/node-fetch/index.js.map +1 -1
- package/build/cjs/integrations/node-fetch/vendored/semconv.js +28 -0
- package/build/cjs/integrations/node-fetch/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/node-fetch/vendored/undici.js +91 -127
- package/build/cjs/integrations/node-fetch/vendored/undici.js.map +1 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/amqplib.js.map +1 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +1 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js.map +1 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/types.js.map +1 -1
- package/build/cjs/integrations/tracing/amqplib/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/connect/index.js +0 -21
- package/build/cjs/integrations/tracing/connect/index.js.map +1 -1
- package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js +0 -6
- package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -1
- package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js +33 -42
- package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/connect/vendored/internal-types.js.map +1 -1
- package/build/cjs/integrations/tracing/connect/vendored/utils.js +3 -2
- package/build/cjs/integrations/tracing/connect/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js +1 -1
- package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/genericPool/index.js +1 -15
- package/build/cjs/integrations/tracing/genericPool/index.js.map +1 -1
- package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js +30 -18
- package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/graphql/index.js +1 -51
- package/build/cjs/integrations/tracing/graphql/index.js.map +1 -1
- package/build/cjs/integrations/tracing/graphql/vendored/enum.js.map +1 -1
- package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js +0 -2
- package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -1
- package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js +67 -57
- package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js.map +1 -1
- package/build/cjs/integrations/tracing/graphql/vendored/symbols.js.map +1 -1
- package/build/cjs/integrations/tracing/graphql/vendored/utils.js +28 -62
- package/build/cjs/integrations/tracing/graphql/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/hapi/index.js +0 -17
- package/build/cjs/integrations/tracing/hapi/index.js.map +1 -1
- package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +1 -1
- package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js +28 -45
- package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js.map +1 -1
- package/build/cjs/integrations/tracing/hapi/vendored/semconv.js.map +1 -1
- package/build/cjs/integrations/tracing/hapi/vendored/utils.js +4 -9
- package/build/cjs/integrations/tracing/hapi/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/index.js +1 -0
- package/build/cjs/integrations/tracing/index.js.map +1 -1
- package/build/cjs/integrations/tracing/kafka/index.js +1 -11
- package/build/cjs/integrations/tracing/kafka/index.js.map +1 -1
- package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js +45 -247
- package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/kafka/vendored/semconv.js +4 -8
- package/build/cjs/integrations/tracing/kafka/vendored/semconv.js.map +1 -1
- package/build/cjs/integrations/tracing/kafka/vendored/utils.js +113 -0
- package/build/cjs/integrations/tracing/kafka/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/index.js +2 -17
- package/build/cjs/integrations/tracing/knex/index.js.map +1 -1
- package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js +65 -93
- package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/knex/vendored/semconv.js +2 -0
- package/build/cjs/integrations/tracing/knex/vendored/semconv.js.map +1 -1
- package/build/cjs/integrations/tracing/knex/vendored/utils.js +2 -15
- package/build/cjs/integrations/tracing/knex/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/koa/index.js +1 -24
- package/build/cjs/integrations/tracing/koa/index.js.map +1 -1
- package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -1
- package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js +29 -41
- package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/koa/vendored/internal-types.js.map +1 -1
- package/build/cjs/integrations/tracing/koa/vendored/types.js.map +1 -1
- package/build/cjs/integrations/tracing/koa/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/mongo/index.js +1 -42
- package/build/cjs/integrations/tracing/mongo/index.js.map +1 -1
- package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js +12 -562
- package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/mongo/vendored/internal-types.js.map +1 -1
- package/build/cjs/integrations/tracing/mongo/vendored/patches.js +151 -0
- package/build/cjs/integrations/tracing/mongo/vendored/patches.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/vendored/semconv.js +0 -4
- package/build/cjs/integrations/tracing/mongo/vendored/semconv.js.map +1 -1
- package/build/cjs/integrations/tracing/mongo/vendored/utils.js +153 -0
- package/build/cjs/integrations/tracing/mongo/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose/index.js +1 -8
- package/build/cjs/integrations/tracing/mongoose/index.js.map +1 -1
- package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js +56 -203
- package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -1
- package/build/cjs/integrations/tracing/mongoose/vendored/semconv.js +0 -4
- package/build/cjs/integrations/tracing/mongoose/vendored/semconv.js.map +1 -1
- package/build/cjs/integrations/tracing/mongoose/vendored/utils.js +19 -49
- package/build/cjs/integrations/tracing/mongoose/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/mysql/vendored/AttributeNames.js.map +1 -1
- package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/mysql/vendored/semconv.js.map +1 -1
- package/build/cjs/integrations/tracing/mysql/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/mysql2/index.js +1 -8
- package/build/cjs/integrations/tracing/mysql2/index.js.map +1 -1
- package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js +21 -59
- package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js.map +1 -1
- package/build/cjs/integrations/tracing/mysql2/vendored/utils.js +14 -33
- package/build/cjs/integrations/tracing/mysql2/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/postgres/index.js +0 -4
- package/build/cjs/integrations/tracing/postgres/index.js.map +1 -1
- package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js +0 -1
- package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -1
- package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -1
- package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js +51 -261
- package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/postgres/vendored/semconv.js +0 -12
- package/build/cjs/integrations/tracing/postgres/vendored/semconv.js.map +1 -1
- package/build/cjs/integrations/tracing/postgres/vendored/utils.js +43 -167
- package/build/cjs/integrations/tracing/postgres/vendored/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -1
- package/build/cjs/integrations/tracing/prisma/vendored/constants.js.map +1 -1
- package/build/cjs/integrations/tracing/prisma/vendored/global.js.map +1 -1
- package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/index.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js +89 -160
- package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/vendored/redis-common.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js +92 -231
- package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/vendored/semconv.js +0 -2
- package/build/cjs/integrations/tracing/redis/vendored/semconv.js.map +1 -1
- package/build/cjs/integrations/tracing/tedious/index.js +1 -25
- package/build/cjs/integrations/tracing/tedious/index.js.map +1 -1
- package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js +25 -76
- package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/tedious/vendored/semconv.js.map +1 -1
- package/build/cjs/integrations/tracing/tedious/vendored/utils.js.map +1 -1
- package/build/cjs/sdk/diagnosticsChannelInjection.js +21 -0
- package/build/cjs/sdk/diagnosticsChannelInjection.js.map +1 -0
- package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js +19 -0
- package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -0
- package/build/cjs/sdk/index.js +17 -1
- package/build/cjs/sdk/index.js.map +1 -1
- package/build/cjs/sdk/initOtel.js +2 -1
- package/build/cjs/sdk/initOtel.js.map +1 -1
- package/build/esm/index.js +2 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/integrations/fs/index.js +4 -85
- package/build/esm/integrations/fs/index.js.map +1 -1
- package/build/esm/integrations/fs/vendored/constants.js.map +1 -1
- package/build/esm/integrations/fs/vendored/instrumentation.js +147 -177
- package/build/esm/integrations/fs/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/fs/vendored/utils.js.map +1 -1
- package/build/esm/integrations/node-fetch/index.js +8 -9
- package/build/esm/integrations/node-fetch/index.js.map +1 -1
- package/build/esm/integrations/node-fetch/vendored/semconv.js +15 -0
- package/build/esm/integrations/node-fetch/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/node-fetch/vendored/undici.js +80 -116
- package/build/esm/integrations/node-fetch/vendored/undici.js.map +1 -1
- package/build/esm/integrations/tracing/amqplib/vendored/amqplib.js.map +1 -1
- package/build/esm/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +1 -1
- package/build/esm/integrations/tracing/amqplib/vendored/semconv.js.map +1 -1
- package/build/esm/integrations/tracing/amqplib/vendored/types.js.map +1 -1
- package/build/esm/integrations/tracing/amqplib/vendored/utils.js.map +1 -1
- package/build/esm/integrations/tracing/connect/index.js +1 -22
- package/build/esm/integrations/tracing/connect/index.js.map +1 -1
- package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js +1 -6
- package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -1
- package/build/esm/integrations/tracing/connect/vendored/instrumentation.js +36 -44
- package/build/esm/integrations/tracing/connect/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/connect/vendored/internal-types.js.map +1 -1
- package/build/esm/integrations/tracing/connect/vendored/utils.js +3 -2
- package/build/esm/integrations/tracing/connect/vendored/utils.js.map +1 -1
- package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/v3/instrumentation.js +1 -1
- package/build/esm/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/genericPool/index.js +3 -17
- package/build/esm/integrations/tracing/genericPool/index.js.map +1 -1
- package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js +31 -19
- package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/graphql/index.js +3 -53
- package/build/esm/integrations/tracing/graphql/index.js.map +1 -1
- package/build/esm/integrations/tracing/graphql/vendored/enum.js.map +1 -1
- package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js +0 -2
- package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -1
- package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js +69 -59
- package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/graphql/vendored/internal-types.js.map +1 -1
- package/build/esm/integrations/tracing/graphql/vendored/symbols.js.map +1 -1
- package/build/esm/integrations/tracing/graphql/vendored/utils.js +29 -62
- package/build/esm/integrations/tracing/graphql/vendored/utils.js.map +1 -1
- package/build/esm/integrations/tracing/hapi/index.js +1 -18
- package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
- package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +1 -1
- package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js +30 -47
- package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/hapi/vendored/internal-types.js.map +1 -1
- package/build/esm/integrations/tracing/hapi/vendored/semconv.js.map +1 -1
- package/build/esm/integrations/tracing/hapi/vendored/utils.js +5 -10
- package/build/esm/integrations/tracing/hapi/vendored/utils.js.map +1 -1
- package/build/esm/integrations/tracing/index.js +1 -0
- package/build/esm/integrations/tracing/index.js.map +1 -1
- package/build/esm/integrations/tracing/kafka/index.js +2 -12
- package/build/esm/integrations/tracing/kafka/index.js.map +1 -1
- package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js +47 -249
- package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/kafka/vendored/semconv.js +3 -5
- package/build/esm/integrations/tracing/kafka/vendored/semconv.js.map +1 -1
- package/build/esm/integrations/tracing/kafka/vendored/utils.js +107 -0
- package/build/esm/integrations/tracing/kafka/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/knex/index.js +4 -19
- package/build/esm/integrations/tracing/knex/index.js.map +1 -1
- package/build/esm/integrations/tracing/knex/vendored/instrumentation.js +66 -94
- package/build/esm/integrations/tracing/knex/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/knex/vendored/semconv.js +2 -1
- package/build/esm/integrations/tracing/knex/vendored/semconv.js.map +1 -1
- package/build/esm/integrations/tracing/knex/vendored/utils.js +3 -15
- package/build/esm/integrations/tracing/knex/vendored/utils.js.map +1 -1
- package/build/esm/integrations/tracing/koa/index.js +3 -26
- package/build/esm/integrations/tracing/koa/index.js.map +1 -1
- package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -1
- package/build/esm/integrations/tracing/koa/vendored/instrumentation.js +31 -43
- package/build/esm/integrations/tracing/koa/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/koa/vendored/internal-types.js.map +1 -1
- package/build/esm/integrations/tracing/koa/vendored/types.js.map +1 -1
- package/build/esm/integrations/tracing/koa/vendored/utils.js.map +1 -1
- package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/mongo/index.js +3 -43
- package/build/esm/integrations/tracing/mongo/index.js.map +1 -1
- package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js +13 -563
- package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/mongo/vendored/internal-types.js.map +1 -1
- package/build/esm/integrations/tracing/mongo/vendored/patches.js +143 -0
- package/build/esm/integrations/tracing/mongo/vendored/patches.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/vendored/semconv.js +1 -3
- package/build/esm/integrations/tracing/mongo/vendored/semconv.js.map +1 -1
- package/build/esm/integrations/tracing/mongo/vendored/utils.js +146 -0
- package/build/esm/integrations/tracing/mongo/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose/index.js +2 -9
- package/build/esm/integrations/tracing/mongoose/index.js.map +1 -1
- package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js +59 -206
- package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -1
- package/build/esm/integrations/tracing/mongoose/vendored/semconv.js +1 -3
- package/build/esm/integrations/tracing/mongoose/vendored/semconv.js.map +1 -1
- package/build/esm/integrations/tracing/mongoose/vendored/utils.js +20 -50
- package/build/esm/integrations/tracing/mongoose/vendored/utils.js.map +1 -1
- package/build/esm/integrations/tracing/mysql/vendored/AttributeNames.js.map +1 -1
- package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/mysql/vendored/semconv.js.map +1 -1
- package/build/esm/integrations/tracing/mysql/vendored/utils.js.map +1 -1
- package/build/esm/integrations/tracing/mysql2/index.js +2 -9
- package/build/esm/integrations/tracing/mysql2/index.js.map +1 -1
- package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js +26 -64
- package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/mysql2/vendored/semconv.js.map +1 -1
- package/build/esm/integrations/tracing/mysql2/vendored/utils.js +15 -34
- package/build/esm/integrations/tracing/mysql2/vendored/utils.js.map +1 -1
- package/build/esm/integrations/tracing/postgres/index.js +1 -5
- package/build/esm/integrations/tracing/postgres/index.js.map +1 -1
- package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js +0 -1
- package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -1
- package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -1
- package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js +52 -262
- package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/postgres/vendored/semconv.js +1 -7
- package/build/esm/integrations/tracing/postgres/vendored/semconv.js.map +1 -1
- package/build/esm/integrations/tracing/postgres/vendored/utils.js +44 -165
- package/build/esm/integrations/tracing/postgres/vendored/utils.js.map +1 -1
- package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -1
- package/build/esm/integrations/tracing/prisma/vendored/constants.js.map +1 -1
- package/build/esm/integrations/tracing/prisma/vendored/global.js.map +1 -1
- package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/redis/index.js.map +1 -1
- package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js +92 -163
- package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/redis/vendored/redis-common.js.map +1 -1
- package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js +94 -233
- package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/redis/vendored/semconv.js +1 -2
- package/build/esm/integrations/tracing/redis/vendored/semconv.js.map +1 -1
- package/build/esm/integrations/tracing/tedious/index.js +3 -27
- package/build/esm/integrations/tracing/tedious/index.js.map +1 -1
- package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js +29 -79
- package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/tedious/vendored/semconv.js.map +1 -1
- package/build/esm/integrations/tracing/tedious/vendored/utils.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/sdk/diagnosticsChannelInjection.js +17 -0
- package/build/esm/sdk/diagnosticsChannelInjection.js.map +1 -0
- package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js +17 -0
- package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -0
- package/build/esm/sdk/index.js +17 -1
- package/build/esm/sdk/index.js.map +1 -1
- package/build/esm/sdk/initOtel.js +2 -1
- package/build/esm/sdk/initOtel.js.map +1 -1
- package/build/import-hook.mjs +6 -0
- package/build/types/index.d.ts +2 -1
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/fs/index.d.ts.map +1 -1
- package/build/types/integrations/fs/vendored/constants.d.ts.map +1 -1
- package/build/types/integrations/fs/vendored/instrumentation.d.ts +6 -10
- package/build/types/integrations/fs/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/fs/vendored/types.d.ts +10 -15
- package/build/types/integrations/fs/vendored/types.d.ts.map +1 -1
- package/build/types/integrations/fs/vendored/utils.d.ts +2 -2
- package/build/types/integrations/fs/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/node-fetch/index.d.ts.map +1 -1
- package/build/types/integrations/node-fetch/vendored/internal-types.d.ts.map +1 -1
- package/build/types/integrations/node-fetch/vendored/semconv.d.ts +13 -0
- package/build/types/integrations/node-fetch/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/node-fetch/vendored/types.d.ts +2 -4
- package/build/types/integrations/node-fetch/vendored/types.d.ts.map +1 -1
- package/build/types/integrations/node-fetch/vendored/undici.d.ts +6 -7
- package/build/types/integrations/node-fetch/vendored/undici.d.ts.map +1 -1
- package/build/types/integrations/tracing/amqplib/vendored/amqplib.d.ts.map +1 -1
- package/build/types/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts.map +1 -1
- package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts.map +1 -1
- package/build/types/integrations/tracing/amqplib/vendored/types.d.ts.map +1 -1
- package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/tracing/connect/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +0 -4
- package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts.map +1 -1
- package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts +5 -5
- package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts +2 -2
- package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts.map +1 -1
- package/build/types/integrations/tracing/connect/vendored/utils.d.ts +1 -1
- package/build/types/integrations/tracing/connect/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/dataloader/vendored/types.d.ts.map +1 -1
- package/build/types/integrations/tracing/fastify/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/genericPool/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/graphql/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/graphql/vendored/enum.d.ts.map +1 -1
- package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +1 -3
- package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts.map +1 -1
- package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts +7 -2
- package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts +4 -4
- package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts.map +1 -1
- package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts.map +1 -1
- package/build/types/integrations/tracing/graphql/vendored/types.d.ts +5 -43
- package/build/types/integrations/tracing/graphql/vendored/types.d.ts.map +1 -1
- package/build/types/integrations/tracing/graphql/vendored/utils.d.ts +8 -11
- package/build/types/integrations/tracing/graphql/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts.map +1 -1
- package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts +2 -2
- package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts.map +1 -1
- package/build/types/integrations/tracing/hapi/vendored/semconv.d.ts.map +1 -1
- package/build/types/integrations/tracing/hapi/vendored/utils.d.ts +3 -4
- package/build/types/integrations/tracing/hapi/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/tracing/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/kafka/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts +3 -13
- package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +0 -32
- package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts.map +1 -1
- package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts +9 -28
- package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts.map +1 -1
- package/build/types/integrations/tracing/kafka/vendored/utils.d.ts +29 -0
- package/build/types/integrations/tracing/kafka/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts +8 -10
- package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/knex/vendored/semconv.d.ts +1 -0
- package/build/types/integrations/tracing/knex/vendored/semconv.d.ts.map +1 -1
- package/build/types/integrations/tracing/knex/vendored/utils.d.ts +0 -6
- package/build/types/integrations/tracing/knex/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/tracing/koa/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts.map +1 -1
- package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts +1 -1
- package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts +4 -4
- package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts.map +1 -1
- package/build/types/integrations/tracing/koa/vendored/types.d.ts +2 -39
- package/build/types/integrations/tracing/koa/vendored/types.d.ts.map +1 -1
- package/build/types/integrations/tracing/koa/vendored/utils.d.ts +3 -3
- package/build/types/integrations/tracing/koa/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongo/index.d.ts +0 -4
- package/build/types/integrations/tracing/mongo/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts +4 -72
- package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts +0 -59
- package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongo/vendored/patches.d.ts +15 -0
- package/build/types/integrations/tracing/mongo/vendored/patches.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongo/vendored/semconv.d.ts +0 -54
- package/build/types/integrations/tracing/mongo/vendored/semconv.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongo/vendored/utils.d.ts +24 -0
- package/build/types/integrations/tracing/mongo/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +3 -0
- package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts +3 -8
- package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongoose/vendored/semconv.d.ts +0 -14
- package/build/types/integrations/tracing/mongoose/vendored/semconv.d.ts.map +1 -1
- package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts +4 -6
- package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql/vendored/AttributeNames.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql/vendored/types.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql2/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts +3 -6
- package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts.map +1 -1
- package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts +3 -5
- package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/tracing/postgres/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +0 -1
- package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts.map +1 -1
- package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts.map +1 -1
- package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts +1 -9
- package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts +0 -2
- package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts.map +1 -1
- package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts.map +1 -1
- package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts.map +1 -1
- package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts +0 -50
- package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts.map +1 -1
- package/build/types/integrations/tracing/postgres/vendored/types.d.ts +2 -56
- package/build/types/integrations/tracing/postgres/vendored/types.d.ts.map +1 -1
- package/build/types/integrations/tracing/postgres/vendored/utils.d.ts +13 -26
- package/build/types/integrations/tracing/postgres/vendored/utils.d.ts.map +1 -1
- package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts.map +1 -1
- package/build/types/integrations/tracing/prisma/vendored/constants.d.ts.map +1 -1
- package/build/types/integrations/tracing/prisma/vendored/global.d.ts.map +1 -1
- package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/prisma/vendored/types.d.ts.map +1 -1
- package/build/types/integrations/tracing/redis/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +3 -8
- package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/redis/vendored/redis-common.d.ts.map +1 -1
- package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/redis/vendored/semconv.d.ts.map +1 -1
- package/build/types/integrations/tracing/redis/vendored/types.d.ts +2 -36
- package/build/types/integrations/tracing/redis/vendored/types.d.ts.map +1 -1
- package/build/types/integrations/tracing/tedious/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts +3 -14
- package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts.map +1 -1
- package/build/types/integrations/tracing/tedious/vendored/utils.d.ts.map +1 -1
- package/build/types/sdk/diagnosticsChannelInjection.d.ts +41 -0
- package/build/types/sdk/diagnosticsChannelInjection.d.ts.map +1 -0
- package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +34 -0
- package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts.map +1 -0
- package/build/types/sdk/index.d.ts.map +1 -1
- package/build/types/sdk/initOtel.d.ts.map +1 -1
- package/build/types-ts3.8/index.d.ts +2 -1
- package/build/types-ts3.8/integrations/fs/vendored/instrumentation.d.ts +6 -10
- package/build/types-ts3.8/integrations/fs/vendored/types.d.ts +10 -15
- package/build/types-ts3.8/integrations/fs/vendored/utils.d.ts +2 -2
- package/build/types-ts3.8/integrations/node-fetch/vendored/semconv.d.ts +13 -0
- package/build/types-ts3.8/integrations/node-fetch/vendored/types.d.ts +2 -4
- package/build/types-ts3.8/integrations/node-fetch/vendored/undici.d.ts +6 -7
- package/build/types-ts3.8/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +0 -4
- package/build/types-ts3.8/integrations/tracing/connect/vendored/instrumentation.d.ts +4 -4
- package/build/types-ts3.8/integrations/tracing/connect/vendored/internal-types.d.ts +2 -2
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +1 -3
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/instrumentation.d.ts +6 -1
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/internal-types.d.ts +3 -3
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/types.d.ts +4 -42
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/utils.d.ts +6 -9
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/instrumentation.d.ts +2 -2
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/utils.d.ts +1 -2
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/instrumentation.d.ts +3 -13
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +0 -32
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/semconv.d.ts +9 -28
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/utils.d.ts +29 -0
- package/build/types-ts3.8/integrations/tracing/knex/vendored/instrumentation.d.ts +8 -10
- package/build/types-ts3.8/integrations/tracing/knex/vendored/semconv.d.ts +1 -0
- package/build/types-ts3.8/integrations/tracing/knex/vendored/utils.d.ts +0 -6
- package/build/types-ts3.8/integrations/tracing/koa/vendored/internal-types.d.ts +4 -4
- package/build/types-ts3.8/integrations/tracing/koa/vendored/types.d.ts +1 -38
- package/build/types-ts3.8/integrations/tracing/mongo/index.d.ts +0 -4
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/instrumentation.d.ts +4 -72
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/internal-types.d.ts +0 -59
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/patches.d.ts +15 -0
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/semconv.d.ts +0 -54
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/utils.d.ts +24 -0
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +3 -0
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose.d.ts +3 -8
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/semconv.d.ts +0 -14
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/utils.d.ts +4 -6
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/instrumentation.d.ts +3 -6
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/utils.d.ts +3 -5
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +0 -1
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/instrumentation.d.ts +0 -8
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/internal-types.d.ts +0 -2
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/semconv.d.ts +0 -50
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/types.d.ts +1 -55
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/utils.d.ts +13 -26
- package/build/types-ts3.8/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +3 -8
- package/build/types-ts3.8/integrations/tracing/redis/vendored/types.d.ts +2 -36
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/instrumentation.d.ts +3 -14
- package/build/types-ts3.8/sdk/diagnosticsChannelInjection.d.ts +41 -0
- package/build/types-ts3.8/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +34 -0
- package/package.json +20 -7
- package/build/cjs/integrations/tracing/kafka/vendored/internal-types.js +0 -6
- package/build/cjs/integrations/tracing/kafka/vendored/internal-types.js.map +0 -1
- package/build/cjs/integrations/tracing/kafka/vendored/propagator.js +0 -22
- package/build/cjs/integrations/tracing/kafka/vendored/propagator.js.map +0 -1
- package/build/cjs/integrations/tracing/knex/vendored/constants.js +0 -16
- package/build/cjs/integrations/tracing/knex/vendored/constants.js.map +0 -1
- package/build/cjs/integrations/tracing/postgres/vendored/internal-types.js +0 -6
- package/build/cjs/integrations/tracing/postgres/vendored/internal-types.js.map +0 -1
- package/build/cjs/integrations/tracing/utils/sql-common.js +0 -43
- package/build/cjs/integrations/tracing/utils/sql-common.js.map +0 -1
- package/build/esm/integrations/tracing/kafka/vendored/internal-types.js +0 -4
- package/build/esm/integrations/tracing/kafka/vendored/internal-types.js.map +0 -1
- package/build/esm/integrations/tracing/kafka/vendored/propagator.js +0 -20
- package/build/esm/integrations/tracing/kafka/vendored/propagator.js.map +0 -1
- package/build/esm/integrations/tracing/knex/vendored/constants.js +0 -13
- package/build/esm/integrations/tracing/knex/vendored/constants.js.map +0 -1
- package/build/esm/integrations/tracing/postgres/vendored/internal-types.js +0 -4
- package/build/esm/integrations/tracing/postgres/vendored/internal-types.js.map +0 -1
- package/build/esm/integrations/tracing/utils/sql-common.js +0 -41
- package/build/esm/integrations/tracing/utils/sql-common.js.map +0 -1
- package/build/types/integrations/tracing/kafka/vendored/internal-types.d.ts +0 -9
- package/build/types/integrations/tracing/kafka/vendored/internal-types.d.ts.map +0 -1
- package/build/types/integrations/tracing/kafka/vendored/propagator.d.ts +0 -3
- package/build/types/integrations/tracing/kafka/vendored/propagator.d.ts.map +0 -1
- package/build/types/integrations/tracing/kafka/vendored/types.d.ts +0 -26
- package/build/types/integrations/tracing/kafka/vendored/types.d.ts.map +0 -1
- package/build/types/integrations/tracing/knex/vendored/constants.d.ts +0 -3
- package/build/types/integrations/tracing/knex/vendored/constants.d.ts.map +0 -1
- package/build/types/integrations/tracing/knex/vendored/types.d.ts +0 -8
- package/build/types/integrations/tracing/knex/vendored/types.d.ts.map +0 -1
- package/build/types/integrations/tracing/mongo/vendored/types.d.ts +0 -51
- package/build/types/integrations/tracing/mongo/vendored/types.d.ts.map +0 -1
- package/build/types/integrations/tracing/mongoose/vendored/types.d.ts +0 -36
- package/build/types/integrations/tracing/mongoose/vendored/types.d.ts.map +0 -1
- package/build/types/integrations/tracing/mysql2/vendored/types.d.ts +0 -18
- package/build/types/integrations/tracing/mysql2/vendored/types.d.ts.map +0 -1
- package/build/types/integrations/tracing/tedious/vendored/types.d.ts +0 -10
- package/build/types/integrations/tracing/tedious/vendored/types.d.ts.map +0 -1
- package/build/types/integrations/tracing/utils/sql-common.d.ts +0 -3
- package/build/types/integrations/tracing/utils/sql-common.d.ts.map +0 -1
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/internal-types.d.ts +0 -9
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/propagator.d.ts +0 -3
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/types.d.ts +0 -26
- package/build/types-ts3.8/integrations/tracing/knex/vendored/constants.d.ts +0 -3
- package/build/types-ts3.8/integrations/tracing/knex/vendored/types.d.ts +0 -8
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/types.d.ts +0 -51
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/types.d.ts +0 -36
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/types.d.ts +0 -18
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/types.d.ts +0 -10
- package/build/types-ts3.8/integrations/tracing/utils/sql-common.d.ts +0 -3
|
@@ -5,14 +5,7 @@ const core = require('@sentry/core');
|
|
|
5
5
|
const nodeCore = require('@sentry/node-core');
|
|
6
6
|
|
|
7
7
|
const INTEGRATION_NAME = "Mongoose";
|
|
8
|
-
const instrumentMongoose = nodeCore.generateInstrumentOnce(
|
|
9
|
-
INTEGRATION_NAME,
|
|
10
|
-
() => new mongoose.MongooseInstrumentation({
|
|
11
|
-
responseHook(span) {
|
|
12
|
-
nodeCore.addOriginToSpan(span, "auto.db.otel.mongoose");
|
|
13
|
-
}
|
|
14
|
-
})
|
|
15
|
-
);
|
|
8
|
+
const instrumentMongoose = nodeCore.generateInstrumentOnce(INTEGRATION_NAME, () => new mongoose.MongooseInstrumentation());
|
|
16
9
|
const _mongooseIntegration = (() => {
|
|
17
10
|
return {
|
|
18
11
|
name: INTEGRATION_NAME,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/mongoose/index.ts"],"sourcesContent":["import { MongooseInstrumentation } from './vendored/mongoose';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport {
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/mongoose/index.ts"],"sourcesContent":["import { MongooseInstrumentation } from './vendored/mongoose';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport { generateInstrumentOnce } from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'Mongoose';\n\nexport const instrumentMongoose = generateInstrumentOnce(INTEGRATION_NAME, () => new MongooseInstrumentation());\n\nconst _mongooseIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentMongoose();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [mongoose](https://www.npmjs.com/package/mongoose) library.\n *\n * For more information, see the [`mongooseIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mongoose/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.mongooseIntegration()],\n * });\n * ```\n */\nexport const mongooseIntegration = defineIntegration(_mongooseIntegration);\n"],"names":["generateInstrumentOnce","MongooseInstrumentation","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,gBAAA,GAAmB,UAAA;AAElB,MAAM,qBAAqBA,+BAAA,CAAuB,gBAAA,EAAkB,MAAM,IAAIC,kCAAyB;AAE9G,MAAM,wBAAwB,MAAM;AAClC,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,kBAAA,EAAmB;AAAA,IACrB;AAAA,GACF;AACF,CAAA,CAAA;AAgBO,MAAM,mBAAA,GAAsBC,uBAAkB,oBAAoB;;;;;"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
|
|
3
3
|
const api = require('@opentelemetry/api');
|
|
4
|
-
const core$1 = require('@opentelemetry/core');
|
|
5
|
-
const utils = require('./utils.js');
|
|
6
4
|
const instrumentation = require('@opentelemetry/instrumentation');
|
|
7
5
|
const core = require('@sentry/core');
|
|
8
6
|
const semconv = require('./semconv.js');
|
|
9
|
-
const
|
|
7
|
+
const utils = require('./utils.js');
|
|
10
8
|
|
|
11
9
|
const PACKAGE_NAME = "@sentry/instrumentation-mongoose";
|
|
10
|
+
const ORIGIN = "auto.db.otel.mongoose";
|
|
12
11
|
const contextCaptureFunctionsCommon = [
|
|
13
12
|
"deleteOne",
|
|
14
13
|
"deleteMany",
|
|
@@ -52,12 +51,6 @@ const _ALREADY_INSTRUMENTED = /* @__PURE__ */ Symbol("already-instrumented");
|
|
|
52
51
|
class MongooseInstrumentation extends instrumentation.InstrumentationBase {
|
|
53
52
|
constructor(config = {}) {
|
|
54
53
|
super(PACKAGE_NAME, core.SDK_VERSION, config);
|
|
55
|
-
this._setSemconvStabilityFromEnv();
|
|
56
|
-
}
|
|
57
|
-
// Used for testing.
|
|
58
|
-
_setSemconvStabilityFromEnv() {
|
|
59
|
-
this._netSemconvStability = instrumentation.semconvStabilityFromStr("http", process.env.OTEL_SEMCONV_STABILITY_OPT_IN);
|
|
60
|
-
this._dbSemconvStability = instrumentation.semconvStabilityFromStr("database", process.env.OTEL_SEMCONV_STABILITY_OPT_IN);
|
|
61
54
|
}
|
|
62
55
|
init() {
|
|
63
56
|
const module = new instrumentation.InstrumentationNodeModuleDefinition(
|
|
@@ -69,37 +62,29 @@ class MongooseInstrumentation extends instrumentation.InstrumentationBase {
|
|
|
69
62
|
return module;
|
|
70
63
|
}
|
|
71
64
|
patch(module, moduleVersion) {
|
|
72
|
-
const moduleExports = module[Symbol.toStringTag] === "Module" ? module.default : module;
|
|
73
|
-
this._wrap(moduleExports.Model.prototype, "save", this.patchOnModelMethods("save"
|
|
65
|
+
const moduleExports = module[Symbol.toStringTag] === "Module" && module.default ? module.default : module;
|
|
66
|
+
this._wrap(moduleExports.Model.prototype, "save", this.patchOnModelMethods("save"));
|
|
74
67
|
moduleExports.Model.prototype.$save = moduleExports.Model.prototype.save;
|
|
75
68
|
if (instrumentRemove(moduleVersion)) {
|
|
76
|
-
this._wrap(moduleExports.Model.prototype, "remove", this.patchOnModelMethods("remove"
|
|
69
|
+
this._wrap(moduleExports.Model.prototype, "remove", this.patchOnModelMethods("remove"));
|
|
77
70
|
}
|
|
78
71
|
if (needsDocumentMethodPatch(moduleVersion)) {
|
|
79
|
-
this._wrap(
|
|
80
|
-
|
|
81
|
-
"updateOne",
|
|
82
|
-
this._patchDocumentUpdateMethods("updateOne", moduleVersion)
|
|
83
|
-
);
|
|
84
|
-
this._wrap(
|
|
85
|
-
moduleExports.Model.prototype,
|
|
86
|
-
"deleteOne",
|
|
87
|
-
this._patchDocumentUpdateMethods("deleteOne", moduleVersion)
|
|
88
|
-
);
|
|
72
|
+
this._wrap(moduleExports.Model.prototype, "updateOne", this._patchDocumentUpdateMethods("updateOne"));
|
|
73
|
+
this._wrap(moduleExports.Model.prototype, "deleteOne", this._patchDocumentUpdateMethods("deleteOne"));
|
|
89
74
|
}
|
|
90
|
-
this._wrap(moduleExports.Query.prototype, "exec", this.patchQueryExec(
|
|
91
|
-
this._wrap(moduleExports.Aggregate.prototype, "exec", this.patchAggregateExec(
|
|
75
|
+
this._wrap(moduleExports.Query.prototype, "exec", this.patchQueryExec());
|
|
76
|
+
this._wrap(moduleExports.Aggregate.prototype, "exec", this.patchAggregateExec());
|
|
92
77
|
const contextCaptureFunctions = getContextCaptureFunctions(moduleVersion);
|
|
93
78
|
contextCaptureFunctions.forEach((funcName) => {
|
|
94
79
|
this._wrap(moduleExports.Query.prototype, funcName, this.patchAndCaptureSpanContext(funcName));
|
|
95
80
|
});
|
|
96
81
|
this._wrap(moduleExports.Model, "aggregate", this.patchModelAggregate());
|
|
97
|
-
this._wrap(moduleExports.Model, "insertMany", this.patchModelStatic("insertMany"
|
|
98
|
-
this._wrap(moduleExports.Model, "bulkWrite", this.patchModelStatic("bulkWrite"
|
|
82
|
+
this._wrap(moduleExports.Model, "insertMany", this.patchModelStatic("insertMany"));
|
|
83
|
+
this._wrap(moduleExports.Model, "bulkWrite", this.patchModelStatic("bulkWrite"));
|
|
99
84
|
return moduleExports;
|
|
100
85
|
}
|
|
101
86
|
unpatch(module, moduleVersion) {
|
|
102
|
-
const moduleExports = module[Symbol.toStringTag] === "Module" ? module.default : module;
|
|
87
|
+
const moduleExports = module[Symbol.toStringTag] === "Module" && module.default ? module.default : module;
|
|
103
88
|
const contextCaptureFunctions = getContextCaptureFunctions(moduleVersion);
|
|
104
89
|
this._unwrap(moduleExports.Model.prototype, "save");
|
|
105
90
|
moduleExports.Model.prototype.$save = moduleExports.Model.prototype.save;
|
|
@@ -119,140 +104,54 @@ class MongooseInstrumentation extends instrumentation.InstrumentationBase {
|
|
|
119
104
|
this._unwrap(moduleExports.Model, "insertMany");
|
|
120
105
|
this._unwrap(moduleExports.Model, "bulkWrite");
|
|
121
106
|
}
|
|
122
|
-
patchAggregateExec(
|
|
107
|
+
patchAggregateExec() {
|
|
123
108
|
const self = this;
|
|
124
109
|
return (originalAggregate) => {
|
|
125
110
|
return function exec(callback) {
|
|
126
|
-
if (self.getConfig().requireParentSpan && api.trace.getSpan(api.context.active()) === void 0) {
|
|
127
|
-
return originalAggregate.apply(this, arguments);
|
|
128
|
-
}
|
|
129
111
|
const parentSpan = this[_STORED_PARENT_SPAN];
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
if (dbStatementSerializer) {
|
|
133
|
-
const statement = dbStatementSerializer("aggregate", {
|
|
134
|
-
options: this.options,
|
|
135
|
-
aggregatePipeline: this._pipeline
|
|
136
|
-
});
|
|
137
|
-
if (self._dbSemconvStability & instrumentation.SemconvStability.OLD) {
|
|
138
|
-
attributes[semconv.ATTR_DB_STATEMENT] = statement;
|
|
139
|
-
}
|
|
140
|
-
if (self._dbSemconvStability & instrumentation.SemconvStability.STABLE) {
|
|
141
|
-
attributes[semanticConventions.ATTR_DB_QUERY_TEXT] = statement;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
const span = self._startSpan(
|
|
145
|
-
this._model.collection,
|
|
146
|
-
this._model?.modelName,
|
|
147
|
-
"aggregate",
|
|
148
|
-
attributes,
|
|
149
|
-
parentSpan
|
|
150
|
-
);
|
|
151
|
-
return self._handleResponse(span, originalAggregate, this, arguments, callback, moduleVersion);
|
|
112
|
+
const span = self._startSpan(this._model.collection, this._model?.modelName, "aggregate", parentSpan);
|
|
113
|
+
return self._handleResponse(span, originalAggregate, this, arguments, callback);
|
|
152
114
|
};
|
|
153
115
|
};
|
|
154
116
|
}
|
|
155
|
-
patchQueryExec(
|
|
117
|
+
patchQueryExec() {
|
|
156
118
|
const self = this;
|
|
157
119
|
return (originalExec) => {
|
|
158
120
|
return function exec(callback) {
|
|
159
121
|
if (this[_ALREADY_INSTRUMENTED]) {
|
|
160
122
|
return originalExec.apply(this, arguments);
|
|
161
123
|
}
|
|
162
|
-
if (self.getConfig().requireParentSpan && api.trace.getSpan(api.context.active()) === void 0) {
|
|
163
|
-
return originalExec.apply(this, arguments);
|
|
164
|
-
}
|
|
165
124
|
const parentSpan = this[_STORED_PARENT_SPAN];
|
|
166
|
-
const
|
|
167
|
-
|
|
168
|
-
if (dbStatementSerializer) {
|
|
169
|
-
const statement = dbStatementSerializer(this.op, {
|
|
170
|
-
// Use public API methods (getFilter/getOptions) for better compatibility
|
|
171
|
-
condition: this.getFilter?.() ?? this._conditions,
|
|
172
|
-
updates: this._update,
|
|
173
|
-
options: this.getOptions?.() ?? this.options,
|
|
174
|
-
fields: this._fields
|
|
175
|
-
});
|
|
176
|
-
if (self._dbSemconvStability & instrumentation.SemconvStability.OLD) {
|
|
177
|
-
attributes[semconv.ATTR_DB_STATEMENT] = statement;
|
|
178
|
-
}
|
|
179
|
-
if (self._dbSemconvStability & instrumentation.SemconvStability.STABLE) {
|
|
180
|
-
attributes[semanticConventions.ATTR_DB_QUERY_TEXT] = statement;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
const span = self._startSpan(this.mongooseCollection, this.model.modelName, this.op, attributes, parentSpan);
|
|
184
|
-
return self._handleResponse(span, originalExec, this, arguments, callback, moduleVersion);
|
|
125
|
+
const span = self._startSpan(this.mongooseCollection, this.model.modelName, this.op, parentSpan);
|
|
126
|
+
return self._handleResponse(span, originalExec, this, arguments, callback);
|
|
185
127
|
};
|
|
186
128
|
};
|
|
187
129
|
}
|
|
188
|
-
patchOnModelMethods(op
|
|
130
|
+
patchOnModelMethods(op) {
|
|
189
131
|
const self = this;
|
|
190
132
|
return (originalOnModelFunction) => {
|
|
191
133
|
return function method(options, callback) {
|
|
192
|
-
|
|
193
|
-
return originalOnModelFunction.apply(this, arguments);
|
|
194
|
-
}
|
|
195
|
-
const serializePayload = { document: this };
|
|
196
|
-
if (options && !(options instanceof Function)) {
|
|
197
|
-
serializePayload.options = options;
|
|
198
|
-
}
|
|
199
|
-
const attributes = {};
|
|
200
|
-
const { dbStatementSerializer } = self.getConfig();
|
|
201
|
-
if (dbStatementSerializer) {
|
|
202
|
-
const statement = dbStatementSerializer(op, serializePayload);
|
|
203
|
-
if (self._dbSemconvStability & instrumentation.SemconvStability.OLD) {
|
|
204
|
-
attributes[semconv.ATTR_DB_STATEMENT] = statement;
|
|
205
|
-
}
|
|
206
|
-
if (self._dbSemconvStability & instrumentation.SemconvStability.STABLE) {
|
|
207
|
-
attributes[semanticConventions.ATTR_DB_QUERY_TEXT] = statement;
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
const span = self._startSpan(this.constructor.collection, this.constructor.modelName, op, attributes);
|
|
134
|
+
const span = self._startSpan(this.constructor.collection, this.constructor.modelName, op);
|
|
211
135
|
if (options instanceof Function) {
|
|
212
136
|
callback = options;
|
|
213
|
-
options = void 0;
|
|
214
137
|
}
|
|
215
|
-
return self._handleResponse(span, originalOnModelFunction, this, arguments, callback
|
|
138
|
+
return self._handleResponse(span, originalOnModelFunction, this, arguments, callback);
|
|
216
139
|
};
|
|
217
140
|
};
|
|
218
141
|
}
|
|
219
142
|
// Patch document instance methods (doc.updateOne/deleteOne) for Mongoose 8.21.0+.
|
|
220
|
-
_patchDocumentUpdateMethods(op
|
|
143
|
+
_patchDocumentUpdateMethods(op) {
|
|
221
144
|
const self = this;
|
|
222
145
|
return (originalMethod) => {
|
|
223
146
|
return function method(update, options, callback) {
|
|
224
|
-
if (self.getConfig().requireParentSpan && api.trace.getSpan(api.context.active()) === void 0) {
|
|
225
|
-
return originalMethod.apply(this, arguments);
|
|
226
|
-
}
|
|
227
147
|
let actualCallback = callback;
|
|
228
|
-
let actualUpdate = update;
|
|
229
|
-
let actualOptions = options;
|
|
230
148
|
if (typeof update === "function") {
|
|
231
149
|
actualCallback = update;
|
|
232
|
-
actualUpdate = void 0;
|
|
233
|
-
actualOptions = void 0;
|
|
234
150
|
} else if (typeof options === "function") {
|
|
235
151
|
actualCallback = options;
|
|
236
|
-
actualOptions = void 0;
|
|
237
|
-
}
|
|
238
|
-
const attributes = {};
|
|
239
|
-
const dbStatementSerializer = self.getConfig().dbStatementSerializer;
|
|
240
|
-
if (dbStatementSerializer) {
|
|
241
|
-
const statement = dbStatementSerializer(op, {
|
|
242
|
-
// Document instance methods automatically use the document's _id as filter
|
|
243
|
-
condition: { _id: this._id },
|
|
244
|
-
updates: actualUpdate,
|
|
245
|
-
options: actualOptions
|
|
246
|
-
});
|
|
247
|
-
if (self._dbSemconvStability & instrumentation.SemconvStability.OLD) {
|
|
248
|
-
attributes[semconv.ATTR_DB_STATEMENT] = statement;
|
|
249
|
-
}
|
|
250
|
-
if (self._dbSemconvStability & instrumentation.SemconvStability.STABLE) {
|
|
251
|
-
attributes[semanticConventions.ATTR_DB_QUERY_TEXT] = statement;
|
|
252
|
-
}
|
|
253
152
|
}
|
|
254
|
-
const span = self._startSpan(this.constructor.collection, this.constructor.modelName, op
|
|
255
|
-
const result = self._handleResponse(span, originalMethod, this, arguments, actualCallback
|
|
153
|
+
const span = self._startSpan(this.constructor.collection, this.constructor.modelName, op);
|
|
154
|
+
const result = self._handleResponse(span, originalMethod, this, arguments, actualCallback);
|
|
256
155
|
if (result && typeof result === "object") {
|
|
257
156
|
result[_ALREADY_INSTRUMENTED] = true;
|
|
258
157
|
}
|
|
@@ -260,45 +159,15 @@ class MongooseInstrumentation extends instrumentation.InstrumentationBase {
|
|
|
260
159
|
};
|
|
261
160
|
};
|
|
262
161
|
}
|
|
263
|
-
patchModelStatic(op
|
|
162
|
+
patchModelStatic(op) {
|
|
264
163
|
const self = this;
|
|
265
164
|
return (original) => {
|
|
266
165
|
return function patchedStatic(docsOrOps, options, callback) {
|
|
267
|
-
if (self.getConfig().requireParentSpan && api.trace.getSpan(api.context.active()) === void 0) {
|
|
268
|
-
return original.apply(this, arguments);
|
|
269
|
-
}
|
|
270
166
|
if (typeof options === "function") {
|
|
271
167
|
callback = options;
|
|
272
|
-
options = void 0;
|
|
273
168
|
}
|
|
274
|
-
const
|
|
275
|
-
|
|
276
|
-
case "insertMany":
|
|
277
|
-
serializePayload.documents = docsOrOps;
|
|
278
|
-
break;
|
|
279
|
-
case "bulkWrite":
|
|
280
|
-
serializePayload.operations = docsOrOps;
|
|
281
|
-
break;
|
|
282
|
-
default:
|
|
283
|
-
serializePayload.document = docsOrOps;
|
|
284
|
-
break;
|
|
285
|
-
}
|
|
286
|
-
if (options !== void 0) {
|
|
287
|
-
serializePayload.options = options;
|
|
288
|
-
}
|
|
289
|
-
const attributes = {};
|
|
290
|
-
const { dbStatementSerializer } = self.getConfig();
|
|
291
|
-
if (dbStatementSerializer) {
|
|
292
|
-
const statement = dbStatementSerializer(op, serializePayload);
|
|
293
|
-
if (self._dbSemconvStability & instrumentation.SemconvStability.OLD) {
|
|
294
|
-
attributes[semconv.ATTR_DB_STATEMENT] = statement;
|
|
295
|
-
}
|
|
296
|
-
if (self._dbSemconvStability & instrumentation.SemconvStability.STABLE) {
|
|
297
|
-
attributes[semanticConventions.ATTR_DB_QUERY_TEXT] = statement;
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
const span = self._startSpan(this.collection, this.modelName, op, attributes);
|
|
301
|
-
return self._handleResponse(span, original, this, arguments, callback, moduleVersion);
|
|
169
|
+
const span = self._startSpan(this.collection, this.modelName, op);
|
|
170
|
+
return self._handleResponse(span, original, this, arguments, callback);
|
|
302
171
|
};
|
|
303
172
|
};
|
|
304
173
|
}
|
|
@@ -307,65 +176,49 @@ class MongooseInstrumentation extends instrumentation.InstrumentationBase {
|
|
|
307
176
|
// on the Aggregate object to capture the context on, so we patch
|
|
308
177
|
// the aggregate of Model, and set the context on the Aggregate object
|
|
309
178
|
patchModelAggregate() {
|
|
310
|
-
const self = this;
|
|
311
179
|
return (original) => {
|
|
312
180
|
return function captureSpanContext() {
|
|
313
|
-
const currentSpan =
|
|
314
|
-
const aggregate =
|
|
181
|
+
const currentSpan = core.getActiveSpan();
|
|
182
|
+
const aggregate = original.apply(this, arguments);
|
|
315
183
|
if (aggregate) aggregate[_STORED_PARENT_SPAN] = currentSpan;
|
|
316
184
|
return aggregate;
|
|
317
185
|
};
|
|
318
186
|
};
|
|
319
187
|
}
|
|
320
|
-
patchAndCaptureSpanContext(
|
|
321
|
-
const self = this;
|
|
188
|
+
patchAndCaptureSpanContext(_funcName) {
|
|
322
189
|
return (original) => {
|
|
323
190
|
return function captureSpanContext() {
|
|
324
|
-
this[_STORED_PARENT_SPAN] =
|
|
325
|
-
return
|
|
191
|
+
this[_STORED_PARENT_SPAN] = core.getActiveSpan();
|
|
192
|
+
return original.apply(this, arguments);
|
|
326
193
|
};
|
|
327
194
|
};
|
|
328
195
|
}
|
|
329
|
-
_startSpan(collection, modelName, operation,
|
|
330
|
-
const
|
|
331
|
-
...
|
|
332
|
-
|
|
196
|
+
_startSpan(collection, modelName, operation, parentSpan) {
|
|
197
|
+
const attributes = {
|
|
198
|
+
...utils.getAttributesFromCollection(collection),
|
|
199
|
+
// eslint-disable-next-line typescript/no-deprecated
|
|
200
|
+
[semconv.ATTR_DB_OPERATION]: operation,
|
|
201
|
+
// eslint-disable-next-line typescript/no-deprecated
|
|
202
|
+
[semconv.ATTR_DB_SYSTEM]: "mongoose",
|
|
203
|
+
// keep for backwards compatibility
|
|
204
|
+
[core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN
|
|
333
205
|
};
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
finalAttributes[semanticConventions.ATTR_DB_SYSTEM_NAME] = semconv.DB_SYSTEM_NAME_VALUE_MONGODB;
|
|
341
|
-
}
|
|
342
|
-
const spanName = this._dbSemconvStability & instrumentation.SemconvStability.STABLE ? `${operation} ${collection.name}` : `mongoose.${modelName}.${operation}`;
|
|
343
|
-
return this.tracer.startSpan(
|
|
344
|
-
spanName,
|
|
345
|
-
{
|
|
346
|
-
kind: api.SpanKind.CLIENT,
|
|
347
|
-
attributes: finalAttributes
|
|
348
|
-
},
|
|
349
|
-
parentSpan ? api.trace.setSpan(api.context.active(), parentSpan) : void 0
|
|
350
|
-
);
|
|
351
|
-
}
|
|
352
|
-
_handleResponse(span, exec, originalThis, args, callback, moduleVersion = void 0) {
|
|
353
|
-
const self = this;
|
|
354
|
-
if (callback instanceof Function) {
|
|
355
|
-
return self._callOriginalFunction(
|
|
356
|
-
() => utils.handleCallbackResponse(callback, exec, originalThis, span, args, self.getConfig().responseHook, moduleVersion)
|
|
357
|
-
);
|
|
358
|
-
} else {
|
|
359
|
-
const response = self._callOriginalFunction(() => exec.apply(originalThis, args));
|
|
360
|
-
return utils.handlePromiseResponse(response, span, self.getConfig().responseHook, moduleVersion);
|
|
361
|
-
}
|
|
206
|
+
return core.startInactiveSpan({
|
|
207
|
+
name: `mongoose.${modelName}.${operation}`,
|
|
208
|
+
kind: api.SpanKind.CLIENT,
|
|
209
|
+
attributes,
|
|
210
|
+
parentSpan
|
|
211
|
+
});
|
|
362
212
|
}
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
213
|
+
_handleResponse(span, exec, originalThis, args, callback) {
|
|
214
|
+
return core.withActiveSpan(span, () => {
|
|
215
|
+
if (callback instanceof Function) {
|
|
216
|
+
return utils.handleCallbackResponse(callback, exec, originalThis, span, args);
|
|
217
|
+
} else {
|
|
218
|
+
const response = exec.apply(originalThis, args);
|
|
219
|
+
return utils.handlePromiseResponse(response, span);
|
|
220
|
+
}
|
|
221
|
+
});
|
|
369
222
|
}
|
|
370
223
|
}
|
|
371
224
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mongoose.js","sources":["../../../../../../src/integrations/tracing/mongoose/vendored/mongoose.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-mongoose\n * - Upstream version: @opentelemetry/instrumentation-mongoose@0.64.0\n * - Types vendored from mongoose as simplified interfaces\n * - Minor TypeScript strictness adjustments for this repository's compiler settings\n */\n/* eslint-disable */\n\nimport { context, Span, trace, Attributes, SpanKind } from '@opentelemetry/api';\nimport { suppressTracing } from '@opentelemetry/core';\nimport type * as mongoose from './mongoose-types';\nimport { MongooseInstrumentationConfig, SerializerPayload } from './types';\nimport { handleCallbackResponse, handlePromiseResponse, getAttributesFromCollection } from './utils';\nimport {\n InstrumentationBase,\n InstrumentationModuleDefinition,\n InstrumentationNodeModuleDefinition,\n SemconvStability,\n semconvStabilityFromStr,\n} from '@opentelemetry/instrumentation';\nimport { SDK_VERSION } from '@sentry/core';\nimport { ATTR_DB_OPERATION, ATTR_DB_STATEMENT, ATTR_DB_SYSTEM, DB_SYSTEM_NAME_VALUE_MONGODB } from './semconv';\nimport { ATTR_DB_OPERATION_NAME, ATTR_DB_QUERY_TEXT, ATTR_DB_SYSTEM_NAME } from '@opentelemetry/semantic-conventions';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-mongoose';\n\nconst contextCaptureFunctionsCommon = [\n 'deleteOne',\n 'deleteMany',\n 'find',\n 'findOne',\n 'estimatedDocumentCount',\n 'countDocuments',\n 'distinct',\n 'where',\n '$where',\n 'findOneAndUpdate',\n 'findOneAndDelete',\n 'findOneAndReplace',\n];\n\nconst contextCaptureFunctions6 = ['remove', 'count', 'findOneAndRemove', ...contextCaptureFunctionsCommon];\nconst contextCaptureFunctions7 = ['count', 'findOneAndRemove', ...contextCaptureFunctionsCommon];\nconst contextCaptureFunctions8 = [...contextCaptureFunctionsCommon];\n\nfunction getContextCaptureFunctions(moduleVersion: string | undefined): string[] {\n /* istanbul ignore next */\n if (!moduleVersion) {\n return contextCaptureFunctionsCommon;\n } else if (moduleVersion.startsWith('6.') || moduleVersion.startsWith('5.')) {\n return contextCaptureFunctions6;\n } else if (moduleVersion.startsWith('7.')) {\n return contextCaptureFunctions7;\n } else {\n return contextCaptureFunctions8;\n }\n}\n\nfunction instrumentRemove(moduleVersion: string | undefined): boolean {\n return (moduleVersion && (moduleVersion.startsWith('5.') || moduleVersion.startsWith('6.'))) || false;\n}\n\n/**\n * 8.21.0 changed Document.updateOne/deleteOne so that the Query is not fully built when Query.exec() is called.\n * @param moduleVersion\n */\nfunction needsDocumentMethodPatch(moduleVersion: string | undefined): boolean {\n if (!moduleVersion || !moduleVersion.startsWith('8.')) {\n return false;\n }\n\n const minor = parseInt(moduleVersion.split('.')[1]!, 10);\n return minor >= 21;\n}\n\n// when mongoose functions are called, we store the original call context\n// and then set it as the parent for the spans created by Query/Aggregate exec()\n// calls. this bypass the unlinked spans issue on thenables await operations.\nexport const _STORED_PARENT_SPAN: unique symbol = Symbol('stored-parent-span');\n\n// Prevents double-instrumentation when doc.updateOne/deleteOne (Mongoose 8.21.0+)\n// creates a span and returns a Query that also calls exec()\nexport const _ALREADY_INSTRUMENTED: unique symbol = Symbol('already-instrumented');\n\nexport class MongooseInstrumentation extends InstrumentationBase<MongooseInstrumentationConfig> {\n private _netSemconvStability!: SemconvStability;\n private _dbSemconvStability!: SemconvStability;\n\n constructor(config: MongooseInstrumentationConfig = {}) {\n super(PACKAGE_NAME, SDK_VERSION, config);\n this._setSemconvStabilityFromEnv();\n }\n\n // Used for testing.\n private _setSemconvStabilityFromEnv() {\n this._netSemconvStability = semconvStabilityFromStr('http', process.env.OTEL_SEMCONV_STABILITY_OPT_IN);\n this._dbSemconvStability = semconvStabilityFromStr('database', process.env.OTEL_SEMCONV_STABILITY_OPT_IN);\n }\n\n protected init(): InstrumentationModuleDefinition {\n const module = new InstrumentationNodeModuleDefinition(\n 'mongoose',\n ['>=5.9.7 <10'],\n this.patch.bind(this),\n this.unpatch.bind(this),\n );\n return module;\n }\n\n private patch(module: any, moduleVersion: string | undefined) {\n const moduleExports: typeof mongoose = module[Symbol.toStringTag] === 'Module' ? module.default : module;\n\n this._wrap(moduleExports.Model.prototype, 'save', this.patchOnModelMethods('save', moduleVersion));\n // mongoose applies this code on module require:\n // Model.prototype.$save = Model.prototype.save;\n // which captures the save function before it is patched.\n // so we need to apply the same logic after instrumenting the save function.\n moduleExports.Model.prototype.$save = moduleExports.Model.prototype.save;\n\n if (instrumentRemove(moduleVersion)) {\n this._wrap(moduleExports.Model.prototype, 'remove', this.patchOnModelMethods('remove', moduleVersion));\n }\n\n // Mongoose 8.21.0+ changed Document.updateOne()/deleteOne() so that the Query is not fully built when Query.exec() is called.\n if (needsDocumentMethodPatch(moduleVersion)) {\n this._wrap(\n moduleExports.Model.prototype,\n 'updateOne',\n this._patchDocumentUpdateMethods('updateOne', moduleVersion),\n );\n this._wrap(\n moduleExports.Model.prototype,\n 'deleteOne',\n this._patchDocumentUpdateMethods('deleteOne', moduleVersion),\n );\n }\n\n this._wrap(moduleExports.Query.prototype, 'exec', this.patchQueryExec(moduleVersion));\n this._wrap(moduleExports.Aggregate.prototype, 'exec', this.patchAggregateExec(moduleVersion));\n\n const contextCaptureFunctions = getContextCaptureFunctions(moduleVersion);\n\n contextCaptureFunctions.forEach((funcName: string) => {\n this._wrap(moduleExports.Query.prototype, funcName as any, this.patchAndCaptureSpanContext(funcName));\n });\n this._wrap(moduleExports.Model, 'aggregate', this.patchModelAggregate());\n\n this._wrap(moduleExports.Model, 'insertMany', this.patchModelStatic('insertMany', moduleVersion));\n this._wrap(moduleExports.Model, 'bulkWrite', this.patchModelStatic('bulkWrite', moduleVersion));\n\n return moduleExports;\n }\n\n private unpatch(module: any, moduleVersion: string | undefined): void {\n const moduleExports: typeof mongoose = module[Symbol.toStringTag] === 'Module' ? module.default : module;\n\n const contextCaptureFunctions = getContextCaptureFunctions(moduleVersion);\n\n this._unwrap(moduleExports.Model.prototype, 'save');\n // revert the patch for $save which we applied by aliasing it to patched `save`\n moduleExports.Model.prototype.$save = moduleExports.Model.prototype.save;\n\n if (instrumentRemove(moduleVersion)) {\n this._unwrap(moduleExports.Model.prototype, 'remove');\n }\n\n if (needsDocumentMethodPatch(moduleVersion)) {\n this._unwrap(moduleExports.Model.prototype, 'updateOne');\n this._unwrap(moduleExports.Model.prototype, 'deleteOne');\n }\n\n this._unwrap(moduleExports.Query.prototype, 'exec');\n this._unwrap(moduleExports.Aggregate.prototype, 'exec');\n\n contextCaptureFunctions.forEach((funcName: string) => {\n this._unwrap(moduleExports.Query.prototype, funcName as any);\n });\n this._unwrap(moduleExports.Model, 'aggregate');\n\n this._unwrap(moduleExports.Model, 'insertMany');\n this._unwrap(moduleExports.Model, 'bulkWrite');\n }\n\n private patchAggregateExec(moduleVersion: string | undefined) {\n const self = this;\n return (originalAggregate: Function) => {\n return function exec(this: any, callback?: Function) {\n if (self.getConfig().requireParentSpan && trace.getSpan(context.active()) === undefined) {\n return originalAggregate.apply(this, arguments);\n }\n\n const parentSpan = this[_STORED_PARENT_SPAN];\n const attributes: Attributes = {};\n const { dbStatementSerializer } = self.getConfig();\n if (dbStatementSerializer) {\n const statement = dbStatementSerializer('aggregate', {\n options: this.options,\n aggregatePipeline: this._pipeline,\n });\n if (self._dbSemconvStability & SemconvStability.OLD) {\n attributes[ATTR_DB_STATEMENT] = statement;\n }\n if (self._dbSemconvStability & SemconvStability.STABLE) {\n attributes[ATTR_DB_QUERY_TEXT] = statement;\n }\n }\n\n const span = self._startSpan(\n this._model.collection,\n this._model?.modelName,\n 'aggregate',\n attributes,\n parentSpan,\n );\n\n return self._handleResponse(span, originalAggregate, this, arguments, callback, moduleVersion);\n };\n };\n }\n\n private patchQueryExec(moduleVersion: string | undefined) {\n const self = this;\n return (originalExec: Function) => {\n return function exec(this: any, callback?: Function) {\n // Skip if already instrumented by document instance method patch\n if (this[_ALREADY_INSTRUMENTED]) {\n return originalExec.apply(this, arguments);\n }\n\n if (self.getConfig().requireParentSpan && trace.getSpan(context.active()) === undefined) {\n return originalExec.apply(this, arguments);\n }\n\n const parentSpan = this[_STORED_PARENT_SPAN];\n const attributes: Attributes = {};\n const { dbStatementSerializer } = self.getConfig();\n if (dbStatementSerializer) {\n const statement = dbStatementSerializer(this.op, {\n // Use public API methods (getFilter/getOptions) for better compatibility\n condition: this.getFilter?.() ?? this._conditions,\n updates: this._update,\n options: this.getOptions?.() ?? this.options,\n fields: this._fields,\n });\n if (self._dbSemconvStability & SemconvStability.OLD) {\n attributes[ATTR_DB_STATEMENT] = statement;\n }\n if (self._dbSemconvStability & SemconvStability.STABLE) {\n attributes[ATTR_DB_QUERY_TEXT] = statement;\n }\n }\n const span = self._startSpan(this.mongooseCollection, this.model.modelName, this.op, attributes, parentSpan);\n\n return self._handleResponse(span, originalExec, this, arguments, callback, moduleVersion);\n };\n };\n }\n\n private patchOnModelMethods(op: string, moduleVersion: string | undefined) {\n const self = this;\n return (originalOnModelFunction: Function) => {\n return function method(this: any, options?: any, callback?: Function) {\n if (self.getConfig().requireParentSpan && trace.getSpan(context.active()) === undefined) {\n return originalOnModelFunction.apply(this, arguments);\n }\n\n const serializePayload: SerializerPayload = { document: this };\n if (options && !(options instanceof Function)) {\n serializePayload.options = options;\n }\n const attributes: Attributes = {};\n const { dbStatementSerializer } = self.getConfig();\n if (dbStatementSerializer) {\n const statement = dbStatementSerializer(op, serializePayload);\n if (self._dbSemconvStability & SemconvStability.OLD) {\n attributes[ATTR_DB_STATEMENT] = statement;\n }\n if (self._dbSemconvStability & SemconvStability.STABLE) {\n attributes[ATTR_DB_QUERY_TEXT] = statement;\n }\n }\n const span = self._startSpan(this.constructor.collection, this.constructor.modelName, op, attributes);\n\n if (options instanceof Function) {\n callback = options;\n options = undefined;\n }\n\n return self._handleResponse(span, originalOnModelFunction, this, arguments, callback, moduleVersion);\n };\n };\n }\n\n // Patch document instance methods (doc.updateOne/deleteOne) for Mongoose 8.21.0+.\n private _patchDocumentUpdateMethods(op: string, moduleVersion: string | undefined) {\n const self = this;\n return (originalMethod: Function) => {\n return function method(this: any, update?: any, options?: any, callback?: Function) {\n if (self.getConfig().requireParentSpan && trace.getSpan(context.active()) === undefined) {\n return originalMethod.apply(this, arguments);\n }\n\n // determine actual callback since different argument patterns are allowed\n let actualCallback: Function | undefined = callback;\n let actualUpdate = update;\n let actualOptions = options;\n\n if (typeof update === 'function') {\n actualCallback = update;\n actualUpdate = undefined;\n actualOptions = undefined;\n } else if (typeof options === 'function') {\n actualCallback = options;\n actualOptions = undefined;\n }\n\n const attributes: Attributes = {};\n const dbStatementSerializer = self.getConfig().dbStatementSerializer;\n if (dbStatementSerializer) {\n const statement = dbStatementSerializer(op, {\n // Document instance methods automatically use the document's _id as filter\n condition: { _id: this._id },\n updates: actualUpdate,\n options: actualOptions,\n });\n if (self._dbSemconvStability & SemconvStability.OLD) {\n attributes[ATTR_DB_STATEMENT] = statement;\n }\n if (self._dbSemconvStability & SemconvStability.STABLE) {\n attributes[ATTR_DB_QUERY_TEXT] = statement;\n }\n }\n\n const span = self._startSpan(this.constructor.collection, this.constructor.modelName, op, attributes);\n\n const result = self._handleResponse(span, originalMethod, this, arguments, actualCallback, moduleVersion);\n\n // Mark returned Query to prevent double-instrumentation when exec() is eventually called\n if (result && typeof result === 'object') {\n result[_ALREADY_INSTRUMENTED] = true;\n }\n\n return result;\n };\n };\n }\n\n private patchModelStatic(op: string, moduleVersion: string | undefined) {\n const self = this;\n return (original: Function) => {\n return function patchedStatic(this: any, docsOrOps: any, options?: any, callback?: Function) {\n if (self.getConfig().requireParentSpan && trace.getSpan(context.active()) === undefined) {\n return original.apply(this, arguments);\n }\n if (typeof options === 'function') {\n callback = options;\n options = undefined;\n }\n\n const serializePayload: SerializerPayload = {};\n switch (op) {\n case 'insertMany':\n serializePayload.documents = docsOrOps;\n break;\n case 'bulkWrite':\n serializePayload.operations = docsOrOps;\n break;\n default:\n serializePayload.document = docsOrOps;\n break;\n }\n if (options !== undefined) {\n serializePayload.options = options;\n }\n\n const attributes: Attributes = {};\n const { dbStatementSerializer } = self.getConfig();\n if (dbStatementSerializer) {\n const statement = dbStatementSerializer(op, serializePayload);\n if (self._dbSemconvStability & SemconvStability.OLD) {\n attributes[ATTR_DB_STATEMENT] = statement;\n }\n if (self._dbSemconvStability & SemconvStability.STABLE) {\n attributes[ATTR_DB_QUERY_TEXT] = statement;\n }\n }\n\n const span = self._startSpan(this.collection, this.modelName, op, attributes);\n\n return self._handleResponse(span, original, this, arguments, callback, moduleVersion);\n };\n };\n }\n\n // we want to capture the otel span on the object which is calling exec.\n // in the special case of aggregate, we need have no function to path\n // on the Aggregate object to capture the context on, so we patch\n // the aggregate of Model, and set the context on the Aggregate object\n private patchModelAggregate() {\n const self = this;\n return (original: Function) => {\n return function captureSpanContext(this: any) {\n const currentSpan = trace.getSpan(context.active());\n const aggregate = self._callOriginalFunction(() => original.apply(this, arguments));\n if (aggregate) aggregate[_STORED_PARENT_SPAN] = currentSpan;\n return aggregate;\n };\n };\n }\n\n private patchAndCaptureSpanContext(funcName: string) {\n const self = this;\n return (original: Function) => {\n return function captureSpanContext(this: any) {\n this[_STORED_PARENT_SPAN] = trace.getSpan(context.active());\n return self._callOriginalFunction(() => original.apply(this, arguments));\n };\n };\n }\n\n private _startSpan(\n collection: mongoose.Collection,\n modelName: string,\n operation: string,\n attributes: Attributes,\n parentSpan?: Span,\n ): Span {\n const finalAttributes: Attributes = {\n ...attributes,\n ...getAttributesFromCollection(collection, this._dbSemconvStability, this._netSemconvStability),\n };\n\n if (this._dbSemconvStability & SemconvStability.OLD) {\n finalAttributes[ATTR_DB_OPERATION] = operation;\n finalAttributes[ATTR_DB_SYSTEM] = 'mongoose'; // keep for backwards compatibility\n }\n if (this._dbSemconvStability & SemconvStability.STABLE) {\n finalAttributes[ATTR_DB_OPERATION_NAME] = operation;\n finalAttributes[ATTR_DB_SYSTEM_NAME] = DB_SYSTEM_NAME_VALUE_MONGODB; // actual db system name\n }\n\n const spanName =\n this._dbSemconvStability & SemconvStability.STABLE\n ? `${operation} ${collection.name}`\n : `mongoose.${modelName}.${operation}`;\n\n return this.tracer.startSpan(\n spanName,\n {\n kind: SpanKind.CLIENT,\n attributes: finalAttributes,\n },\n parentSpan ? trace.setSpan(context.active(), parentSpan) : undefined,\n );\n }\n\n private _handleResponse(\n span: Span,\n exec: Function,\n originalThis: any,\n args: IArguments,\n callback?: Function,\n moduleVersion: string | undefined = undefined,\n ) {\n const self = this;\n if (callback instanceof Function) {\n return self._callOriginalFunction(() =>\n handleCallbackResponse(callback, exec, originalThis, span, args, self.getConfig().responseHook, moduleVersion),\n );\n } else {\n const response = self._callOriginalFunction(() => exec.apply(originalThis, args));\n return handlePromiseResponse(response, span, self.getConfig().responseHook, moduleVersion);\n }\n }\n\n private _callOriginalFunction<T>(originalFunction: (...args: any[]) => T): T {\n if (this.getConfig().suppressInternalInstrumentation) {\n return context.with(suppressTracing(context.active()), originalFunction);\n } else {\n return originalFunction();\n }\n }\n}\n"],"names":["InstrumentationBase","SDK_VERSION","semconvStabilityFromStr","InstrumentationNodeModuleDefinition","trace","context","SemconvStability","ATTR_DB_STATEMENT","ATTR_DB_QUERY_TEXT","getAttributesFromCollection","ATTR_DB_OPERATION","ATTR_DB_SYSTEM","ATTR_DB_OPERATION_NAME","ATTR_DB_SYSTEM_NAME","DB_SYSTEM_NAME_VALU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ose.js","sources":["../../../../../../src/integrations/tracing/mongoose/vendored/mongoose.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-mongoose\n * - Upstream version: @opentelemetry/instrumentation-mongoose@0.64.0\n * - Types vendored from mongoose as simplified interfaces\n * - Minor TypeScript strictness adjustments for this repository's compiler settings\n * - Refactored to use Sentry's span APIs instead of OpenTelemetry tracing APIs\n */\n\nimport { SpanKind } from '@opentelemetry/api';\nimport {\n type InstrumentationConfig,\n InstrumentationBase,\n type InstrumentationModuleDefinition,\n InstrumentationNodeModuleDefinition,\n} from '@opentelemetry/instrumentation';\nimport type { Span, SpanAttributes } from '@sentry/core';\nimport {\n getActiveSpan,\n SDK_VERSION,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n startInactiveSpan,\n withActiveSpan,\n} from '@sentry/core';\nimport type * as mongoose from './mongoose-types';\nimport { ATTR_DB_OPERATION, ATTR_DB_SYSTEM } from './semconv';\nimport { getAttributesFromCollection, handleCallbackResponse, handlePromiseResponse } from './utils';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-mongoose';\nconst ORIGIN = 'auto.db.otel.mongoose';\n\ntype MongooseModuleExports = typeof mongoose;\n\n// The raw imported `mongoose` module: either the CJS object itself, or an ESM\n// namespace wrapper exposing the same shape under `.default`.\ntype MongooseModule = MongooseModuleExports & {\n default?: MongooseModuleExports;\n [Symbol.toStringTag]?: string;\n};\n\nconst contextCaptureFunctionsCommon = [\n 'deleteOne',\n 'deleteMany',\n 'find',\n 'findOne',\n 'estimatedDocumentCount',\n 'countDocuments',\n 'distinct',\n 'where',\n '$where',\n 'findOneAndUpdate',\n 'findOneAndDelete',\n 'findOneAndReplace',\n];\n\nconst contextCaptureFunctions6 = ['remove', 'count', 'findOneAndRemove', ...contextCaptureFunctionsCommon];\nconst contextCaptureFunctions7 = ['count', 'findOneAndRemove', ...contextCaptureFunctionsCommon];\nconst contextCaptureFunctions8 = [...contextCaptureFunctionsCommon];\n\nfunction getContextCaptureFunctions(moduleVersion: string | undefined): string[] {\n /* istanbul ignore next */\n if (!moduleVersion) {\n return contextCaptureFunctionsCommon;\n } else if (moduleVersion.startsWith('6.') || moduleVersion.startsWith('5.')) {\n return contextCaptureFunctions6;\n } else if (moduleVersion.startsWith('7.')) {\n return contextCaptureFunctions7;\n } else {\n return contextCaptureFunctions8;\n }\n}\n\nfunction instrumentRemove(moduleVersion: string | undefined): boolean {\n return (moduleVersion && (moduleVersion.startsWith('5.') || moduleVersion.startsWith('6.'))) || false;\n}\n\n/**\n * 8.21.0 changed Document.updateOne/deleteOne so that the Query is not fully built when Query.exec() is called.\n * @param moduleVersion\n */\nfunction needsDocumentMethodPatch(moduleVersion: string | undefined): boolean {\n if (!moduleVersion || !moduleVersion.startsWith('8.')) {\n return false;\n }\n\n const minor = parseInt(moduleVersion.split('.')[1]!, 10);\n return minor >= 21;\n}\n\n// when mongoose functions are called, we store the original call context\n// and then set it as the parent for the spans created by Query/Aggregate exec()\n// calls. this bypass the unlinked spans issue on thenables await operations.\nexport const _STORED_PARENT_SPAN: unique symbol = Symbol('stored-parent-span');\n\n// Prevents double-instrumentation when doc.updateOne/deleteOne (Mongoose 8.21.0+)\n// creates a span and returns a Query that also calls exec()\nexport const _ALREADY_INSTRUMENTED: unique symbol = Symbol('already-instrumented');\n\nexport class MongooseInstrumentation extends InstrumentationBase<InstrumentationConfig> {\n constructor(config: InstrumentationConfig = {}) {\n super(PACKAGE_NAME, SDK_VERSION, config);\n }\n\n protected init(): InstrumentationModuleDefinition {\n const module = new InstrumentationNodeModuleDefinition(\n 'mongoose',\n ['>=5.9.7 <10'],\n this.patch.bind(this),\n this.unpatch.bind(this),\n );\n return module;\n }\n\n private patch(module: MongooseModule, moduleVersion: string | undefined) {\n const moduleExports: MongooseModuleExports =\n module[Symbol.toStringTag] === 'Module' && module.default ? module.default : module;\n\n this._wrap(moduleExports.Model.prototype, 'save', this.patchOnModelMethods('save'));\n // mongoose applies this code on module require:\n // Model.prototype.$save = Model.prototype.save;\n // which captures the save function before it is patched.\n // so we need to apply the same logic after instrumenting the save function.\n moduleExports.Model.prototype.$save = moduleExports.Model.prototype.save;\n\n if (instrumentRemove(moduleVersion)) {\n this._wrap(moduleExports.Model.prototype, 'remove', this.patchOnModelMethods('remove'));\n }\n\n // Mongoose 8.21.0+ changed Document.updateOne()/deleteOne() so that the Query is not fully built when Query.exec() is called.\n if (needsDocumentMethodPatch(moduleVersion)) {\n this._wrap(moduleExports.Model.prototype, 'updateOne', this._patchDocumentUpdateMethods('updateOne'));\n this._wrap(moduleExports.Model.prototype, 'deleteOne', this._patchDocumentUpdateMethods('deleteOne'));\n }\n\n this._wrap(moduleExports.Query.prototype, 'exec', this.patchQueryExec());\n this._wrap(moduleExports.Aggregate.prototype, 'exec', this.patchAggregateExec());\n\n const contextCaptureFunctions = getContextCaptureFunctions(moduleVersion);\n\n contextCaptureFunctions.forEach((funcName: string) => {\n this._wrap(moduleExports.Query.prototype, funcName as any, this.patchAndCaptureSpanContext(funcName));\n });\n this._wrap(moduleExports.Model, 'aggregate', this.patchModelAggregate());\n\n this._wrap(moduleExports.Model, 'insertMany', this.patchModelStatic('insertMany'));\n this._wrap(moduleExports.Model, 'bulkWrite', this.patchModelStatic('bulkWrite'));\n\n return moduleExports;\n }\n\n private unpatch(module: MongooseModule, moduleVersion: string | undefined): void {\n const moduleExports: MongooseModuleExports =\n module[Symbol.toStringTag] === 'Module' && module.default ? module.default : module;\n\n const contextCaptureFunctions = getContextCaptureFunctions(moduleVersion);\n\n this._unwrap(moduleExports.Model.prototype, 'save');\n // revert the patch for $save which we applied by aliasing it to patched `save`\n moduleExports.Model.prototype.$save = moduleExports.Model.prototype.save;\n\n if (instrumentRemove(moduleVersion)) {\n this._unwrap(moduleExports.Model.prototype, 'remove');\n }\n\n if (needsDocumentMethodPatch(moduleVersion)) {\n this._unwrap(moduleExports.Model.prototype, 'updateOne');\n this._unwrap(moduleExports.Model.prototype, 'deleteOne');\n }\n\n this._unwrap(moduleExports.Query.prototype, 'exec');\n this._unwrap(moduleExports.Aggregate.prototype, 'exec');\n\n contextCaptureFunctions.forEach((funcName: string) => {\n this._unwrap(moduleExports.Query.prototype, funcName as any);\n });\n this._unwrap(moduleExports.Model, 'aggregate');\n\n this._unwrap(moduleExports.Model, 'insertMany');\n this._unwrap(moduleExports.Model, 'bulkWrite');\n }\n\n private patchAggregateExec() {\n const self = this;\n return (originalAggregate: Function) => {\n return function exec(this: any, callback?: Function) {\n const parentSpan = this[_STORED_PARENT_SPAN];\n const span = self._startSpan(this._model.collection, this._model?.modelName, 'aggregate', parentSpan);\n\n return self._handleResponse(span, originalAggregate, this, arguments, callback);\n };\n };\n }\n\n private patchQueryExec() {\n const self = this;\n return (originalExec: Function) => {\n return function exec(this: any, callback?: Function) {\n // Skip if already instrumented by document instance method patch\n if (this[_ALREADY_INSTRUMENTED]) {\n return originalExec.apply(this, arguments);\n }\n\n const parentSpan = this[_STORED_PARENT_SPAN];\n const span = self._startSpan(this.mongooseCollection, this.model.modelName, this.op, parentSpan);\n\n return self._handleResponse(span, originalExec, this, arguments, callback);\n };\n };\n }\n\n private patchOnModelMethods(op: string) {\n const self = this;\n return (originalOnModelFunction: Function) => {\n return function method(this: any, options?: any, callback?: Function) {\n const span = self._startSpan(this.constructor.collection, this.constructor.modelName, op);\n\n if (options instanceof Function) {\n // oxlint-disable-next-line no-param-reassign\n callback = options;\n }\n\n return self._handleResponse(span, originalOnModelFunction, this, arguments, callback);\n };\n };\n }\n\n // Patch document instance methods (doc.updateOne/deleteOne) for Mongoose 8.21.0+.\n private _patchDocumentUpdateMethods(op: string) {\n const self = this;\n return (originalMethod: Function) => {\n return function method(this: any, update?: any, options?: any, callback?: Function) {\n // determine actual callback since different argument patterns are allowed\n let actualCallback: Function | undefined = callback;\n if (typeof update === 'function') {\n actualCallback = update;\n } else if (typeof options === 'function') {\n actualCallback = options;\n }\n\n const span = self._startSpan(this.constructor.collection, this.constructor.modelName, op);\n\n const result = self._handleResponse(span, originalMethod, this, arguments, actualCallback);\n\n // Mark returned Query to prevent double-instrumentation when exec() is eventually called\n if (result && typeof result === 'object') {\n result[_ALREADY_INSTRUMENTED] = true;\n }\n\n return result;\n };\n };\n }\n\n private patchModelStatic(op: string) {\n const self = this;\n return (original: Function) => {\n return function patchedStatic(this: any, docsOrOps: any, options?: any, callback?: Function) {\n if (typeof options === 'function') {\n // oxlint-disable-next-line no-param-reassign\n callback = options;\n }\n\n const span = self._startSpan(this.collection, this.modelName, op);\n\n return self._handleResponse(span, original, this, arguments, callback);\n };\n };\n }\n\n // we want to capture the otel span on the object which is calling exec.\n // in the special case of aggregate, we need have no function to path\n // on the Aggregate object to capture the context on, so we patch\n // the aggregate of Model, and set the context on the Aggregate object\n private patchModelAggregate() {\n return (original: Function) => {\n return function captureSpanContext(this: any) {\n const currentSpan = getActiveSpan();\n const aggregate = original.apply(this, arguments);\n if (aggregate) aggregate[_STORED_PARENT_SPAN] = currentSpan;\n return aggregate;\n };\n };\n }\n\n private patchAndCaptureSpanContext(_funcName: string) {\n return (original: Function) => {\n return function captureSpanContext(this: any) {\n this[_STORED_PARENT_SPAN] = getActiveSpan();\n return original.apply(this, arguments);\n };\n };\n }\n\n private _startSpan(collection: mongoose.Collection, modelName: string, operation: string, parentSpan?: Span): Span {\n const attributes: SpanAttributes = {\n ...getAttributesFromCollection(collection),\n // eslint-disable-next-line typescript/no-deprecated\n [ATTR_DB_OPERATION]: operation,\n // eslint-disable-next-line typescript/no-deprecated\n [ATTR_DB_SYSTEM]: 'mongoose', // keep for backwards compatibility\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN,\n };\n\n return startInactiveSpan({\n name: `mongoose.${modelName}.${operation}`,\n kind: SpanKind.CLIENT,\n attributes,\n parentSpan,\n });\n }\n\n private _handleResponse(span: Span, exec: Function, originalThis: any, args: IArguments, callback?: Function) {\n // Activate the span while the underlying operation runs so that nested instrumentation\n // (e.g. the mongodb driver spans) is parented to this span. `withActiveSpan` returns the\n // callback's result untouched, so lazy mongoose Query thenables are handed back unexecuted.\n return withActiveSpan(span, () => {\n if (callback instanceof Function) {\n return handleCallbackResponse(callback, exec, originalThis, span, args);\n } else {\n const response = exec.apply(originalThis, args);\n return handlePromiseResponse(response, span);\n }\n });\n }\n}\n"],"names":["InstrumentationBase","SDK_VERSION","InstrumentationNodeModuleDefinition","getActiveSpan","getAttributesFromCollection","ATTR_DB_OPERATION","ATTR_DB_SYSTEM","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","startInactiveSpan","SpanKind","withActiveSpan","handleCallbackResponse","handlePromiseResponse"],"mappings":";;;;;;;;AA+BA,MAAM,YAAA,GAAe,kCAAA;AACrB,MAAM,MAAA,GAAS,uBAAA;AAWf,MAAM,6BAAA,GAAgC;AAAA,EACpC,WAAA;AAAA,EACA,YAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA,wBAAA;AAAA,EACA,gBAAA;AAAA,EACA,UAAA;AAAA,EACA,OAAA;AAAA,EACA,QAAA;AAAA,EACA,kBAAA;AAAA,EACA,kBAAA;AAAA,EACA;AACF,CAAA;AAEA,MAAM,2BAA2B,CAAC,QAAA,EAAU,OAAA,EAAS,kBAAA,EAAoB,GAAG,6BAA6B,CAAA;AACzG,MAAM,wBAAA,GAA2B,CAAC,OAAA,EAAS,kBAAA,EAAoB,GAAG,6BAA6B,CAAA;AAC/F,MAAM,wBAAA,GAA2B,CAAC,GAAG,6BAA6B,CAAA;AAElE,SAAS,2BAA2B,aAAA,EAA6C;AAE/E,EAAA,IAAI,CAAC,aAAA,EAAe;AAClB,IAAA,OAAO,6BAAA;AAAA,EACT,CAAA,MAAA,IAAW,cAAc,UAAA,CAAW,IAAI,KAAK,aAAA,CAAc,UAAA,CAAW,IAAI,CA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AAM,YAAA,EAAc,IAAI,CAAA;AAC9C,QAAA,OAAOC,2BAAA,CAAsB,UAAU,IAAI,CAAA;AAAA,MAC7C;AAAA,IACF,CAAC,CAAA;AAAA,EACH;AACF;;;;;;"}
|
|
@@ -3,20 +3,16 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
3
3
|
const ATTR_DB_MONGODB_COLLECTION = "db.mongodb.collection";
|
|
4
4
|
const ATTR_DB_NAME = "db.name";
|
|
5
5
|
const ATTR_DB_OPERATION = "db.operation";
|
|
6
|
-
const ATTR_DB_STATEMENT = "db.statement";
|
|
7
6
|
const ATTR_DB_SYSTEM = "db.system";
|
|
8
7
|
const ATTR_DB_USER = "db.user";
|
|
9
8
|
const ATTR_NET_PEER_NAME = "net.peer.name";
|
|
10
9
|
const ATTR_NET_PEER_PORT = "net.peer.port";
|
|
11
|
-
const DB_SYSTEM_NAME_VALUE_MONGODB = "mongodb";
|
|
12
10
|
|
|
13
11
|
exports.ATTR_DB_MONGODB_COLLECTION = ATTR_DB_MONGODB_COLLECTION;
|
|
14
12
|
exports.ATTR_DB_NAME = ATTR_DB_NAME;
|
|
15
13
|
exports.ATTR_DB_OPERATION = ATTR_DB_OPERATION;
|
|
16
|
-
exports.ATTR_DB_STATEMENT = ATTR_DB_STATEMENT;
|
|
17
14
|
exports.ATTR_DB_SYSTEM = ATTR_DB_SYSTEM;
|
|
18
15
|
exports.ATTR_DB_USER = ATTR_DB_USER;
|
|
19
16
|
exports.ATTR_NET_PEER_NAME = ATTR_NET_PEER_NAME;
|
|
20
17
|
exports.ATTR_NET_PEER_PORT = ATTR_NET_PEER_PORT;
|
|
21
|
-
exports.DB_SYSTEM_NAME_VALUE_MONGODB = DB_SYSTEM_NAME_VALUE_MONGODB;
|
|
22
18
|
//# sourceMappingURL=semconv.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"semconv.js","sources":["../../../../../../src/integrations/tracing/mongoose/vendored/semconv.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n
|
|
1
|
+
{"version":3,"file":"semconv.js","sources":["../../../../../../src/integrations/tracing/mongoose/vendored/semconv.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-mongoose\n * - Upstream version: @opentelemetry/instrumentation-mongoose@0.64.0\n */\n\n/**\n * Deprecated, use `db.collection.name` instead.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.collection.name`.\n */\nexport const ATTR_DB_MONGODB_COLLECTION = 'db.mongodb.collection' as const;\n\n/**\n * Deprecated, use `db.namespace` instead.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.namespace`.\n */\nexport const ATTR_DB_NAME = 'db.name' as const;\n\n/**\n * Deprecated, use `db.operation.name` instead.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.operation.name`.\n */\nexport const ATTR_DB_OPERATION = 'db.operation' as const;\n\n/**\n * Deprecated, use `db.system.name` instead.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.system.name`.\n */\nexport const ATTR_DB_SYSTEM = 'db.system' as const;\n\n/**\n * Deprecated, no replacement at this time.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Removed, no replacement at this time.\n */\nexport const ATTR_DB_USER = 'db.user' as const;\n\n/**\n * Deprecated, use `server.address` on client spans and `client.address` on server spans.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.address` on client spans and `client.address` on server spans.\n */\nexport const ATTR_NET_PEER_NAME = 'net.peer.name' as const;\n\n/**\n * Deprecated, use `server.port` on client spans and `client.port` on server spans.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.port` on client spans and `client.port` on server spans.\n */\nexport const ATTR_NET_PEER_PORT = 'net.peer.port' as const;\n"],"names":[],"mappings":";;AAgBO,MAAM,0BAAA,GAA6B;AASnC,MAAM,YAAA,GAAe;AASrB,MAAM,iBAAA,GAAoB;AAS1B,MAAM,cAAA,GAAiB;AASvB,MAAM,YAAA,GAAe;AASrB,MAAM,kBAAA,GAAqB;AAS3B,MAAM,kBAAA,GAAqB;;;;;;;;;;"}
|