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