@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
|
@@ -1,16 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { SpanKind } from '@opentelemetry/api';
|
|
2
|
+
import { InstrumentationBase, InstrumentationNodeModuleDefinition, isWrapped } from '@opentelemetry/instrumentation';
|
|
3
|
+
import { SDK_VERSION, startInactiveSpan, getActiveSpan, withActiveSpan, debug, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_STATUS_ERROR } from '@sentry/core';
|
|
4
|
+
import { DEBUG_BUILD } from '../../../../debug-build.js';
|
|
4
5
|
import { InstrumentationNodeModuleFile } from '../../InstrumentationNodeModuleFile.js';
|
|
5
|
-
import { ATTR_DB_QUERY_TEXT, ATTR_DB_OPERATION_NAME, ATTR_DB_SYSTEM_NAME, ATTR_SERVER_PORT, ATTR_SERVER_ADDRESS } from '@opentelemetry/semantic-conventions';
|
|
6
6
|
import { defaultDbStatementSerializer } from './redis-common.js';
|
|
7
|
-
import {
|
|
7
|
+
import { ATTR_DB_STATEMENT, DB_SYSTEM_VALUE_REDIS, ATTR_DB_SYSTEM, ATTR_NET_PEER_NAME, ATTR_NET_PEER_PORT, ATTR_DB_CONNECTION_STRING } from './semconv.js';
|
|
8
8
|
|
|
9
|
-
const PACKAGE_NAME = "@
|
|
10
|
-
const
|
|
9
|
+
const PACKAGE_NAME = "@sentry/instrumentation-redis";
|
|
10
|
+
const ORIGIN = "auto.db.otel.redis";
|
|
11
11
|
const OTEL_OPEN_SPANS = /* @__PURE__ */ Symbol("opentelemetry.instrumentation.redis.open_spans");
|
|
12
12
|
const MULTI_COMMAND_OPTIONS = /* @__PURE__ */ Symbol("opentelemetry.instrumentation.redis.multi_command_options");
|
|
13
|
-
function
|
|
13
|
+
function endSpan(span, err) {
|
|
14
|
+
if (err) {
|
|
15
|
+
span.setStatus({ code: SPAN_STATUS_ERROR, message: err.message });
|
|
16
|
+
}
|
|
17
|
+
span.end();
|
|
18
|
+
}
|
|
19
|
+
function runResponseHook(responseHook, span, commandName, commandArgs, response) {
|
|
20
|
+
if (!responseHook) {
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
responseHook(span, commandName, commandArgs, response);
|
|
25
|
+
} catch {
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
function removeCredentialsFromDBConnectionStringAttribute(url) {
|
|
14
29
|
if (typeof url !== "string" || !url) {
|
|
15
30
|
return void 0;
|
|
16
31
|
}
|
|
@@ -21,68 +36,22 @@ function removeCredentialsFromDBConnectionStringAttribute(diagLogger, url) {
|
|
|
21
36
|
u.password = "";
|
|
22
37
|
return u.href;
|
|
23
38
|
} catch (err) {
|
|
24
|
-
|
|
39
|
+
DEBUG_BUILD && debug.error("failed to sanitize redis connection url", err);
|
|
25
40
|
}
|
|
26
41
|
return void 0;
|
|
27
42
|
}
|
|
28
|
-
function getClientAttributes(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
[ATTR_DB_CONNECTION_STRING]: removeCredentialsFromDBConnectionStringAttribute(diagLogger, options?.url)
|
|
36
|
-
});
|
|
37
|
-
}
|
|
38
|
-
if (semconvStability & SemconvStability.STABLE) {
|
|
39
|
-
Object.assign(attributes, {
|
|
40
|
-
[ATTR_DB_SYSTEM_NAME]: DB_SYSTEM_NAME_VALUE_REDIS,
|
|
41
|
-
[ATTR_SERVER_ADDRESS]: options?.socket?.host,
|
|
42
|
-
[ATTR_SERVER_PORT]: options?.socket?.port
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
return attributes;
|
|
46
|
-
}
|
|
47
|
-
function endSpanV2(span, err) {
|
|
48
|
-
if (err) {
|
|
49
|
-
span.setStatus({
|
|
50
|
-
code: SpanStatusCode.ERROR,
|
|
51
|
-
message: err.message
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
span.end();
|
|
55
|
-
}
|
|
56
|
-
function getTracedCreateClient(original) {
|
|
57
|
-
return function createClientTrace() {
|
|
58
|
-
const client = original.apply(this, arguments);
|
|
59
|
-
return context.bind(context.active(), client);
|
|
60
|
-
};
|
|
61
|
-
}
|
|
62
|
-
function getTracedCreateStreamTrace(original) {
|
|
63
|
-
return function create_stream_trace() {
|
|
64
|
-
if (!Object.prototype.hasOwnProperty.call(this, "stream")) {
|
|
65
|
-
Object.defineProperty(this, "stream", {
|
|
66
|
-
get() {
|
|
67
|
-
return this._patched_redis_stream;
|
|
68
|
-
},
|
|
69
|
-
set(val) {
|
|
70
|
-
context.bind(context.active(), val);
|
|
71
|
-
this._patched_redis_stream = val;
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
return original.apply(this, arguments);
|
|
43
|
+
function getClientAttributes(options) {
|
|
44
|
+
return {
|
|
45
|
+
[ATTR_DB_SYSTEM]: DB_SYSTEM_VALUE_REDIS,
|
|
46
|
+
[ATTR_NET_PEER_NAME]: options?.socket?.host,
|
|
47
|
+
[ATTR_NET_PEER_PORT]: options?.socket?.port,
|
|
48
|
+
[ATTR_DB_CONNECTION_STRING]: removeCredentialsFromDBConnectionStringAttribute(options?.url),
|
|
49
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN
|
|
76
50
|
};
|
|
77
51
|
}
|
|
78
52
|
const _RedisInstrumentationV2_V3 = class _RedisInstrumentationV2_V3 extends InstrumentationBase {
|
|
79
53
|
constructor(config = {}) {
|
|
80
|
-
super(PACKAGE_NAME,
|
|
81
|
-
this._semconvStability = config.semconvStability ? config.semconvStability : semconvStabilityFromStr("database", process.env["OTEL_SEMCONV_STABILITY_OPT_IN"]);
|
|
82
|
-
}
|
|
83
|
-
setConfig(config = {}) {
|
|
84
|
-
super.setConfig(config);
|
|
85
|
-
this._semconvStability = config.semconvStability ? config.semconvStability : semconvStabilityFromStr("database", process.env["OTEL_SEMCONV_STABILITY_OPT_IN"]);
|
|
54
|
+
super(PACKAGE_NAME, SDK_VERSION, config);
|
|
86
55
|
}
|
|
87
56
|
init() {
|
|
88
57
|
return [
|
|
@@ -94,21 +63,11 @@ const _RedisInstrumentationV2_V3 = class _RedisInstrumentationV2_V3 extends Inst
|
|
|
94
63
|
this._unwrap(moduleExports.RedisClient.prototype, "internal_send_command");
|
|
95
64
|
}
|
|
96
65
|
this._wrap(moduleExports.RedisClient.prototype, "internal_send_command", this._getPatchInternalSendCommand());
|
|
97
|
-
if (isWrapped(moduleExports.RedisClient.prototype["create_stream"])) {
|
|
98
|
-
this._unwrap(moduleExports.RedisClient.prototype, "create_stream");
|
|
99
|
-
}
|
|
100
|
-
this._wrap(moduleExports.RedisClient.prototype, "create_stream", this._getPatchCreateStream());
|
|
101
|
-
if (isWrapped(moduleExports.createClient)) {
|
|
102
|
-
this._unwrap(moduleExports, "createClient");
|
|
103
|
-
}
|
|
104
|
-
this._wrap(moduleExports, "createClient", this._getPatchCreateClient());
|
|
105
66
|
return moduleExports;
|
|
106
67
|
},
|
|
107
68
|
(moduleExports) => {
|
|
108
69
|
if (moduleExports === void 0) return;
|
|
109
70
|
this._unwrap(moduleExports.RedisClient.prototype, "internal_send_command");
|
|
110
|
-
this._unwrap(moduleExports.RedisClient.prototype, "create_stream");
|
|
111
|
-
this._unwrap(moduleExports, "createClient");
|
|
112
71
|
}
|
|
113
72
|
)
|
|
114
73
|
];
|
|
@@ -120,102 +79,47 @@ const _RedisInstrumentationV2_V3 = class _RedisInstrumentationV2_V3 extends Inst
|
|
|
120
79
|
if (arguments.length !== 1 || typeof cmd !== "object") {
|
|
121
80
|
return original.apply(this, arguments);
|
|
122
81
|
}
|
|
123
|
-
const
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
Object.assign(attributes, {
|
|
132
|
-
[ATTR_DB_SYSTEM]: DB_SYSTEM_VALUE_REDIS,
|
|
133
|
-
[ATTR_DB_STATEMENT]: dbStatementSerializer(cmd.command, cmd.args)
|
|
134
|
-
});
|
|
82
|
+
const attributes = {
|
|
83
|
+
[ATTR_DB_SYSTEM]: DB_SYSTEM_VALUE_REDIS,
|
|
84
|
+
[ATTR_DB_STATEMENT]: defaultDbStatementSerializer(cmd.command, cmd.args),
|
|
85
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN
|
|
86
|
+
};
|
|
87
|
+
if (this.connection_options) {
|
|
88
|
+
attributes[ATTR_NET_PEER_NAME] = this.connection_options.host;
|
|
89
|
+
attributes[ATTR_NET_PEER_PORT] = this.connection_options.port;
|
|
135
90
|
}
|
|
136
|
-
if (
|
|
137
|
-
|
|
138
|
-
[ATTR_DB_SYSTEM_NAME]: DB_SYSTEM_NAME_VALUE_REDIS,
|
|
139
|
-
[ATTR_DB_OPERATION_NAME]: cmd.command,
|
|
140
|
-
[ATTR_DB_QUERY_TEXT]: dbStatementSerializer(cmd.command, cmd.args)
|
|
141
|
-
});
|
|
91
|
+
if (this.address) {
|
|
92
|
+
attributes[ATTR_DB_CONNECTION_STRING] = `redis://${this.address}`;
|
|
142
93
|
}
|
|
143
|
-
|
|
144
|
-
|
|
94
|
+
const span = startInactiveSpan({
|
|
95
|
+
name: `${_RedisInstrumentationV2_V3.COMPONENT}-${cmd.command}`,
|
|
145
96
|
kind: SpanKind.CLIENT,
|
|
146
97
|
attributes
|
|
147
98
|
});
|
|
148
|
-
if (this.connection_options) {
|
|
149
|
-
const connectionAttributes = {};
|
|
150
|
-
if (instrumentation._semconvStability & SemconvStability.OLD) {
|
|
151
|
-
Object.assign(connectionAttributes, {
|
|
152
|
-
[ATTR_NET_PEER_NAME]: this.connection_options.host,
|
|
153
|
-
[ATTR_NET_PEER_PORT]: this.connection_options.port
|
|
154
|
-
});
|
|
155
|
-
}
|
|
156
|
-
if (instrumentation._semconvStability & SemconvStability.STABLE) {
|
|
157
|
-
Object.assign(connectionAttributes, {
|
|
158
|
-
[ATTR_SERVER_ADDRESS]: this.connection_options.host,
|
|
159
|
-
[ATTR_SERVER_PORT]: this.connection_options.port
|
|
160
|
-
});
|
|
161
|
-
}
|
|
162
|
-
span.setAttributes(connectionAttributes);
|
|
163
|
-
}
|
|
164
|
-
if (this.address && instrumentation._semconvStability & SemconvStability.OLD) {
|
|
165
|
-
span.setAttribute(ATTR_DB_CONNECTION_STRING, `redis://${this.address}`);
|
|
166
|
-
}
|
|
167
99
|
const originalCallback = arguments[0].callback;
|
|
168
100
|
if (originalCallback) {
|
|
169
|
-
const
|
|
101
|
+
const parentSpan = getActiveSpan();
|
|
170
102
|
arguments[0].callback = function callback(err, reply) {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
() => {
|
|
175
|
-
responseHook(span, cmd.command, cmd.args, reply);
|
|
176
|
-
},
|
|
177
|
-
(e) => {
|
|
178
|
-
if (e) {
|
|
179
|
-
instrumentation._diag.error("Error executing responseHook", e);
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
true
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
endSpanV2(span, err);
|
|
186
|
-
return context.with(originalContext, originalCallback, this, ...arguments);
|
|
103
|
+
runResponseHook(instrumentation.getConfig().responseHook, span, cmd.command, cmd.args, reply);
|
|
104
|
+
endSpan(span, err);
|
|
105
|
+
return withActiveSpan(parentSpan ?? null, () => originalCallback.apply(this, arguments));
|
|
187
106
|
};
|
|
188
107
|
}
|
|
189
108
|
try {
|
|
190
109
|
return original.apply(this, arguments);
|
|
191
110
|
} catch (rethrow) {
|
|
192
|
-
|
|
111
|
+
endSpan(span, rethrow);
|
|
193
112
|
throw rethrow;
|
|
194
113
|
}
|
|
195
114
|
};
|
|
196
115
|
};
|
|
197
116
|
}
|
|
198
|
-
_getPatchCreateClient() {
|
|
199
|
-
return function createClient(original) {
|
|
200
|
-
return getTracedCreateClient(original);
|
|
201
|
-
};
|
|
202
|
-
}
|
|
203
|
-
_getPatchCreateStream() {
|
|
204
|
-
return function createReadStream(original) {
|
|
205
|
-
return getTracedCreateStreamTrace(original);
|
|
206
|
-
};
|
|
207
|
-
}
|
|
208
117
|
};
|
|
209
118
|
_RedisInstrumentationV2_V3.COMPONENT = "redis";
|
|
210
119
|
let RedisInstrumentationV2_V3 = _RedisInstrumentationV2_V3;
|
|
211
120
|
const _RedisInstrumentationV4_V5 = class _RedisInstrumentationV4_V5 extends InstrumentationBase {
|
|
212
121
|
constructor(config = {}) {
|
|
213
|
-
super(PACKAGE_NAME,
|
|
214
|
-
this._semconvStability = config.semconvStability ? config.semconvStability : semconvStabilityFromStr("database", process.env["OTEL_SEMCONV_STABILITY_OPT_IN"]);
|
|
215
|
-
}
|
|
216
|
-
setConfig(config = {}) {
|
|
217
|
-
super.setConfig(config);
|
|
218
|
-
this._semconvStability = config.semconvStability ? config.semconvStability : semconvStabilityFromStr("database", process.env["OTEL_SEMCONV_STABILITY_OPT_IN"]);
|
|
122
|
+
super(PACKAGE_NAME, SDK_VERSION, config);
|
|
219
123
|
}
|
|
220
124
|
init() {
|
|
221
125
|
return [
|
|
@@ -230,7 +134,7 @@ const _RedisInstrumentationV4_V5 = class _RedisInstrumentationV4_V5 extends Inst
|
|
|
230
134
|
(moduleExports, moduleVersion) => {
|
|
231
135
|
const transformCommandArguments = moduleExports.transformCommandArguments;
|
|
232
136
|
if (!transformCommandArguments) {
|
|
233
|
-
|
|
137
|
+
DEBUG_BUILD && debug.error("internal instrumentation error, missing transformCommandArguments function");
|
|
234
138
|
return moduleExports;
|
|
235
139
|
}
|
|
236
140
|
const functionToPatch = moduleVersion?.startsWith("1.0.") ? "extendWithCommands" : "attachCommands";
|
|
@@ -257,11 +161,11 @@ const _RedisInstrumentationV4_V5 = class _RedisInstrumentationV4_V5 extends Inst
|
|
|
257
161
|
if (isWrapped(redisClientMultiCommandPrototype?.exec)) {
|
|
258
162
|
this._unwrap(redisClientMultiCommandPrototype, "exec");
|
|
259
163
|
}
|
|
260
|
-
this._wrap(redisClientMultiCommandPrototype, "exec", this._getPatchMultiCommandsExec(
|
|
164
|
+
this._wrap(redisClientMultiCommandPrototype, "exec", this._getPatchMultiCommandsExec());
|
|
261
165
|
if (isWrapped(redisClientMultiCommandPrototype?.execAsPipeline)) {
|
|
262
166
|
this._unwrap(redisClientMultiCommandPrototype, "execAsPipeline");
|
|
263
167
|
}
|
|
264
|
-
this._wrap(redisClientMultiCommandPrototype, "execAsPipeline", this._getPatchMultiCommandsExec(
|
|
168
|
+
this._wrap(redisClientMultiCommandPrototype, "execAsPipeline", this._getPatchMultiCommandsExec());
|
|
265
169
|
if (isWrapped(redisClientMultiCommandPrototype?.addCommand)) {
|
|
266
170
|
this._unwrap(redisClientMultiCommandPrototype, "addCommand");
|
|
267
171
|
}
|
|
@@ -349,26 +253,26 @@ const _RedisInstrumentationV4_V5 = class _RedisInstrumentationV4_V5 extends Inst
|
|
|
349
253
|
};
|
|
350
254
|
};
|
|
351
255
|
}
|
|
352
|
-
_getPatchMultiCommandsExec(
|
|
256
|
+
_getPatchMultiCommandsExec() {
|
|
353
257
|
const plugin = this;
|
|
354
258
|
return function execPatchWrapper(original) {
|
|
355
259
|
return function execPatch() {
|
|
356
260
|
const execRes = original.apply(this, arguments);
|
|
357
261
|
if (typeof execRes?.then !== "function") {
|
|
358
|
-
|
|
262
|
+
DEBUG_BUILD && debug.error("non-promise result when patching exec/execAsPipeline");
|
|
359
263
|
return execRes;
|
|
360
264
|
}
|
|
361
265
|
return execRes.then((redisRes) => {
|
|
362
266
|
const openSpans = this[OTEL_OPEN_SPANS];
|
|
363
|
-
plugin._endSpansWithRedisReplies(openSpans, redisRes
|
|
267
|
+
plugin._endSpansWithRedisReplies(openSpans, redisRes);
|
|
364
268
|
return redisRes;
|
|
365
269
|
}).catch((err) => {
|
|
366
270
|
const openSpans = this[OTEL_OPEN_SPANS];
|
|
367
271
|
if (!openSpans) {
|
|
368
|
-
|
|
272
|
+
DEBUG_BUILD && debug.error("cannot find open spans to end for multi/pipeline");
|
|
369
273
|
} else {
|
|
370
274
|
const replies = err.constructor.name === "MultiErrorReply" ? err.replies : new Array(openSpans.length).fill(err);
|
|
371
|
-
plugin._endSpansWithRedisReplies(openSpans, replies
|
|
275
|
+
plugin._endSpansWithRedisReplies(openSpans, replies);
|
|
372
276
|
}
|
|
373
277
|
return Promise.reject(err);
|
|
374
278
|
});
|
|
@@ -401,69 +305,44 @@ const _RedisInstrumentationV4_V5 = class _RedisInstrumentationV4_V5 extends Inst
|
|
|
401
305
|
};
|
|
402
306
|
}
|
|
403
307
|
_getPatchedClientConnect() {
|
|
404
|
-
const plugin = this;
|
|
405
308
|
return function connectWrapper(original) {
|
|
406
309
|
return function patchedConnect() {
|
|
407
|
-
const
|
|
408
|
-
const
|
|
409
|
-
|
|
410
|
-
const span = plugin.tracer.startSpan(`${_RedisInstrumentationV4_V5.COMPONENT}-connect`, {
|
|
310
|
+
const attributes = getClientAttributes(this.options);
|
|
311
|
+
const span = startInactiveSpan({
|
|
312
|
+
name: `${_RedisInstrumentationV4_V5.COMPONENT}-connect`,
|
|
411
313
|
kind: SpanKind.CLIENT,
|
|
412
314
|
attributes
|
|
413
315
|
});
|
|
414
|
-
const res =
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
});
|
|
426
|
-
span.end();
|
|
427
|
-
return Promise.reject(error);
|
|
428
|
-
});
|
|
316
|
+
const res = withActiveSpan(span, () => original.apply(this));
|
|
317
|
+
return res.then(
|
|
318
|
+
(result) => {
|
|
319
|
+
span.end();
|
|
320
|
+
return result;
|
|
321
|
+
},
|
|
322
|
+
(error) => {
|
|
323
|
+
endSpan(span, error);
|
|
324
|
+
return Promise.reject(error);
|
|
325
|
+
}
|
|
326
|
+
);
|
|
429
327
|
};
|
|
430
328
|
};
|
|
431
329
|
}
|
|
432
330
|
_traceClientCommand(origFunction, origThis, origArguments, redisCommandArguments) {
|
|
433
|
-
const hasNoParentSpan = trace.getSpan(context.active()) === void 0;
|
|
434
|
-
if (hasNoParentSpan && this.getConfig().requireParentSpan) {
|
|
435
|
-
return origFunction.apply(origThis, origArguments);
|
|
436
|
-
}
|
|
437
331
|
const clientOptions = origThis.options || origThis[MULTI_COMMAND_OPTIONS];
|
|
438
332
|
const commandName = redisCommandArguments[0];
|
|
439
333
|
const commandArgs = redisCommandArguments.slice(1);
|
|
440
|
-
const
|
|
441
|
-
const
|
|
442
|
-
if (
|
|
443
|
-
attributes[
|
|
444
|
-
}
|
|
445
|
-
try {
|
|
446
|
-
const dbStatement = dbStatementSerializer(commandName, commandArgs);
|
|
447
|
-
if (dbStatement != null) {
|
|
448
|
-
if (this._semconvStability & SemconvStability.OLD) {
|
|
449
|
-
attributes[ATTR_DB_STATEMENT] = dbStatement;
|
|
450
|
-
}
|
|
451
|
-
if (this._semconvStability & SemconvStability.STABLE) {
|
|
452
|
-
attributes[ATTR_DB_QUERY_TEXT] = dbStatement;
|
|
453
|
-
}
|
|
454
|
-
}
|
|
455
|
-
} catch (e) {
|
|
456
|
-
this._diag.error("dbStatementSerializer throw an exception", e, { commandName });
|
|
334
|
+
const attributes = getClientAttributes(clientOptions);
|
|
335
|
+
const dbStatement = defaultDbStatementSerializer(commandName, commandArgs);
|
|
336
|
+
if (dbStatement != null) {
|
|
337
|
+
attributes[ATTR_DB_STATEMENT] = dbStatement;
|
|
457
338
|
}
|
|
458
|
-
|
|
459
|
-
|
|
339
|
+
const span = startInactiveSpan({
|
|
340
|
+
name: `${_RedisInstrumentationV4_V5.COMPONENT}-${commandName}`,
|
|
460
341
|
kind: SpanKind.CLIENT,
|
|
461
342
|
attributes
|
|
462
343
|
});
|
|
463
|
-
const res =
|
|
464
|
-
|
|
465
|
-
});
|
|
466
|
-
if (typeof res?.then === "function") {
|
|
344
|
+
const res = withActiveSpan(span, () => origFunction.apply(origThis, origArguments));
|
|
345
|
+
if (res instanceof Promise) {
|
|
467
346
|
res.then(
|
|
468
347
|
(redisRes) => {
|
|
469
348
|
this._endSpanWithResponse(span, commandName, commandArgs, redisRes, void 0);
|
|
@@ -483,64 +362,46 @@ const _RedisInstrumentationV4_V5 = class _RedisInstrumentationV4_V5 extends Inst
|
|
|
483
362
|
}
|
|
484
363
|
return res;
|
|
485
364
|
}
|
|
486
|
-
_endSpansWithRedisReplies(openSpans, replies
|
|
365
|
+
_endSpansWithRedisReplies(openSpans, replies) {
|
|
487
366
|
if (!openSpans) {
|
|
488
|
-
|
|
367
|
+
DEBUG_BUILD && debug.error("cannot find open spans to end for redis multi/pipeline");
|
|
368
|
+
return;
|
|
489
369
|
}
|
|
490
370
|
if (replies.length !== openSpans.length) {
|
|
491
|
-
|
|
371
|
+
DEBUG_BUILD && debug.error("number of multi command spans does not match response from redis");
|
|
372
|
+
return;
|
|
492
373
|
}
|
|
493
|
-
const allCommands = openSpans.map((s) => s.commandName);
|
|
494
|
-
const allSameCommand = allCommands.every((cmd) => cmd === allCommands[0]);
|
|
495
|
-
const operationName = allSameCommand ? (isPipeline ? "PIPELINE " : "MULTI ") + allCommands[0] : isPipeline ? "PIPELINE" : "MULTI";
|
|
496
374
|
for (let i = 0; i < openSpans.length; i++) {
|
|
497
|
-
const { span, commandArgs } = openSpans[i];
|
|
375
|
+
const { span, commandName, commandArgs } = openSpans[i];
|
|
498
376
|
const currCommandRes = replies[i];
|
|
499
377
|
const [res, err] = currCommandRes instanceof Error ? [null, currCommandRes] : [currCommandRes, void 0];
|
|
500
|
-
|
|
501
|
-
span.setAttribute(ATTR_DB_OPERATION_NAME, operationName);
|
|
502
|
-
}
|
|
503
|
-
this._endSpanWithResponse(span, allCommands[i], commandArgs, res, err);
|
|
378
|
+
this._endSpanWithResponse(span, commandName, commandArgs, res, err);
|
|
504
379
|
}
|
|
505
380
|
}
|
|
506
381
|
_endSpanWithResponse(span, commandName, commandArgs, response, error) {
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
try {
|
|
510
|
-
responseHook(span, commandName, commandArgs, response);
|
|
511
|
-
} catch (err) {
|
|
512
|
-
this._diag.error("responseHook throw an exception", err);
|
|
513
|
-
}
|
|
382
|
+
if (!error) {
|
|
383
|
+
runResponseHook(this.getConfig().responseHook, span, commandName, commandArgs, response);
|
|
514
384
|
}
|
|
515
|
-
|
|
516
|
-
span.recordException(error);
|
|
517
|
-
span.setStatus({ code: SpanStatusCode.ERROR, message: error?.message });
|
|
518
|
-
}
|
|
519
|
-
span.end();
|
|
385
|
+
endSpan(span, error);
|
|
520
386
|
}
|
|
521
387
|
};
|
|
522
388
|
_RedisInstrumentationV4_V5.COMPONENT = "redis";
|
|
523
389
|
let RedisInstrumentationV4_V5 = _RedisInstrumentationV4_V5;
|
|
524
|
-
const DEFAULT_CONFIG = {
|
|
525
|
-
requireParentSpan: false
|
|
526
|
-
};
|
|
527
390
|
class RedisInstrumentation extends InstrumentationBase {
|
|
528
391
|
constructor(config = {}) {
|
|
529
|
-
|
|
530
|
-
super(PACKAGE_NAME, PACKAGE_VERSION, resolvedConfig);
|
|
392
|
+
super(PACKAGE_NAME, SDK_VERSION, config);
|
|
531
393
|
this.initialized = false;
|
|
532
394
|
this.instrumentationV2_V3 = new RedisInstrumentationV2_V3(this.getConfig());
|
|
533
395
|
this.instrumentationV4_V5 = new RedisInstrumentationV4_V5(this.getConfig());
|
|
534
396
|
this.initialized = true;
|
|
535
397
|
}
|
|
536
398
|
setConfig(config = {}) {
|
|
537
|
-
|
|
538
|
-
super.setConfig(newConfig);
|
|
399
|
+
super.setConfig(config);
|
|
539
400
|
if (!this.initialized) {
|
|
540
401
|
return;
|
|
541
402
|
}
|
|
542
|
-
this.instrumentationV2_V3.setConfig(
|
|
543
|
-
this.instrumentationV4_V5.setConfig(
|
|
403
|
+
this.instrumentationV2_V3.setConfig(config);
|
|
404
|
+
this.instrumentationV4_V5.setConfig(config);
|
|
544
405
|
}
|
|
545
406
|
init() {
|
|
546
407
|
}
|