@depup/sentry__node 10.47.0-depup.1 → 10.67.0-depup.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/README.md +5 -4
- package/build/cjs/debug-build.js +0 -5
- package/build/cjs/debug-build.js.map +1 -1
- package/build/cjs/index.js +81 -68
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/init.js +0 -6
- package/build/cjs/init.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/growthbook.js +0 -4
- package/build/cjs/integrations/featureFlagShims/growthbook.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/launchDarkly.js +6 -18
- package/build/cjs/integrations/featureFlagShims/launchDarkly.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/openFeature.js +6 -21
- package/build/cjs/integrations/featureFlagShims/openFeature.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/statsig.js +2 -8
- package/build/cjs/integrations/featureFlagShims/statsig.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/unleash.js +2 -8
- package/build/cjs/integrations/featureFlagShims/unleash.js.map +1 -1
- package/build/cjs/integrations/fs/index.js +17 -0
- package/build/cjs/integrations/fs/index.js.map +1 -0
- package/build/cjs/integrations/fs/vendored/constants.js +138 -0
- package/build/cjs/integrations/fs/vendored/constants.js.map +1 -0
- package/build/cjs/integrations/fs/vendored/instrumentation.js +230 -0
- package/build/cjs/integrations/fs/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/fs/vendored/utils.js +31 -0
- package/build/cjs/integrations/fs/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/http.js +19 -175
- package/build/cjs/integrations/http.js.map +1 -1
- package/build/cjs/integrations/node-fetch.js +10 -94
- package/build/cjs/integrations/node-fetch.js.map +1 -1
- package/build/cjs/integrations/tracing/InstrumentationNodeModuleFile.js +15 -0
- package/build/cjs/integrations/tracing/InstrumentationNodeModuleFile.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/index.js +21 -0
- package/build/cjs/integrations/tracing/amqplib/index.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js +117 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/patches.js +185 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js +26 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/types.js +17 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/types.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/utils.js +129 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/anthropic-ai/index.js +3 -58
- package/build/cjs/integrations/tracing/anthropic-ai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js +21 -44
- package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/connect/index.js +35 -0
- package/build/cjs/integrations/tracing/connect/index.js.map +1 -0
- package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js +16 -0
- package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js +137 -0
- package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/connect/vendored/internal-types.js +8 -0
- package/build/cjs/integrations/tracing/connect/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/connect/vendored/utils.js +36 -0
- package/build/cjs/integrations/tracing/connect/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/dataloader/index.js +26 -0
- package/build/cjs/integrations/tracing/dataloader/index.js.map +1 -0
- package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js +217 -0
- package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/express.js +44 -147
- package/build/cjs/integrations/tracing/express.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/index.js +19 -234
- package/build/cjs/integrations/tracing/fastify/index.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/v3/constants.js +1 -18
- package/build/cjs/integrations/tracing/fastify/v3/constants.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js +20 -33
- package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js +78 -162
- package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/v3/utils.js +8 -79
- package/build/cjs/integrations/tracing/fastify/v3/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/firebase.js +4 -33
- package/build/cjs/integrations/tracing/firebase/firebase.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js +7 -23
- package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js +73 -215
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js +86 -210
- package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
- package/build/cjs/integrations/tracing/genericPool/index.js +21 -0
- package/build/cjs/integrations/tracing/genericPool/index.js.map +1 -0
- package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js +122 -0
- package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/google-genai/index.js +3 -58
- package/build/cjs/integrations/tracing/google-genai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/google-genai/instrumentation.js +23 -43
- package/build/cjs/integrations/tracing/google-genai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/graphql/index.js +34 -0
- package/build/cjs/integrations/tracing/graphql/index.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/enum.js +47 -0
- package/build/cjs/integrations/tracing/graphql/vendored/enum.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js +15 -0
- package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js +329 -0
- package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js +6 -0
- package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/symbols.js +8 -0
- package/build/cjs/integrations/tracing/graphql/vendored/symbols.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/utils.js +265 -0
- package/build/cjs/integrations/tracing/graphql/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/hapi/index.js +16 -91
- package/build/cjs/integrations/tracing/hapi/index.js.map +1 -1
- package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js +11 -0
- package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js +255 -0
- package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js +24 -0
- package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/hapi/vendored/utils.js +85 -0
- package/build/cjs/integrations/tracing/hapi/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/hono/constants.js +6 -7
- package/build/cjs/integrations/tracing/hono/constants.js.map +1 -1
- package/build/cjs/integrations/tracing/hono/index.js +26 -77
- package/build/cjs/integrations/tracing/hono/index.js.map +1 -1
- package/build/cjs/integrations/tracing/hono/instrumentation.js +47 -82
- package/build/cjs/integrations/tracing/hono/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/index.js +74 -83
- package/build/cjs/integrations/tracing/index.js.map +1 -1
- package/build/cjs/integrations/tracing/kafka/index.js +21 -0
- package/build/cjs/integrations/tracing/kafka/index.js.map +1 -0
- package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js +237 -0
- package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/kafka/vendored/semconv.js +22 -0
- package/build/cjs/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/kafka/vendored/utils.js +114 -0
- package/build/cjs/integrations/tracing/kafka/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/index.js +26 -0
- package/build/cjs/integrations/tracing/knex/index.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js +135 -0
- package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/vendored/semconv.js +10 -0
- package/build/cjs/integrations/tracing/knex/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/vendored/utils.js +84 -0
- package/build/cjs/integrations/tracing/knex/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/index.js +46 -0
- package/build/cjs/integrations/tracing/koa/index.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js +10 -0
- package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js +127 -0
- package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/vendored/internal-types.js +6 -0
- package/build/cjs/integrations/tracing/koa/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/vendored/types.js +10 -0
- package/build/cjs/integrations/tracing/koa/vendored/types.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/vendored/utils.js +36 -0
- package/build/cjs/integrations/tracing/koa/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/langchain/index.js +3 -96
- package/build/cjs/integrations/tracing/langchain/index.js.map +1 -1
- package/build/cjs/integrations/tracing/langchain/instrumentation.js +80 -140
- package/build/cjs/integrations/tracing/langchain/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/langgraph/index.js +3 -73
- package/build/cjs/integrations/tracing/langgraph/index.js.map +1 -1
- package/build/cjs/integrations/tracing/langgraph/instrumentation.js +76 -40
- package/build/cjs/integrations/tracing/langgraph/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/lrumemoizer/index.js +21 -0
- package/build/cjs/integrations/tracing/lrumemoizer/index.js.map +1 -0
- package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js +38 -0
- package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/index.js +21 -0
- package/build/cjs/integrations/tracing/mongo/index.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js +129 -0
- package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/vendored/patches.js +150 -0
- package/build/cjs/integrations/tracing/mongo/vendored/patches.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/vendored/utils.js +40 -0
- package/build/cjs/integrations/tracing/mongo/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose/index.js +22 -0
- package/build/cjs/integrations/tracing/mongoose/index.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js +240 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/utils.js +41 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql/index.js +21 -0
- package/build/cjs/integrations/tracing/mysql/index.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js +185 -0
- package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql/vendored/semconv.js +8 -0
- package/build/cjs/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql/vendored/utils.js +38 -0
- package/build/cjs/integrations/tracing/mysql/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/index.js +22 -0
- package/build/cjs/integrations/tracing/mysql2/index.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js +138 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js +8 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/utils.js +81 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/openai/index.js +3 -58
- package/build/cjs/integrations/tracing/openai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/openai/instrumentation.js +25 -49
- package/build/cjs/integrations/tracing/openai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/postgres/index.js +27 -0
- package/build/cjs/integrations/tracing/postgres/index.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js +11 -0
- package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js +11 -0
- package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js +225 -0
- package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/semconv.js +8 -0
- package/build/cjs/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/utils.js +151 -0
- package/build/cjs/integrations/tracing/postgres/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/postgresjs.js +77 -190
- package/build/cjs/integrations/tracing/postgresjs.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/cache.js +41 -0
- package/build/cjs/integrations/tracing/redis/cache.js.map +1 -0
- package/build/cjs/integrations/tracing/redis/index.js +50 -0
- package/build/cjs/integrations/tracing/redis/index.js.map +1 -0
- package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js +147 -0
- package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js +445 -0
- package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/redis/vendored/semconv.js +8 -0
- package/build/cjs/integrations/tracing/redis/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/tedious/index.js +21 -0
- package/build/cjs/integrations/tracing/tedious/index.js.map +1 -0
- package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js +154 -0
- package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/tedious/vendored/semconv.js +8 -0
- package/build/cjs/integrations/tracing/tedious/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/tedious/vendored/utils.js +29 -0
- package/build/cjs/integrations/tracing/tedious/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/vercelai/constants.js +1 -1
- package/build/cjs/integrations/tracing/vercelai/constants.js.map +1 -1
- package/build/cjs/integrations/tracing/vercelai/index.js +7 -53
- package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/vercelai/instrumentation.js +60 -158
- package/build/cjs/integrations/tracing/vercelai/instrumentation.js.map +1 -1
- package/build/cjs/preload.js +1 -14
- package/build/cjs/preload.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 +33 -0
- package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -0
- package/build/cjs/sdk/index.js +33 -35
- package/build/cjs/sdk/index.js.map +1 -1
- package/build/cjs/sdk/initOtel.js +74 -60
- package/build/cjs/sdk/initOtel.js.map +1 -1
- package/build/cjs/utils/redisCache.js +24 -52
- package/build/cjs/utils/redisCache.js.map +1 -1
- package/build/cjs/utils/setHttpServerSpanRouteAttribute.js +21 -0
- package/build/cjs/utils/setHttpServerSpanRouteAttribute.js.map +1 -0
- package/build/esm/debug-build.js +0 -5
- package/build/esm/debug-build.js.map +1 -1
- package/build/esm/index.js +24 -22
- package/build/esm/index.js.map +1 -1
- package/build/esm/init.js +0 -6
- package/build/esm/init.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/growthbook.js +0 -4
- package/build/esm/integrations/featureFlagShims/growthbook.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/launchDarkly.js +6 -18
- package/build/esm/integrations/featureFlagShims/launchDarkly.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/openFeature.js +6 -21
- package/build/esm/integrations/featureFlagShims/openFeature.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/statsig.js +2 -8
- package/build/esm/integrations/featureFlagShims/statsig.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/unleash.js +2 -8
- package/build/esm/integrations/featureFlagShims/unleash.js.map +1 -1
- package/build/esm/integrations/fs/index.js +15 -0
- package/build/esm/integrations/fs/index.js.map +1 -0
- package/build/esm/integrations/fs/vendored/constants.js +134 -0
- package/build/esm/integrations/fs/vendored/constants.js.map +1 -0
- package/build/esm/integrations/fs/vendored/instrumentation.js +228 -0
- package/build/esm/integrations/fs/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/fs/vendored/utils.js +28 -0
- package/build/esm/integrations/fs/vendored/utils.js.map +1 -0
- package/build/esm/integrations/http.js +22 -176
- package/build/esm/integrations/http.js.map +1 -1
- package/build/esm/integrations/node-fetch.js +12 -95
- package/build/esm/integrations/node-fetch.js.map +1 -1
- package/build/esm/integrations/tracing/InstrumentationNodeModuleFile.js +13 -0
- package/build/esm/integrations/tracing/InstrumentationNodeModuleFile.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/index.js +18 -0
- package/build/esm/integrations/tracing/amqplib/index.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js +115 -0
- package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/patches.js +177 -0
- package/build/esm/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/semconv.js +14 -0
- package/build/esm/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/types.js +15 -0
- package/build/esm/integrations/tracing/amqplib/vendored/types.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/utils.js +117 -0
- package/build/esm/integrations/tracing/amqplib/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/anthropic-ai/index.js +3 -58
- package/build/esm/integrations/tracing/anthropic-ai/index.js.map +1 -1
- package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js +21 -44
- package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/connect/index.js +31 -0
- package/build/esm/integrations/tracing/connect/index.js.map +1 -0
- package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js +13 -0
- package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/connect/vendored/instrumentation.js +135 -0
- package/build/esm/integrations/tracing/connect/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/connect/vendored/internal-types.js +6 -0
- package/build/esm/integrations/tracing/connect/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/connect/vendored/utils.js +32 -0
- package/build/esm/integrations/tracing/connect/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/dataloader/index.js +23 -0
- package/build/esm/integrations/tracing/dataloader/index.js.map +1 -0
- package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js +215 -0
- package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/express.js +45 -148
- package/build/esm/integrations/tracing/express.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/index.js +21 -235
- package/build/esm/integrations/tracing/fastify/index.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/v3/constants.js +1 -18
- package/build/esm/integrations/tracing/fastify/v3/constants.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js +17 -34
- package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/v3/instrumentation.js +74 -158
- package/build/esm/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/v3/utils.js +8 -79
- package/build/esm/integrations/tracing/fastify/v3/utils.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/firebase.js +6 -35
- package/build/esm/integrations/tracing/firebase/firebase.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js +7 -23
- package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js +72 -214
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/patches/functions.js +86 -210
- package/build/esm/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
- package/build/esm/integrations/tracing/genericPool/index.js +18 -0
- package/build/esm/integrations/tracing/genericPool/index.js.map +1 -0
- package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js +120 -0
- package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/google-genai/index.js +3 -58
- package/build/esm/integrations/tracing/google-genai/index.js.map +1 -1
- package/build/esm/integrations/tracing/google-genai/instrumentation.js +23 -43
- package/build/esm/integrations/tracing/google-genai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/graphql/index.js +31 -0
- package/build/esm/integrations/tracing/graphql/index.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/enum.js +43 -0
- package/build/esm/integrations/tracing/graphql/vendored/enum.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js +13 -0
- package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js +327 -0
- package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/internal-types.js +4 -0
- package/build/esm/integrations/tracing/graphql/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/symbols.js +5 -0
- package/build/esm/integrations/tracing/graphql/vendored/symbols.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/utils.js +257 -0
- package/build/esm/integrations/tracing/graphql/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/hapi/index.js +16 -91
- package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
- package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js +9 -0
- package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js +253 -0
- package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/hapi/vendored/internal-types.js +19 -0
- package/build/esm/integrations/tracing/hapi/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/hapi/vendored/utils.js +76 -0
- package/build/esm/integrations/tracing/hapi/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/hono/constants.js +6 -7
- package/build/esm/integrations/tracing/hono/constants.js.map +1 -1
- package/build/esm/integrations/tracing/hono/index.js +22 -73
- package/build/esm/integrations/tracing/hono/index.js.map +1 -1
- package/build/esm/integrations/tracing/hono/instrumentation.js +47 -82
- package/build/esm/integrations/tracing/hono/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/index.js +20 -29
- package/build/esm/integrations/tracing/index.js.map +1 -1
- package/build/esm/integrations/tracing/kafka/index.js +18 -0
- package/build/esm/integrations/tracing/kafka/index.js.map +1 -0
- package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js +235 -0
- package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/kafka/vendored/semconv.js +12 -0
- package/build/esm/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/kafka/vendored/utils.js +108 -0
- package/build/esm/integrations/tracing/kafka/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/knex/index.js +23 -0
- package/build/esm/integrations/tracing/knex/index.js.map +1 -0
- package/build/esm/integrations/tracing/knex/vendored/instrumentation.js +133 -0
- package/build/esm/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/knex/vendored/semconv.js +6 -0
- package/build/esm/integrations/tracing/knex/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/knex/vendored/utils.js +75 -0
- package/build/esm/integrations/tracing/knex/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/koa/index.js +42 -0
- package/build/esm/integrations/tracing/koa/index.js.map +1 -0
- package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js +8 -0
- package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/koa/vendored/instrumentation.js +125 -0
- package/build/esm/integrations/tracing/koa/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/koa/vendored/internal-types.js +4 -0
- package/build/esm/integrations/tracing/koa/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/koa/vendored/types.js +8 -0
- package/build/esm/integrations/tracing/koa/vendored/types.js.map +1 -0
- package/build/esm/integrations/tracing/koa/vendored/utils.js +33 -0
- package/build/esm/integrations/tracing/koa/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/langchain/index.js +3 -96
- package/build/esm/integrations/tracing/langchain/index.js.map +1 -1
- package/build/esm/integrations/tracing/langchain/instrumentation.js +80 -140
- package/build/esm/integrations/tracing/langchain/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/langgraph/index.js +3 -73
- package/build/esm/integrations/tracing/langgraph/index.js.map +1 -1
- package/build/esm/integrations/tracing/langgraph/instrumentation.js +78 -42
- package/build/esm/integrations/tracing/langgraph/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/lrumemoizer/index.js +18 -0
- package/build/esm/integrations/tracing/lrumemoizer/index.js.map +1 -0
- package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js +36 -0
- package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/index.js +18 -0
- package/build/esm/integrations/tracing/mongo/index.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js +127 -0
- package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/vendored/patches.js +142 -0
- package/build/esm/integrations/tracing/mongo/vendored/patches.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/vendored/utils.js +34 -0
- package/build/esm/integrations/tracing/mongo/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose/index.js +19 -0
- package/build/esm/integrations/tracing/mongoose/index.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js +236 -0
- package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose/vendored/utils.js +38 -0
- package/build/esm/integrations/tracing/mongoose/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/mysql/index.js +18 -0
- package/build/esm/integrations/tracing/mysql/index.js.map +1 -0
- package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js +183 -0
- package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mysql/vendored/semconv.js +5 -0
- package/build/esm/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/mysql/vendored/utils.js +33 -0
- package/build/esm/integrations/tracing/mysql/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/index.js +19 -0
- package/build/esm/integrations/tracing/mysql2/index.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js +136 -0
- package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/vendored/semconv.js +5 -0
- package/build/esm/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/vendored/utils.js +75 -0
- package/build/esm/integrations/tracing/mysql2/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/openai/index.js +3 -58
- package/build/esm/integrations/tracing/openai/index.js.map +1 -1
- package/build/esm/integrations/tracing/openai/instrumentation.js +25 -49
- package/build/esm/integrations/tracing/openai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/postgres/index.js +24 -0
- package/build/esm/integrations/tracing/postgres/index.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js +9 -0
- package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js +9 -0
- package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js +223 -0
- package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/semconv.js +5 -0
- package/build/esm/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/utils.js +136 -0
- package/build/esm/integrations/tracing/postgres/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/postgresjs.js +77 -190
- package/build/esm/integrations/tracing/postgresjs.js.map +1 -1
- package/build/esm/integrations/tracing/redis/cache.js +38 -0
- package/build/esm/integrations/tracing/redis/cache.js.map +1 -0
- package/build/esm/integrations/tracing/redis/index.js +43 -0
- package/build/esm/integrations/tracing/redis/index.js.map +1 -0
- package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js +145 -0
- package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js +443 -0
- package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/redis/vendored/semconv.js +5 -0
- package/build/esm/integrations/tracing/redis/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/tedious/index.js +18 -0
- package/build/esm/integrations/tracing/tedious/index.js.map +1 -0
- package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js +152 -0
- package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/tedious/vendored/semconv.js +5 -0
- package/build/esm/integrations/tracing/tedious/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/tedious/vendored/utils.js +26 -0
- package/build/esm/integrations/tracing/tedious/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/vercelai/constants.js +1 -1
- package/build/esm/integrations/tracing/vercelai/constants.js.map +1 -1
- package/build/esm/integrations/tracing/vercelai/index.js +8 -54
- package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/esm/integrations/tracing/vercelai/instrumentation.js +60 -158
- package/build/esm/integrations/tracing/vercelai/instrumentation.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/preload.js +1 -14
- package/build/esm/preload.js.map +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 +30 -0
- package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -0
- package/build/esm/sdk/index.js +33 -36
- package/build/esm/sdk/index.js.map +1 -1
- package/build/esm/sdk/initOtel.js +77 -63
- package/build/esm/sdk/initOtel.js.map +1 -1
- package/build/esm/utils/redisCache.js +24 -52
- package/build/esm/utils/redisCache.js.map +1 -1
- package/build/esm/utils/setHttpServerSpanRouteAttribute.js +19 -0
- package/build/esm/utils/setHttpServerSpanRouteAttribute.js.map +1 -0
- package/build/import-hook.mjs +6 -0
- package/build/types/index.d.ts +6 -4
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
- package/build/types/integrations/featureFlagShims/launchDarkly.d.ts.map +1 -1
- package/build/types/integrations/featureFlagShims/openFeature.d.ts +3 -1
- package/build/types/integrations/featureFlagShims/openFeature.d.ts.map +1 -1
- package/build/types/integrations/featureFlagShims/statsig.d.ts +3 -1
- package/build/types/integrations/featureFlagShims/statsig.d.ts.map +1 -1
- package/build/types/integrations/featureFlagShims/unleash.d.ts +3 -1
- package/build/types/integrations/featureFlagShims/unleash.d.ts.map +1 -1
- package/build/types/integrations/fs/index.d.ts +14 -0
- package/build/types/integrations/fs/index.d.ts.map +1 -0
- package/build/types/integrations/fs/vendored/constants.d.ts +5 -0
- package/build/types/integrations/fs/vendored/constants.d.ts.map +1 -0
- package/build/types/integrations/fs/vendored/instrumentation.d.ts +3 -0
- package/build/types/integrations/fs/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/fs/vendored/types.d.ts +23 -0
- package/build/types/integrations/fs/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/fs/vendored/utils.d.ts +10 -0
- package/build/types/integrations/fs/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/http.d.ts +12 -17
- package/build/types/integrations/http.d.ts.map +1 -1
- package/build/types/integrations/node-fetch.d.ts +8 -35
- package/build/types/integrations/node-fetch.d.ts.map +1 -1
- package/build/types/integrations/tracing/InstrumentationNodeModuleFile.d.ts +9 -0
- package/build/types/integrations/tracing/InstrumentationNodeModuleFile.d.ts.map +1 -0
- package/build/types/integrations/tracing/{amqplib.d.ts → amqplib/index.d.ts} +5 -3
- package/build/types/integrations/tracing/amqplib/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +44 -0
- package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
- package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
- package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts +23 -0
- package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/types.d.ts +49 -0
- package/build/types/integrations/tracing/amqplib/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts +42 -0
- package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/anthropic-ai/index.d.ts +11 -8
- package/build/types/integrations/tracing/anthropic-ai/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/{connect.d.ts → connect/index.d.ts} +5 -3
- package/build/types/integrations/tracing/connect/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +9 -0
- package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts +18 -0
- package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts +31 -0
- package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/connect/vendored/utils.d.ts +5 -0
- package/build/types/integrations/tracing/connect/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{dataloader.d.ts → dataloader/index.d.ts} +5 -3
- package/build/types/integrations/tracing/dataloader/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts +18 -0
- package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/dataloader/vendored/types.d.ts +22 -0
- package/build/types/integrations/tracing/dataloader/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/express.d.ts +15 -68
- package/build/types/integrations/tracing/express.d.ts.map +1 -1
- package/build/types/integrations/tracing/fastify/index.d.ts +6 -6
- package/build/types/integrations/tracing/fastify/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/fastify/v3/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/firebase.d.ts +3 -1
- package/build/types/integrations/tracing/firebase/firebase.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
- package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
- package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
- package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/otel/types.d.ts +0 -20
- package/build/types/integrations/tracing/firebase/otel/types.d.ts.map +1 -1
- package/build/types/integrations/tracing/{genericPool.d.ts → genericPool/index.d.ts} +5 -3
- package/build/types/integrations/tracing/genericPool/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +5 -0
- package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts +11 -0
- package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/google-genai/index.d.ts +11 -8
- package/build/types/integrations/tracing/google-genai/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/google-genai/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +5 -3
- package/build/types/integrations/tracing/graphql/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/enum.d.ts +38 -0
- package/build/types/integrations/tracing/graphql/vendored/enum.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +10 -0
- package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts +2 -0
- package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts +25 -0
- package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts +63 -0
- package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts +3 -0
- package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/types.d.ts +33 -0
- package/build/types/integrations/tracing/graphql/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/utils.d.ts +14 -0
- package/build/types/integrations/tracing/graphql/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/index.d.ts +4 -2
- package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +6 -0
- package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts +70 -0
- package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts +72 -0
- package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts +32 -0
- package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/vendored/utils.d.ts +18 -0
- package/build/types/integrations/tracing/hapi/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/hono/index.d.ts +9 -1
- package/build/types/integrations/tracing/hono/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +5 -3
- package/build/types/integrations/tracing/kafka/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts +15 -0
- package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +79 -0
- package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts +54 -0
- package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts.map +1 -0
- 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.d.ts → knex/index.d.ts} +5 -3
- package/build/types/integrations/tracing/knex/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts +12 -0
- package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/semconv.d.ts +7 -0
- package/build/types/integrations/tracing/knex/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/utils.d.ts +9 -0
- package/build/types/integrations/tracing/knex/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{koa.d.ts → koa/index.d.ts} +5 -3
- package/build/types/integrations/tracing/koa/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +5 -0
- package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts +32 -0
- package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts +34 -0
- package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/koa/vendored/types.d.ts +13 -0
- package/build/types/integrations/tracing/koa/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/koa/vendored/utils.d.ts +15 -0
- package/build/types/integrations/tracing/koa/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/langchain/index.d.ts +16 -12
- package/build/types/integrations/tracing/langchain/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/langchain/instrumentation.d.ts +10 -1
- package/build/types/integrations/tracing/langchain/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/langgraph/index.d.ts +11 -8
- package/build/types/integrations/tracing/langgraph/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/langgraph/instrumentation.d.ts +1 -1
- package/build/types/integrations/tracing/langgraph/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/{lrumemoizer.d.ts → lrumemoizer/index.d.ts} +5 -3
- package/build/types/integrations/tracing/lrumemoizer/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
- package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts.map +1 -0
- package/build/{types-ts3.8/integrations/tracing/mongo.d.ts → types/integrations/tracing/mongo/index.d.ts} +22 -24
- package/build/types/integrations/tracing/mongo/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts +11 -0
- package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts +62 -0
- package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts.map +1 -0
- 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/utils.d.ts +15 -0
- package/build/types/integrations/tracing/mongo/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{mongoose.d.ts → mongoose/index.d.ts} +5 -3
- package/build/types/integrations/tracing/mongoose/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +33 -0
- package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts +18 -0
- package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts +4 -0
- package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +5 -3
- package/build/types/integrations/tracing/mysql/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts +14 -0
- package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts +78 -0
- package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts +19 -0
- package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/utils.d.ts +22 -0
- package/build/types/integrations/tracing/mysql/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +5 -3
- package/build/types/integrations/tracing/mysql2/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts +9 -0
- package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +39 -0
- package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts +3 -0
- package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts +25 -0
- package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/openai/index.d.ts +11 -8
- package/build/types/integrations/tracing/openai/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +5 -3
- package/build/types/integrations/tracing/postgres/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +6 -0
- package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +6 -0
- package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts +12 -0
- package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts +33 -0
- package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +20 -0
- package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts +54 -0
- package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts +13 -0
- package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/types.d.ts +11 -0
- package/build/types/integrations/tracing/postgres/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/utils.d.ts +56 -0
- package/build/types/integrations/tracing/postgres/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgresjs.d.ts +3 -1
- package/build/types/integrations/tracing/postgresjs.d.ts.map +1 -1
- package/build/types/integrations/tracing/redis/cache.d.ts +22 -0
- package/build/types/integrations/tracing/redis/cache.d.ts.map +1 -0
- package/build/types/integrations/tracing/redis/index.d.ts +28 -0
- package/build/types/integrations/tracing/redis/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +10 -0
- package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts +16 -0
- package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/redis/vendored/semconv.d.ts +4 -0
- package/build/types/integrations/tracing/redis/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/redis/vendored/types.d.ts +24 -0
- package/build/types/integrations/tracing/redis/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +5 -3
- package/build/types/integrations/tracing/tedious/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts +11 -0
- package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts +19 -0
- package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts +21 -0
- package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/tedious/vendored/utils.d.ts +9 -0
- package/build/types/integrations/tracing/tedious/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/vercelai/constants.d.ts +1 -1
- package/build/types/integrations/tracing/vercelai/constants.d.ts.map +1 -1
- package/build/types/integrations/tracing/vercelai/index.d.ts +3 -2
- package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/vercelai/instrumentation.d.ts +2 -2
- package/build/types/integrations/tracing/vercelai/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/vercelai/types.d.ts +11 -4
- package/build/types/integrations/tracing/vercelai/types.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 +37 -0
- package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts.map +1 -0
- package/build/types/sdk/index.d.ts +18 -0
- package/build/types/sdk/index.d.ts.map +1 -1
- package/build/types/sdk/initOtel.d.ts +2 -3
- package/build/types/sdk/initOtel.d.ts.map +1 -1
- package/build/types/utils/redisCache.d.ts +1 -1
- package/build/types/utils/redisCache.d.ts.map +1 -1
- package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts +9 -0
- package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts.map +1 -0
- package/build/types-ts3.8/index.d.ts +6 -4
- package/build/types-ts3.8/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
- package/build/types-ts3.8/integrations/featureFlagShims/openFeature.d.ts +3 -1
- package/build/types-ts3.8/integrations/featureFlagShims/statsig.d.ts +3 -1
- package/build/types-ts3.8/integrations/featureFlagShims/unleash.d.ts +3 -1
- package/build/types-ts3.8/integrations/fs/index.d.ts +14 -0
- package/build/types-ts3.8/integrations/fs/vendored/constants.d.ts +5 -0
- package/build/types-ts3.8/integrations/fs/vendored/instrumentation.d.ts +3 -0
- package/build/types-ts3.8/integrations/fs/vendored/types.d.ts +23 -0
- package/build/types-ts3.8/integrations/fs/vendored/utils.d.ts +15 -0
- package/build/types-ts3.8/integrations/http.d.ts +12 -17
- package/build/types-ts3.8/integrations/node-fetch.d.ts +8 -35
- package/build/types-ts3.8/integrations/tracing/InstrumentationNodeModuleFile.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing/{amqplib.d.ts → amqplib/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +44 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv.d.ts +23 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/types.d.ts +49 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/utils.d.ts +42 -0
- package/build/types-ts3.8/integrations/tracing/anthropic-ai/index.d.ts +11 -8
- package/build/types-ts3.8/integrations/tracing/{connect.d.ts → connect/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing/connect/vendored/instrumentation.d.ts +18 -0
- package/build/types-ts3.8/integrations/tracing/connect/vendored/internal-types.d.ts +36 -0
- package/build/types-ts3.8/integrations/tracing/connect/vendored/utils.d.ts +5 -0
- package/build/types-ts3.8/integrations/tracing/{dataloader.d.ts → dataloader/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/dataloader/vendored/instrumentation.d.ts +18 -0
- package/build/types-ts3.8/integrations/tracing/dataloader/vendored/types.d.ts +22 -0
- package/build/types-ts3.8/integrations/tracing/express.d.ts +15 -68
- package/build/types-ts3.8/integrations/tracing/fastify/index.d.ts +6 -6
- package/build/types-ts3.8/integrations/tracing/firebase/firebase.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
- package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
- package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
- package/build/types-ts3.8/integrations/tracing/firebase/otel/types.d.ts +0 -20
- package/build/types-ts3.8/integrations/tracing/{genericPool.d.ts → genericPool/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +5 -0
- package/build/types-ts3.8/integrations/tracing/genericPool/vendored/instrumentation.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing/google-genai/index.d.ts +11 -8
- package/build/types-ts3.8/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/enum.d.ts +38 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +10 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/graphql-types.d.ts +2 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/instrumentation.d.ts +25 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/internal-types.d.ts +63 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/symbols.d.ts +3 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/types.d.ts +33 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/utils.d.ts +14 -0
- package/build/types-ts3.8/integrations/tracing/hapi/index.d.ts +4 -2
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +6 -0
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/hapi-types.d.ts +70 -0
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/instrumentation.d.ts +72 -0
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/internal-types.d.ts +32 -0
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/utils.d.ts +18 -0
- package/build/types-ts3.8/integrations/tracing/hono/index.d.ts +9 -1
- package/build/types-ts3.8/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/instrumentation.d.ts +15 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +79 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/semconv.d.ts +54 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/utils.d.ts +29 -0
- package/build/types-ts3.8/integrations/tracing/{knex.d.ts → knex/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/knex/vendored/instrumentation.d.ts +12 -0
- package/build/types-ts3.8/integrations/tracing/knex/vendored/semconv.d.ts +7 -0
- package/build/types-ts3.8/integrations/tracing/knex/vendored/utils.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing/{koa.d.ts → koa/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +5 -0
- package/build/types-ts3.8/integrations/tracing/koa/vendored/instrumentation.d.ts +32 -0
- package/build/types-ts3.8/integrations/tracing/koa/vendored/internal-types.d.ts +34 -0
- package/build/types-ts3.8/integrations/tracing/koa/vendored/types.d.ts +13 -0
- package/build/types-ts3.8/integrations/tracing/koa/vendored/utils.d.ts +15 -0
- package/build/types-ts3.8/integrations/tracing/langchain/index.d.ts +16 -12
- package/build/types-ts3.8/integrations/tracing/langchain/instrumentation.d.ts +10 -1
- package/build/types-ts3.8/integrations/tracing/langgraph/index.d.ts +11 -8
- package/build/types-ts3.8/integrations/tracing/langgraph/instrumentation.d.ts +1 -1
- package/build/types-ts3.8/integrations/tracing/{lrumemoizer.d.ts → lrumemoizer/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
- package/build/{types/integrations/tracing/mongo.d.ts → types-ts3.8/integrations/tracing/mongo/index.d.ts} +22 -24
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/instrumentation.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/internal-types.d.ts +62 -0
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/patches.d.ts +15 -0
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/utils.d.ts +15 -0
- package/build/types-ts3.8/integrations/tracing/{mongoose.d.ts → mongoose/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +33 -0
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose.d.ts +18 -0
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/utils.d.ts +4 -0
- package/build/types-ts3.8/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/instrumentation.d.ts +14 -0
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/mysql-types.d.ts +78 -0
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/semconv.d.ts +19 -0
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/utils.d.ts +22 -0
- package/build/types-ts3.8/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/instrumentation.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +39 -0
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/semconv.d.ts +3 -0
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/utils.d.ts +25 -0
- package/build/types-ts3.8/integrations/tracing/openai/index.d.ts +11 -8
- package/build/types-ts3.8/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +6 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +6 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/instrumentation.d.ts +12 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/internal-types.d.ts +33 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +20 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-types.d.ts +54 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/semconv.d.ts +13 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/types.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/utils.d.ts +56 -0
- package/build/types-ts3.8/integrations/tracing/postgresjs.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/redis/cache.d.ts +22 -0
- package/build/types-ts3.8/integrations/tracing/redis/index.d.ts +28 -0
- package/build/types-ts3.8/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +10 -0
- package/build/types-ts3.8/integrations/tracing/redis/vendored/redis-instrumentation.d.ts +16 -0
- package/build/types-ts3.8/integrations/tracing/redis/vendored/semconv.d.ts +4 -0
- package/build/types-ts3.8/integrations/tracing/redis/vendored/types.d.ts +24 -0
- package/build/types-ts3.8/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/instrumentation.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/semconv.d.ts +19 -0
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/tedious-types.d.ts +21 -0
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/utils.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing/vercelai/constants.d.ts +1 -1
- package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +3 -2
- package/build/types-ts3.8/integrations/tracing/vercelai/instrumentation.d.ts +2 -2
- package/build/types-ts3.8/integrations/tracing/vercelai/types.d.ts +11 -4
- package/build/types-ts3.8/sdk/diagnosticsChannelInjection.d.ts +41 -0
- package/build/types-ts3.8/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +37 -0
- package/build/types-ts3.8/sdk/index.d.ts +18 -0
- package/build/types-ts3.8/sdk/initOtel.d.ts +3 -4
- package/build/types-ts3.8/utils/redisCache.d.ts +1 -1
- package/build/types-ts3.8/utils/setHttpServerSpanRouteAttribute.d.ts +9 -0
- package/changes.json +9 -5
- package/package.json +33 -41
- package/build/cjs/integrations/fs.js +0 -142
- package/build/cjs/integrations/fs.js.map +0 -1
- package/build/cjs/integrations/tracing/amqplib.js +0 -47
- package/build/cjs/integrations/tracing/amqplib.js.map +0 -1
- package/build/cjs/integrations/tracing/connect.js +0 -110
- package/build/cjs/integrations/tracing/connect.js.map +0 -1
- package/build/cjs/integrations/tracing/dataloader.js +0 -72
- package/build/cjs/integrations/tracing/dataloader.js.map +0 -1
- package/build/cjs/integrations/tracing/genericPool.js +0 -59
- package/build/cjs/integrations/tracing/genericPool.js.map +0 -1
- package/build/cjs/integrations/tracing/graphql.js +0 -127
- package/build/cjs/integrations/tracing/graphql.js.map +0 -1
- package/build/cjs/integrations/tracing/kafka.js +0 -48
- package/build/cjs/integrations/tracing/kafka.js.map +0 -1
- package/build/cjs/integrations/tracing/knex.js +0 -57
- package/build/cjs/integrations/tracing/knex.js.map +0 -1
- package/build/cjs/integrations/tracing/koa.js +0 -138
- package/build/cjs/integrations/tracing/koa.js.map +0 -1
- package/build/cjs/integrations/tracing/lrumemoizer.js +0 -37
- package/build/cjs/integrations/tracing/lrumemoizer.js.map +0 -1
- package/build/cjs/integrations/tracing/mongo.js +0 -93
- package/build/cjs/integrations/tracing/mongo.js.map +0 -1
- package/build/cjs/integrations/tracing/mongoose.js +0 -46
- package/build/cjs/integrations/tracing/mongoose.js.map +0 -1
- package/build/cjs/integrations/tracing/mysql.js +0 -38
- package/build/cjs/integrations/tracing/mysql.js.map +0 -1
- package/build/cjs/integrations/tracing/mysql2.js +0 -46
- package/build/cjs/integrations/tracing/mysql2.js.map +0 -1
- package/build/cjs/integrations/tracing/postgres.js +0 -48
- package/build/cjs/integrations/tracing/postgres.js.map +0 -1
- package/build/cjs/integrations/tracing/prisma.js +0 -203
- package/build/cjs/integrations/tracing/prisma.js.map +0 -1
- package/build/cjs/integrations/tracing/redis.js +0 -121
- package/build/cjs/integrations/tracing/redis.js.map +0 -1
- package/build/cjs/integrations/tracing/tedious.js +0 -67
- package/build/cjs/integrations/tracing/tedious.js.map +0 -1
- package/build/esm/integrations/fs.js +0 -140
- package/build/esm/integrations/fs.js.map +0 -1
- package/build/esm/integrations/tracing/amqplib.js +0 -44
- package/build/esm/integrations/tracing/amqplib.js.map +0 -1
- package/build/esm/integrations/tracing/connect.js +0 -106
- package/build/esm/integrations/tracing/connect.js.map +0 -1
- package/build/esm/integrations/tracing/dataloader.js +0 -69
- package/build/esm/integrations/tracing/dataloader.js.map +0 -1
- package/build/esm/integrations/tracing/genericPool.js +0 -56
- package/build/esm/integrations/tracing/genericPool.js.map +0 -1
- package/build/esm/integrations/tracing/graphql.js +0 -124
- package/build/esm/integrations/tracing/graphql.js.map +0 -1
- package/build/esm/integrations/tracing/kafka.js +0 -45
- package/build/esm/integrations/tracing/kafka.js.map +0 -1
- package/build/esm/integrations/tracing/knex.js +0 -54
- package/build/esm/integrations/tracing/knex.js.map +0 -1
- package/build/esm/integrations/tracing/koa.js +0 -134
- package/build/esm/integrations/tracing/koa.js.map +0 -1
- package/build/esm/integrations/tracing/lrumemoizer.js +0 -34
- package/build/esm/integrations/tracing/lrumemoizer.js.map +0 -1
- package/build/esm/integrations/tracing/mongo.js +0 -89
- package/build/esm/integrations/tracing/mongo.js.map +0 -1
- package/build/esm/integrations/tracing/mongoose.js +0 -43
- package/build/esm/integrations/tracing/mongoose.js.map +0 -1
- package/build/esm/integrations/tracing/mysql.js +0 -35
- package/build/esm/integrations/tracing/mysql.js.map +0 -1
- package/build/esm/integrations/tracing/mysql2.js +0 -43
- package/build/esm/integrations/tracing/mysql2.js.map +0 -1
- package/build/esm/integrations/tracing/postgres.js +0 -45
- package/build/esm/integrations/tracing/postgres.js.map +0 -1
- package/build/esm/integrations/tracing/prisma.js +0 -200
- package/build/esm/integrations/tracing/prisma.js.map +0 -1
- package/build/esm/integrations/tracing/redis.js +0 -117
- package/build/esm/integrations/tracing/redis.js.map +0 -1
- package/build/esm/integrations/tracing/tedious.js +0 -64
- package/build/esm/integrations/tracing/tedious.js.map +0 -1
- package/build/types/integrations/fs.d.ts +0 -24
- package/build/types/integrations/fs.d.ts.map +0 -1
- package/build/types/integrations/tracing/amqplib.d.ts.map +0 -1
- package/build/types/integrations/tracing/connect.d.ts.map +0 -1
- package/build/types/integrations/tracing/dataloader.d.ts.map +0 -1
- package/build/types/integrations/tracing/genericPool.d.ts.map +0 -1
- package/build/types/integrations/tracing/graphql.d.ts.map +0 -1
- package/build/types/integrations/tracing/kafka.d.ts.map +0 -1
- package/build/types/integrations/tracing/knex.d.ts.map +0 -1
- package/build/types/integrations/tracing/koa.d.ts.map +0 -1
- package/build/types/integrations/tracing/lrumemoizer.d.ts.map +0 -1
- package/build/types/integrations/tracing/mongo.d.ts.map +0 -1
- package/build/types/integrations/tracing/mongoose.d.ts.map +0 -1
- package/build/types/integrations/tracing/mysql.d.ts.map +0 -1
- package/build/types/integrations/tracing/mysql2.d.ts.map +0 -1
- package/build/types/integrations/tracing/postgres.d.ts.map +0 -1
- package/build/types/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts +0 -38
- package/build/types/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts.map +0 -1
- package/build/types/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts +0 -31
- package/build/types/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts.map +0 -1
- package/build/types/integrations/tracing/prisma.d.ts +0 -50
- package/build/types/integrations/tracing/prisma.d.ts.map +0 -1
- package/build/types/integrations/tracing/redis.d.ts +0 -41
- package/build/types/integrations/tracing/redis.d.ts.map +0 -1
- package/build/types/integrations/tracing/tedious.d.ts.map +0 -1
- package/build/types-ts3.8/integrations/fs.d.ts +0 -24
- package/build/types-ts3.8/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts +0 -44
- package/build/types-ts3.8/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts +0 -34
- package/build/types-ts3.8/integrations/tracing/prisma.d.ts +0 -50
- package/build/types-ts3.8/integrations/tracing/redis.d.ts +0 -41
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { defineIntegration, extendIntegration } from '@sentry/core';
|
|
2
|
+
import * as dc from 'node:diagnostics_channel';
|
|
3
|
+
import { redisIntegration as redisIntegration$1 } from '@sentry/server-utils';
|
|
4
|
+
import { generateInstrumentOnce } from '@sentry/node-core';
|
|
5
|
+
import { isDiagnosticsChannelInjectionEnabled } from '../../../sdk/diagnosticsChannelInjection.js';
|
|
6
|
+
import { cacheResponseHook, setRedisOptions } from './cache.js';
|
|
7
|
+
export { _redisOptions } from './cache.js';
|
|
8
|
+
import { IORedisInstrumentation } from './vendored/ioredis-instrumentation.js';
|
|
9
|
+
import { RedisInstrumentation } from './vendored/redis-instrumentation.js';
|
|
10
|
+
|
|
11
|
+
const INTEGRATION_NAME = "Redis";
|
|
12
|
+
const instrumentIORedis = generateInstrumentOnce(`${INTEGRATION_NAME}.IORedis`, () => {
|
|
13
|
+
return new IORedisInstrumentation({
|
|
14
|
+
responseHook: cacheResponseHook
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
const instrumentRedisModule = generateInstrumentOnce(`${INTEGRATION_NAME}.Redis`, () => {
|
|
18
|
+
return new RedisInstrumentation({
|
|
19
|
+
responseHook: cacheResponseHook
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
const instrumentRedis = Object.assign(
|
|
23
|
+
() => {
|
|
24
|
+
if (!isDiagnosticsChannelInjectionEnabled() || !dc.tracingChannel) {
|
|
25
|
+
instrumentIORedis();
|
|
26
|
+
instrumentRedisModule();
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{ id: INTEGRATION_NAME }
|
|
30
|
+
);
|
|
31
|
+
const _redisIntegration = ((options = {}) => {
|
|
32
|
+
return extendIntegration(redisIntegration$1({ responseHook: cacheResponseHook }), {
|
|
33
|
+
name: INTEGRATION_NAME,
|
|
34
|
+
setupOnce() {
|
|
35
|
+
setRedisOptions(options);
|
|
36
|
+
instrumentRedis();
|
|
37
|
+
}
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
const redisIntegration = defineIntegration(_redisIntegration);
|
|
41
|
+
|
|
42
|
+
export { cacheResponseHook, instrumentRedis, redisIntegration };
|
|
43
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/redis/index.ts"],"sourcesContent":["import type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration, extendIntegration } from '@sentry/core';\nimport * as dc from 'node:diagnostics_channel';\nimport { redisIntegration as redisChannelIntegration } from '@sentry/server-utils';\nimport { generateInstrumentOnce } from '@sentry/node-core';\nimport { isDiagnosticsChannelInjectionEnabled } from '../../../sdk/diagnosticsChannelInjection';\nimport { cacheResponseHook, type RedisOptions, setRedisOptions } from './cache';\nimport { IORedisInstrumentation } from './vendored/ioredis-instrumentation';\nimport { RedisInstrumentation } from './vendored/redis-instrumentation';\n\n// `cacheResponseHook`/`_redisOptions` live in `./cache` (which has no OTel\n// instrumentation imports) so the orchestrion opt-in can pull the hook without\n// dragging the OTel redis instrumentation in. Re-exported here for tests.\nexport { _redisOptions, cacheResponseHook } from './cache';\n\nconst INTEGRATION_NAME = 'Redis' as const;\n\nconst instrumentIORedis = generateInstrumentOnce(`${INTEGRATION_NAME}.IORedis`, () => {\n return new IORedisInstrumentation({\n responseHook: cacheResponseHook,\n });\n});\n\nconst instrumentRedisModule = generateInstrumentOnce(`${INTEGRATION_NAME}.Redis`, () => {\n return new RedisInstrumentation({\n responseHook: cacheResponseHook,\n });\n});\n\n/**\n * To be able to preload all Redis OTel instrumentations with just one ID\n * (\"Redis\"), all the instrumentations are generated in this one function\n */\nexport const instrumentRedis = Object.assign(\n (): void => {\n // When diagnostics-channel injection is opted in, orchestrion fully owns the older\n // ioredis (`<5.11.0`) and redis/node-redis (`<5.12.0`) ranges — commands, connect, and\n // batches — so skip both OTel monkey-patches to avoid double instrumentation. On Node\n // without `tracingChannel` (<18.19) orchestrion can't run, so keep the OTel patches there.\n if (!isDiagnosticsChannelInjectionEnabled() || !dc.tracingChannel) {\n instrumentIORedis();\n instrumentRedisModule();\n }\n\n // todo: implement them gradually\n // new LegacyRedisInstrumentation({}),\n },\n { id: INTEGRATION_NAME },\n);\n\nconst _redisIntegration = ((options: RedisOptions = {}) => {\n // The diagnostics_channel subscription (node-redis >= 5.12.0, ioredis >= 5.11.0) lives in\n // server-utils so it is shared across server runtimes; we extend it here to also run the vendored\n // OTel patchers for older client versions. `cacheResponseHook` reads options set in the extension's\n // `setupOnce` below, but it only runs at command time, by which point those options are set.\n return extendIntegration(redisChannelIntegration({ responseHook: cacheResponseHook }), {\n name: INTEGRATION_NAME,\n setupOnce() {\n setRedisOptions(options);\n instrumentRedis();\n },\n });\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [redis](https://www.npmjs.com/package/redis) and\n * [ioredis](https://www.npmjs.com/package/ioredis) libraries.\n *\n * For more information, see the [`redisIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/redis/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.redisIntegration()],\n * });\n * ```\n */\nexport const redisIntegration = defineIntegration(_redisIntegration);\n"],"names":["redisChannelIntegration"],"mappings":";;;;;;;;;;AAeA,MAAM,gBAAA,GAAmB,OAAA;AAEzB,MAAM,iBAAA,GAAoB,sBAAA,CAAuB,CAAA,EAAG,gBAAgB,YAAY,MAAM;AACpF,EAAA,OAAO,IAAI,sBAAA,CAAuB;AAAA,IAChC,YAAA,EAAc;AAAA,GACf,CAAA;AACH,CAAC,CAAA;AAED,MAAM,qBAAA,GAAwB,sBAAA,CAAuB,CAAA,EAAG,gBAAgB,UAAU,MAAM;AACtF,EAAA,OAAO,IAAI,oBAAA,CAAqB;AAAA,IAC9B,YAAA,EAAc;AAAA,GACf,CAAA;AACH,CAAC,CAAA;AAMM,MAAM,kBAAkB,MAAA,CAAO,MAAA;AAAA,EACpC,MAAY;AAKV,IAAA,IAAI,CAAC,oCAAA,EAAqC,IAAK,CAAC,GAAG,cAAA,EAAgB;AACjE,MAAA,iBAAA,EAAkB;AAClB,MAAA,qBAAA,EAAsB;AAAA,IACxB;AAAA,EAIF,CAAA;AAAA,EACA,EAAE,IAAI,gBAAA;AACR;AAEA,MAAM,iBAAA,IAAqB,CAAC,OAAA,GAAwB,EAAC,KAAM;AAKzD,EAAA,OAAO,kBAAkBA,kBAAA,CAAwB,EAAE,YAAA,EAAc,iBAAA,EAAmB,CAAA,EAAG;AAAA,IACrF,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,eAAA,CAAgB,OAAO,CAAA;AACvB,MAAA,eAAA,EAAgB;AAAA,IAClB;AAAA,GACD,CAAA;AACH,CAAA,CAAA;AAiBO,MAAM,gBAAA,GAAmB,kBAAkB,iBAAiB;;;;"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { InstrumentationBase, InstrumentationNodeModuleDefinition, isWrapped } from '@opentelemetry/instrumentation';
|
|
2
|
+
import { SDK_VERSION, getActiveSpan, startInactiveSpan, SPAN_KIND, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_STATUS_ERROR } from '@sentry/core';
|
|
3
|
+
import { DB_STATEMENT, NET_PEER_PORT, NET_PEER_NAME, DB_SYSTEM } from '@sentry/conventions/attributes';
|
|
4
|
+
import { defaultDbStatementSerializer } from '@sentry/server-utils';
|
|
5
|
+
import { DB_SYSTEM_VALUE_REDIS, ATTR_DB_CONNECTION_STRING } from './semconv.js';
|
|
6
|
+
|
|
7
|
+
const PACKAGE_NAME = "@sentry/instrumentation-ioredis";
|
|
8
|
+
const ORIGIN = "auto.db.otel.redis";
|
|
9
|
+
const SUPPORTED_VERSIONS = [">=2.0.0 <5.11.0"];
|
|
10
|
+
function endSpan(span, err) {
|
|
11
|
+
if (err) {
|
|
12
|
+
span.setStatus({ code: SPAN_STATUS_ERROR, message: err.message });
|
|
13
|
+
}
|
|
14
|
+
span.end();
|
|
15
|
+
}
|
|
16
|
+
class IORedisInstrumentation extends InstrumentationBase {
|
|
17
|
+
constructor(config = {}) {
|
|
18
|
+
super(PACKAGE_NAME, SDK_VERSION, config);
|
|
19
|
+
}
|
|
20
|
+
init() {
|
|
21
|
+
return [
|
|
22
|
+
new InstrumentationNodeModuleDefinition(
|
|
23
|
+
"ioredis",
|
|
24
|
+
SUPPORTED_VERSIONS,
|
|
25
|
+
(module) => {
|
|
26
|
+
const moduleExports = module[Symbol.toStringTag] === "Module" && module.default ? module.default : module;
|
|
27
|
+
if (isWrapped(moduleExports.prototype.sendCommand)) {
|
|
28
|
+
this._unwrap(moduleExports.prototype, "sendCommand");
|
|
29
|
+
}
|
|
30
|
+
this._wrap(moduleExports.prototype, "sendCommand", this._patchSendCommand());
|
|
31
|
+
if (isWrapped(moduleExports.prototype.connect)) {
|
|
32
|
+
this._unwrap(moduleExports.prototype, "connect");
|
|
33
|
+
}
|
|
34
|
+
this._wrap(moduleExports.prototype, "connect", this._patchConnection());
|
|
35
|
+
return module;
|
|
36
|
+
},
|
|
37
|
+
(module) => {
|
|
38
|
+
if (module === void 0) return;
|
|
39
|
+
const moduleExports = module[Symbol.toStringTag] === "Module" && module.default ? module.default : module;
|
|
40
|
+
this._unwrap(moduleExports.prototype, "sendCommand");
|
|
41
|
+
this._unwrap(moduleExports.prototype, "connect");
|
|
42
|
+
}
|
|
43
|
+
)
|
|
44
|
+
];
|
|
45
|
+
}
|
|
46
|
+
_patchSendCommand() {
|
|
47
|
+
const instrumentation = this;
|
|
48
|
+
return (original) => {
|
|
49
|
+
return function(...args) {
|
|
50
|
+
const cmd = args[0];
|
|
51
|
+
if (args.length < 1 || typeof cmd !== "object" || !getActiveSpan()) {
|
|
52
|
+
return original.apply(this, args);
|
|
53
|
+
}
|
|
54
|
+
const { host, port } = this.options;
|
|
55
|
+
const attributes = {
|
|
56
|
+
// oxlint-disable-next-line typescript/no-deprecated
|
|
57
|
+
[DB_SYSTEM]: DB_SYSTEM_VALUE_REDIS,
|
|
58
|
+
// oxlint-disable-next-line typescript/no-deprecated
|
|
59
|
+
[DB_STATEMENT]: defaultDbStatementSerializer(cmd.name, cmd.args),
|
|
60
|
+
[ATTR_DB_CONNECTION_STRING]: `redis://${host}:${port}`,
|
|
61
|
+
// oxlint-disable-next-line typescript/no-deprecated
|
|
62
|
+
[NET_PEER_NAME]: host,
|
|
63
|
+
// oxlint-disable-next-line typescript/no-deprecated
|
|
64
|
+
[NET_PEER_PORT]: port,
|
|
65
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN
|
|
66
|
+
};
|
|
67
|
+
const span = startInactiveSpan({ name: cmd.name, kind: SPAN_KIND.CLIENT, attributes });
|
|
68
|
+
try {
|
|
69
|
+
const result = original.apply(this, args);
|
|
70
|
+
const origResolve = cmd.resolve;
|
|
71
|
+
cmd.resolve = function(response) {
|
|
72
|
+
instrumentation._callResponseHook(span, cmd, response);
|
|
73
|
+
endSpan(span, null);
|
|
74
|
+
origResolve(response);
|
|
75
|
+
};
|
|
76
|
+
const origReject = cmd.reject;
|
|
77
|
+
cmd.reject = function(err) {
|
|
78
|
+
endSpan(span, err);
|
|
79
|
+
origReject(err);
|
|
80
|
+
};
|
|
81
|
+
return result;
|
|
82
|
+
} catch (error) {
|
|
83
|
+
endSpan(span, error);
|
|
84
|
+
throw error;
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
_patchConnection() {
|
|
90
|
+
return (original) => {
|
|
91
|
+
return function(...args) {
|
|
92
|
+
if (!getActiveSpan()) {
|
|
93
|
+
return original.apply(this, args);
|
|
94
|
+
}
|
|
95
|
+
const { host, port } = this.options;
|
|
96
|
+
const attributes = {
|
|
97
|
+
// oxlint-disable-next-line typescript/no-deprecated
|
|
98
|
+
[DB_SYSTEM]: DB_SYSTEM_VALUE_REDIS,
|
|
99
|
+
// oxlint-disable-next-line typescript/no-deprecated
|
|
100
|
+
[DB_STATEMENT]: "connect",
|
|
101
|
+
[ATTR_DB_CONNECTION_STRING]: `redis://${host}:${port}`,
|
|
102
|
+
// oxlint-disable-next-line typescript/no-deprecated
|
|
103
|
+
[NET_PEER_NAME]: host,
|
|
104
|
+
// oxlint-disable-next-line typescript/no-deprecated
|
|
105
|
+
[NET_PEER_PORT]: port,
|
|
106
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN
|
|
107
|
+
};
|
|
108
|
+
const span = startInactiveSpan({ name: "connect", kind: SPAN_KIND.CLIENT, attributes });
|
|
109
|
+
try {
|
|
110
|
+
const result = original.apply(this, args);
|
|
111
|
+
if (result instanceof Promise) {
|
|
112
|
+
return result.then(
|
|
113
|
+
(value) => {
|
|
114
|
+
endSpan(span, null);
|
|
115
|
+
return value;
|
|
116
|
+
},
|
|
117
|
+
(error) => {
|
|
118
|
+
endSpan(span, error);
|
|
119
|
+
return Promise.reject(error);
|
|
120
|
+
}
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
endSpan(span, null);
|
|
124
|
+
return result;
|
|
125
|
+
} catch (error) {
|
|
126
|
+
endSpan(span, error);
|
|
127
|
+
throw error;
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
_callResponseHook(span, cmd, response) {
|
|
133
|
+
const { responseHook } = this.getConfig();
|
|
134
|
+
if (!responseHook) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
try {
|
|
138
|
+
responseHook(span, cmd.name, cmd.args, response);
|
|
139
|
+
} catch {
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export { IORedisInstrumentation };
|
|
145
|
+
//# sourceMappingURL=ioredis-instrumentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ioredis-instrumentation.js","sources":["../../../../../../src/integrations/tracing/redis/vendored/ioredis-instrumentation.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/instrumentation-ioredis-v0.62.0/packages/instrumentation-ioredis\n * - Upstream version: @opentelemetry/instrumentation-ioredis@0.62.0\n * - Minor TypeScript adjustments for this repository's compiler settings\n * - Refactored to use Sentry's span APIs instead of OpenTelemetry tracing APIs\n */\n\nimport { InstrumentationBase, InstrumentationNodeModuleDefinition, isWrapped } from '@opentelemetry/instrumentation';\nimport type { Span, SpanAttributes } from '@sentry/core';\nimport {\n getActiveSpan,\n SDK_VERSION,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SPAN_KIND,\n SPAN_STATUS_ERROR,\n startInactiveSpan,\n} from '@sentry/core';\nimport { DB_STATEMENT, DB_SYSTEM, NET_PEER_NAME, NET_PEER_PORT } from '@sentry/conventions/attributes';\nimport { defaultDbStatementSerializer } from '@sentry/server-utils';\nimport { ATTR_DB_CONNECTION_STRING, DB_SYSTEM_VALUE_REDIS } from './semconv';\nimport type { IORedisInstrumentationConfig } from './types';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-ioredis';\nconst ORIGIN = 'auto.db.otel.redis';\n\n// ioredis >= 5.11.0 publishes via diagnostics_channel, which Sentry subscribes\n// to separately, so this monkey-patching instrumentation only covers < 5.11.0.\nconst SUPPORTED_VERSIONS = ['>=2.0.0 <5.11.0'];\n\n// The raw imported `ioredis` module is either the CommonJS export or an ESM\n// namespace wrapping it on `.default`. Typed shallowly since it is only used\n// internally to reach the `Redis` prototype that holds the methods we patch.\ntype IORedisModule = {\n default?: { prototype: RedisPrototype };\n prototype: RedisPrototype;\n [Symbol.toStringTag]?: string;\n};\n\ninterface RedisPrototype {\n sendCommand: (...args: unknown[]) => unknown;\n connect: (...args: unknown[]) => unknown;\n}\n\n// The `this` of the patched methods is a Redis client instance exposing its\n// connection options.\ninterface RedisClient {\n options: { host?: string; port?: number };\n}\n\n// The in-flight command object ioredis passes to `sendCommand`. We swap its\n// `resolve`/`reject` so the span ends when the command settles.\ninterface RedisCommand {\n name: string;\n args: Array<string | Buffer>;\n resolve: (result: unknown) => void;\n reject: (err: Error) => void;\n}\n\nfunction endSpan(span: Span, err: Error | null | undefined): void {\n if (err) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: err.message });\n }\n span.end();\n}\n\nexport class IORedisInstrumentation extends InstrumentationBase<IORedisInstrumentationConfig> {\n public constructor(config: IORedisInstrumentationConfig = {}) {\n super(PACKAGE_NAME, SDK_VERSION, config);\n }\n\n protected init(): InstrumentationNodeModuleDefinition[] {\n return [\n new InstrumentationNodeModuleDefinition(\n 'ioredis',\n SUPPORTED_VERSIONS,\n (module: IORedisModule) => {\n const moduleExports = module[Symbol.toStringTag] === 'Module' && module.default ? module.default : module;\n if (isWrapped(moduleExports.prototype.sendCommand)) {\n this._unwrap(moduleExports.prototype, 'sendCommand');\n }\n this._wrap(moduleExports.prototype, 'sendCommand', this._patchSendCommand());\n if (isWrapped(moduleExports.prototype.connect)) {\n this._unwrap(moduleExports.prototype, 'connect');\n }\n this._wrap(moduleExports.prototype, 'connect', this._patchConnection());\n return module;\n },\n (module: IORedisModule | undefined) => {\n if (module === undefined) return;\n const moduleExports = module[Symbol.toStringTag] === 'Module' && module.default ? module.default : module;\n this._unwrap(moduleExports.prototype, 'sendCommand');\n this._unwrap(moduleExports.prototype, 'connect');\n },\n ),\n ];\n }\n\n private _patchSendCommand() {\n const instrumentation = this;\n return (original: (...args: unknown[]) => unknown) => {\n return function (this: RedisClient, ...args: unknown[]): unknown {\n const cmd = args[0] as RedisCommand | undefined;\n // ioredis only creates a span when there is an active parent span\n // (the upstream `requireParentSpan` default, which Sentry never overrides).\n if (args.length < 1 || typeof cmd !== 'object' || !getActiveSpan()) {\n return original.apply(this, args);\n }\n\n const { host, port } = this.options;\n const attributes: SpanAttributes = {\n // oxlint-disable-next-line typescript/no-deprecated\n [DB_SYSTEM]: DB_SYSTEM_VALUE_REDIS,\n // oxlint-disable-next-line typescript/no-deprecated\n [DB_STATEMENT]: defaultDbStatementSerializer(cmd.name, cmd.args),\n [ATTR_DB_CONNECTION_STRING]: `redis://${host}:${port}`,\n // oxlint-disable-next-line typescript/no-deprecated\n [NET_PEER_NAME]: host,\n // oxlint-disable-next-line typescript/no-deprecated\n [NET_PEER_PORT]: port,\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN,\n };\n\n const span = startInactiveSpan({ name: cmd.name, kind: SPAN_KIND.CLIENT, attributes });\n\n try {\n const result = original.apply(this, args);\n const origResolve = cmd.resolve;\n cmd.resolve = function (response: unknown): void {\n instrumentation._callResponseHook(span, cmd, response);\n endSpan(span, null);\n origResolve(response);\n };\n const origReject = cmd.reject;\n cmd.reject = function (err: Error): void {\n endSpan(span, err);\n origReject(err);\n };\n return result;\n } catch (error) {\n endSpan(span, error as Error);\n throw error;\n }\n };\n };\n }\n\n private _patchConnection() {\n return (original: (...args: unknown[]) => unknown) => {\n return function (this: RedisClient, ...args: unknown[]): unknown {\n if (!getActiveSpan()) {\n return original.apply(this, args);\n }\n\n const { host, port } = this.options;\n const attributes: SpanAttributes = {\n // oxlint-disable-next-line typescript/no-deprecated\n [DB_SYSTEM]: DB_SYSTEM_VALUE_REDIS,\n // oxlint-disable-next-line typescript/no-deprecated\n [DB_STATEMENT]: 'connect',\n [ATTR_DB_CONNECTION_STRING]: `redis://${host}:${port}`,\n // oxlint-disable-next-line typescript/no-deprecated\n [NET_PEER_NAME]: host,\n // oxlint-disable-next-line typescript/no-deprecated\n [NET_PEER_PORT]: port,\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN,\n };\n\n const span = startInactiveSpan({ name: 'connect', kind: SPAN_KIND.CLIENT, attributes });\n\n try {\n const result = original.apply(this, args) as Promise<unknown> | undefined;\n if (result instanceof Promise) {\n return result.then(\n (value: unknown) => {\n endSpan(span, null);\n return value;\n },\n (error: Error) => {\n endSpan(span, error);\n return Promise.reject(error);\n },\n );\n }\n endSpan(span, null);\n return result;\n } catch (error) {\n endSpan(span, error as Error);\n throw error;\n }\n };\n };\n }\n\n private _callResponseHook(span: Span, cmd: RedisCommand, response: unknown): void {\n const { responseHook } = this.getConfig();\n if (!responseHook) {\n return;\n }\n try {\n responseHook(span, cmd.name, cmd.args, response);\n } catch {\n // ignore errors thrown from the user-provided response hook\n }\n }\n}\n"],"names":[],"mappings":";;;;;;AA0BA,MAAM,YAAA,GAAe,iCAAA;AACrB,MAAM,MAAA,GAAS,oBAAA;AAIf,MAAM,kBAAA,GAAqB,CAAC,iBAAiB,CAAA;AA+B7C,SAAS,OAAA,CAAQ,MAAY,GAAA,EAAqC;AAChE,EAAA,IAAI,GAAA,EAAK;AACP,IAAA,IAAA,CAAK,UAAU,EAAE,IAAA,EAAM,mBAAmB,OAAA,EAAS,GAAA,CAAI,SAAS,CAAA;AAAA,EAClE;AACA,EAAA,IAAA,CAAK,GAAA,EAAI;AACX;AAEO,MAAM,+BAA+B,mBAAA,CAAkD;AAAA,EACrF,WAAA,CAAY,MAAA,GAAuC,EAAC,EAAG;AAC5D,IAAA,KAAA,CAAM,YAAA,EAAc,aAAa,MAAM,CAAA;AAAA,EACzC;AAAA,EAEU,IAAA,GAA8C;AACtD,IAAA,OAAO;AAAA,MACL,IAAI,mCAAA;AAAA,QACF,SAAA;AAAA,QACA,kBAAA;AAAA,QACA,CAAC,MAAA,KAA0B;AACzB,UAAA,MAAM,aAAA,GAAgB,OAAO,MAAA,CAAO,WAAW,MAAM,QAAA,IAAY,MAAA,CAAO,OAAA,GAAU,MAAA,CAAO,OAAA,GAAU,MAAA;AACnG,UAAA,IAAI,SAAA,CAAU,aAAA,CAAc,SAAA,CAAU,WAAW,CAAA,EAAG;AAClD,YAAA,IAAA,CAAK,OAAA,CAAQ,aAAA,CAAc,SAAA,EAAW,aAAa,CAAA;AAAA,UACrD;AACA,UAAA,IAAA,CAAK,MAAM,aAAA,CAAc,SAAA,EAAW,aAAA,EAAe,IAAA,CAAK,mBAAmB,CAAA;AAC3E,UAAA,IAAI,SAAA,CAAU,aAAA,CAAc,SAAA,CAAU,OAAO,CAAA,EAAG;AAC9C,YAAA,IAAA,CAAK,OAAA,CAAQ,aAAA,CAAc,SAAA,EAAW,SAAS,CAAA;AAAA,UACjD;AACA,UAAA,IAAA,CAAK,MAAM,aAAA,CAAc,SAAA,EAAW,SAAA,EAAW,IAAA,CAAK,kBAAkB,CAAA;AACtE,UAAA,OAAO,MAAA;AAAA,QACT,CAAA;AAAA,QACA,CAAC,MAAA,KAAsC;AACrC,UAAA,IAAI,WAAW,MAAA,EAAW;AAC1B,UAAA,MAAM,aAAA,GAAgB,OAAO,MAAA,CAAO,WAAW,MAAM,QAAA,IAAY,MAAA,CAAO,OAAA,GAAU,MAAA,CAAO,OAAA,GAAU,MAAA;AACnG,UAAA,IAAA,CAAK,OAAA,CAAQ,aAAA,CAAc,SAAA,EAAW,aAAa,CAAA;AACnD,UAAA,IAAA,CAAK,OAAA,CAAQ,aAAA,CAAc,SAAA,EAAW,SAAS,CAAA;AAAA,QACjD;AAAA;AACF,KACF;AAAA,EACF;AAAA,EAEQ,iBAAA,GAAoB;AAC1B,IAAA,MAAM,eAAA,GAAkB,IAAA;AACxB,IAAA,OAAO,CAAC,QAAA,KAA8C;AACpD,MAAA,OAAO,YAAgC,IAAA,EAA0B;AAC/D,QAAA,MAAM,GAAA,GAAM,KAAK,CAAC,CAAA;AAGlB,QAAA,IAAI,IAAA,CAAK,SAAS,CAAA,IAAK,OAAO,QAAQ,QAAA,IAAY,CAAC,eAAc,EAAG;AAClE,UAAA,OAAO,QAAA,CAAS,KAAA,CAAM,IAAA,EAAM,IAAI,CAAA;AAAA,QAClC;AAEA,QAAA,MAAM,EAAE,IAAA,EAAM,IAAA,EAAK,GAAI,IAAA,CAAK,OAAA;AAC5B,QAAA,MAAM,UAAA,GAA6B;AAAA;AAAA,UAEjC,CAAC,SAAS,GAAG,qBAAA;AAAA;AAAA,UAEb,CAAC,YAAY,GAAG,6BAA6B,GAAA,CAAI,IAAA,EAAM,IAAI,IAAI,CAAA;AAAA,UAC/D,CAAC,yBAAyB,GAAG,CAAA,QAAA,EAAW,IAAI,IAAI,IAAI,CAAA,CAAA;AAAA;AAAA,UAEpD,CAAC,aAAa,GAAG,IAAA;AAAA;AAAA,UAEjB,CAAC,aAAa,GAAG,IAAA;AAAA,UACjB,CAAC,gCAAgC,GAAG;AAAA,SACtC;AAEA,QAAA,MAAM,IAAA,GAAO,iBAAA,CAAkB,EAAE,IAAA,EAAM,GAAA,CAAI,MAAM,IAAA,EAAM,SAAA,CAAU,MAAA,EAAQ,UAAA,EAAY,CAAA;AAErF,QAAA,IAAI;AACF,UAAA,MAAM,MAAA,GAAS,QAAA,CAAS,KAAA,CAAM,IAAA,EAAM,IAAI,CAAA;AACxC,UAAA,MAAM,cAAc,GAAA,CAAI,OAAA;AACxB,UAAA,GAAA,CAAI,OAAA,GAAU,SAAU,QAAA,EAAyB;AAC/C,YAAA,eAAA,CAAgB,iBAAA,CAAkB,IAAA,EAAM,GAAA,EAAK,QAAQ,CAAA;AACrD,YAAA,OAAA,CAAQ,MAAM,IAAI,CAAA;AAClB,YAAA,WAAA,CAAY,QAAQ,CAAA;AAAA,UACtB,CAAA;AACA,UAAA,MAAM,aAAa,GAAA,CAAI,MAAA;AACvB,UAAA,GAAA,CAAI,MAAA,GAAS,SAAU,GAAA,EAAkB;AACvC,YAAA,OAAA,CAAQ,MAAM,GAAG,CAAA;AACjB,YAAA,UAAA,CAAW,GAAG,CAAA;AAAA,UAChB,CAAA;AACA,UAAA,OAAO,MAAA;AAAA,QACT,SAAS,KAAA,EAAO;AACd,UAAA,OAAA,CAAQ,MAAM,KAAc,CAAA;AAC5B,UAAA,MAAM,KAAA;AAAA,QACR;AAAA,MACF,CAAA;AAAA,IACF,CAAA;AAAA,EACF;AAAA,EAEQ,gBAAA,GAAmB;AACzB,IAAA,OAAO,CAAC,QAAA,KAA8C;AACpD,MAAA,OAAO,YAAgC,IAAA,EAA0B;AAC/D,QAAA,IAAI,CAAC,eAAc,EAAG;AACpB,UAAA,OAAO,QAAA,CAAS,KAAA,CAAM,IAAA,EAAM,IAAI,CAAA;AAAA,QAClC;AAEA,QAAA,MAAM,EAAE,IAAA,EAAM,IAAA,EAAK,GAAI,IAAA,CAAK,OAAA;AAC5B,QAAA,MAAM,UAAA,GAA6B;AAAA;AAAA,UAEjC,CAAC,SAAS,GAAG,qBAAA;AAAA;AAAA,UAEb,CAAC,YAAY,GAAG,SAAA;AAAA,UAChB,CAAC,yBAAyB,GAAG,CAAA,QAAA,EAAW,IAAI,IAAI,IAAI,CAAA,CAAA;AAAA;AAAA,UAEpD,CAAC,aAAa,GAAG,IAAA;AAAA;AAAA,UAEjB,CAAC,aAAa,GAAG,IAAA;AAAA,UACjB,CAAC,gCAAgC,GAAG;AAAA,SACtC;AAEA,QAAA,MAAM,IAAA,GAAO,kBAAkB,EAAE,IAAA,EAAM,WAAW,IAAA,EAAM,SAAA,CAAU,MAAA,EAAQ,UAAA,EAAY,CAAA;AAEtF,QAAA,IAAI;AACF,UAAA,MAAM,MAAA,GAAS,QAAA,CAAS,KAAA,CAAM,IAAA,EAAM,IAAI,CAAA;AACxC,UAAA,IAAI,kBAAkB,OAAA,EAAS;AAC7B,YAAA,OAAO,MAAA,CAAO,IAAA;AAAA,cACZ,CAAC,KAAA,KAAmB;AAClB,gBAAA,OAAA,CAAQ,MAAM,IAAI,CAAA;AAClB,gBAAA,OAAO,KAAA;AAAA,cACT,CAAA;AAAA,cACA,CAAC,KAAA,KAAiB;AAChB,gBAAA,OAAA,CAAQ,MAAM,KAAK,CAAA;AACnB,gBAAA,OAAO,OAAA,CAAQ,OAAO,KAAK,CAAA;AAAA,cAC7B;AAAA,aACF;AAAA,UACF;AACA,UAAA,OAAA,CAAQ,MAAM,IAAI,CAAA;AAClB,UAAA,OAAO,MAAA;AAAA,QACT,SAAS,KAAA,EAAO;AACd,UAAA,OAAA,CAAQ,MAAM,KAAc,CAAA;AAC5B,UAAA,MAAM,KAAA;AAAA,QACR;AAAA,MACF,CAAA;AAAA,IACF,CAAA;AAAA,EACF;AAAA,EAEQ,iBAAA,CAAkB,IAAA,EAAY,GAAA,EAAmB,QAAA,EAAyB;AAChF,IAAA,MAAM,EAAE,YAAA,EAAa,GAAI,IAAA,CAAK,SAAA,EAAU;AACxC,IAAA,IAAI,CAAC,YAAA,EAAc;AACjB,MAAA;AAAA,IACF;AACA,IAAA,IAAI;AACF,MAAA,YAAA,CAAa,IAAA,EAAM,GAAA,CAAI,IAAA,EAAM,GAAA,CAAI,MAAM,QAAQ,CAAA;AAAA,IACjD,CAAA,CAAA,MAAQ;AAAA,IAER;AAAA,EACF;AACF;;;;"}
|
|
@@ -0,0 +1,443 @@
|
|
|
1
|
+
import { InstrumentationBase, InstrumentationNodeModuleDefinition, isWrapped } from '@opentelemetry/instrumentation';
|
|
2
|
+
import { SDK_VERSION, startInactiveSpan, SPAN_KIND, getActiveSpan, withActiveSpan, debug, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SPAN_STATUS_ERROR } from '@sentry/core';
|
|
3
|
+
import { DB_STATEMENT, DB_SYSTEM, NET_PEER_NAME, NET_PEER_PORT } from '@sentry/conventions/attributes';
|
|
4
|
+
import { defaultDbStatementSerializer } from '@sentry/server-utils';
|
|
5
|
+
import { DEBUG_BUILD } from '../../../../debug-build.js';
|
|
6
|
+
import { InstrumentationNodeModuleFile } from '../../InstrumentationNodeModuleFile.js';
|
|
7
|
+
import { DB_SYSTEM_VALUE_REDIS, ATTR_DB_CONNECTION_STRING } from './semconv.js';
|
|
8
|
+
|
|
9
|
+
const PACKAGE_NAME = "@sentry/instrumentation-redis";
|
|
10
|
+
const ORIGIN = "auto.db.otel.redis";
|
|
11
|
+
const OTEL_OPEN_SPANS = /* @__PURE__ */ Symbol("opentelemetry.instrumentation.redis.open_spans");
|
|
12
|
+
const MULTI_COMMAND_OPTIONS = /* @__PURE__ */ Symbol("opentelemetry.instrumentation.redis.multi_command_options");
|
|
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) {
|
|
29
|
+
if (typeof url !== "string" || !url) {
|
|
30
|
+
return void 0;
|
|
31
|
+
}
|
|
32
|
+
try {
|
|
33
|
+
const u = new URL(url);
|
|
34
|
+
u.searchParams.delete("user_pwd");
|
|
35
|
+
u.username = "";
|
|
36
|
+
u.password = "";
|
|
37
|
+
return u.href;
|
|
38
|
+
} catch (err) {
|
|
39
|
+
DEBUG_BUILD && debug.error("failed to sanitize redis connection url", err);
|
|
40
|
+
}
|
|
41
|
+
return void 0;
|
|
42
|
+
}
|
|
43
|
+
function getClientAttributes(options) {
|
|
44
|
+
return {
|
|
45
|
+
// oxlint-disable-next-line typescript/no-deprecated
|
|
46
|
+
[DB_SYSTEM]: DB_SYSTEM_VALUE_REDIS,
|
|
47
|
+
// oxlint-disable-next-line typescript/no-deprecated
|
|
48
|
+
[NET_PEER_NAME]: options?.socket?.host,
|
|
49
|
+
// oxlint-disable-next-line typescript/no-deprecated
|
|
50
|
+
[NET_PEER_PORT]: options?.socket?.port,
|
|
51
|
+
[ATTR_DB_CONNECTION_STRING]: removeCredentialsFromDBConnectionStringAttribute(options?.url),
|
|
52
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
const _RedisInstrumentationV2_V3 = class _RedisInstrumentationV2_V3 extends InstrumentationBase {
|
|
56
|
+
constructor(config = {}) {
|
|
57
|
+
super(PACKAGE_NAME, SDK_VERSION, config);
|
|
58
|
+
}
|
|
59
|
+
init() {
|
|
60
|
+
return [
|
|
61
|
+
new InstrumentationNodeModuleDefinition(
|
|
62
|
+
"redis",
|
|
63
|
+
[">=2.6.0 <4"],
|
|
64
|
+
(moduleExports) => {
|
|
65
|
+
if (isWrapped(moduleExports.RedisClient.prototype["internal_send_command"])) {
|
|
66
|
+
this._unwrap(moduleExports.RedisClient.prototype, "internal_send_command");
|
|
67
|
+
}
|
|
68
|
+
this._wrap(moduleExports.RedisClient.prototype, "internal_send_command", this._getPatchInternalSendCommand());
|
|
69
|
+
return moduleExports;
|
|
70
|
+
},
|
|
71
|
+
(moduleExports) => {
|
|
72
|
+
if (moduleExports === void 0) return;
|
|
73
|
+
this._unwrap(moduleExports.RedisClient.prototype, "internal_send_command");
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
];
|
|
77
|
+
}
|
|
78
|
+
_getPatchInternalSendCommand() {
|
|
79
|
+
const instrumentation = this;
|
|
80
|
+
return function internal_send_command(original) {
|
|
81
|
+
return function internal_send_command_trace(cmd) {
|
|
82
|
+
if (arguments.length !== 1 || typeof cmd !== "object") {
|
|
83
|
+
return original.apply(this, arguments);
|
|
84
|
+
}
|
|
85
|
+
const attributes = {
|
|
86
|
+
// oxlint-disable-next-line typescript/no-deprecated
|
|
87
|
+
[DB_SYSTEM]: DB_SYSTEM_VALUE_REDIS,
|
|
88
|
+
// oxlint-disable-next-line typescript/no-deprecated
|
|
89
|
+
[DB_STATEMENT]: defaultDbStatementSerializer(cmd.command, cmd.args),
|
|
90
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN
|
|
91
|
+
};
|
|
92
|
+
if (this.connection_options) {
|
|
93
|
+
attributes[NET_PEER_NAME] = this.connection_options.host;
|
|
94
|
+
attributes[NET_PEER_PORT] = this.connection_options.port;
|
|
95
|
+
}
|
|
96
|
+
if (this.address) {
|
|
97
|
+
attributes[ATTR_DB_CONNECTION_STRING] = `redis://${this.address}`;
|
|
98
|
+
}
|
|
99
|
+
const span = startInactiveSpan({
|
|
100
|
+
name: `${_RedisInstrumentationV2_V3.COMPONENT}-${cmd.command}`,
|
|
101
|
+
kind: SPAN_KIND.CLIENT,
|
|
102
|
+
attributes
|
|
103
|
+
});
|
|
104
|
+
const originalCallback = arguments[0].callback;
|
|
105
|
+
if (originalCallback) {
|
|
106
|
+
const parentSpan = getActiveSpan();
|
|
107
|
+
arguments[0].callback = function callback(err, reply) {
|
|
108
|
+
runResponseHook(instrumentation.getConfig().responseHook, span, cmd.command, cmd.args, reply);
|
|
109
|
+
endSpan(span, err);
|
|
110
|
+
return withActiveSpan(parentSpan ?? null, () => originalCallback.apply(this, arguments));
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
try {
|
|
114
|
+
return original.apply(this, arguments);
|
|
115
|
+
} catch (rethrow) {
|
|
116
|
+
endSpan(span, rethrow);
|
|
117
|
+
throw rethrow;
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
_RedisInstrumentationV2_V3.COMPONENT = "redis";
|
|
124
|
+
let RedisInstrumentationV2_V3 = _RedisInstrumentationV2_V3;
|
|
125
|
+
const _RedisInstrumentationV4_V5 = class _RedisInstrumentationV4_V5 extends InstrumentationBase {
|
|
126
|
+
constructor(config = {}) {
|
|
127
|
+
super(PACKAGE_NAME, SDK_VERSION, config);
|
|
128
|
+
}
|
|
129
|
+
init() {
|
|
130
|
+
return [
|
|
131
|
+
this._getInstrumentationNodeModuleDefinition("@redis/client"),
|
|
132
|
+
this._getInstrumentationNodeModuleDefinition("@node-redis/client")
|
|
133
|
+
];
|
|
134
|
+
}
|
|
135
|
+
_getInstrumentationNodeModuleDefinition(basePackageName) {
|
|
136
|
+
const commanderModuleFile = new InstrumentationNodeModuleFile(
|
|
137
|
+
`${basePackageName}/dist/lib/commander.js`,
|
|
138
|
+
["^1.0.0"],
|
|
139
|
+
(moduleExports, moduleVersion) => {
|
|
140
|
+
const transformCommandArguments = moduleExports.transformCommandArguments;
|
|
141
|
+
if (!transformCommandArguments) {
|
|
142
|
+
DEBUG_BUILD && debug.error("internal instrumentation error, missing transformCommandArguments function");
|
|
143
|
+
return moduleExports;
|
|
144
|
+
}
|
|
145
|
+
const functionToPatch = moduleVersion?.startsWith("1.0.") ? "extendWithCommands" : "attachCommands";
|
|
146
|
+
if (isWrapped(moduleExports?.[functionToPatch])) {
|
|
147
|
+
this._unwrap(moduleExports, functionToPatch);
|
|
148
|
+
}
|
|
149
|
+
this._wrap(moduleExports, functionToPatch, this._getPatchExtendWithCommands(transformCommandArguments));
|
|
150
|
+
return moduleExports;
|
|
151
|
+
},
|
|
152
|
+
(moduleExports) => {
|
|
153
|
+
if (isWrapped(moduleExports?.extendWithCommands)) {
|
|
154
|
+
this._unwrap(moduleExports, "extendWithCommands");
|
|
155
|
+
}
|
|
156
|
+
if (isWrapped(moduleExports?.attachCommands)) {
|
|
157
|
+
this._unwrap(moduleExports, "attachCommands");
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
const multiCommanderModule = new InstrumentationNodeModuleFile(
|
|
162
|
+
`${basePackageName}/dist/lib/client/multi-command.js`,
|
|
163
|
+
["^1.0.0", ">=5.0.0 <5.12.0"],
|
|
164
|
+
(moduleExports) => {
|
|
165
|
+
const redisClientMultiCommandPrototype = moduleExports?.default?.prototype;
|
|
166
|
+
if (isWrapped(redisClientMultiCommandPrototype?.exec)) {
|
|
167
|
+
this._unwrap(redisClientMultiCommandPrototype, "exec");
|
|
168
|
+
}
|
|
169
|
+
this._wrap(redisClientMultiCommandPrototype, "exec", this._getPatchMultiCommandsExec());
|
|
170
|
+
if (isWrapped(redisClientMultiCommandPrototype?.execAsPipeline)) {
|
|
171
|
+
this._unwrap(redisClientMultiCommandPrototype, "execAsPipeline");
|
|
172
|
+
}
|
|
173
|
+
this._wrap(redisClientMultiCommandPrototype, "execAsPipeline", this._getPatchMultiCommandsExec());
|
|
174
|
+
if (isWrapped(redisClientMultiCommandPrototype?.addCommand)) {
|
|
175
|
+
this._unwrap(redisClientMultiCommandPrototype, "addCommand");
|
|
176
|
+
}
|
|
177
|
+
this._wrap(redisClientMultiCommandPrototype, "addCommand", this._getPatchMultiCommandsAddCommand());
|
|
178
|
+
return moduleExports;
|
|
179
|
+
},
|
|
180
|
+
(moduleExports) => {
|
|
181
|
+
const redisClientMultiCommandPrototype = moduleExports?.default?.prototype;
|
|
182
|
+
if (isWrapped(redisClientMultiCommandPrototype?.exec)) {
|
|
183
|
+
this._unwrap(redisClientMultiCommandPrototype, "exec");
|
|
184
|
+
}
|
|
185
|
+
if (isWrapped(redisClientMultiCommandPrototype?.execAsPipeline)) {
|
|
186
|
+
this._unwrap(redisClientMultiCommandPrototype, "execAsPipeline");
|
|
187
|
+
}
|
|
188
|
+
if (isWrapped(redisClientMultiCommandPrototype?.addCommand)) {
|
|
189
|
+
this._unwrap(redisClientMultiCommandPrototype, "addCommand");
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
);
|
|
193
|
+
const clientIndexModule = new InstrumentationNodeModuleFile(
|
|
194
|
+
`${basePackageName}/dist/lib/client/index.js`,
|
|
195
|
+
["^1.0.0", ">=5.0.0 <5.12.0"],
|
|
196
|
+
(moduleExports) => {
|
|
197
|
+
const redisClientPrototype = moduleExports?.default?.prototype;
|
|
198
|
+
if (redisClientPrototype?.multi) {
|
|
199
|
+
if (isWrapped(redisClientPrototype?.multi)) {
|
|
200
|
+
this._unwrap(redisClientPrototype, "multi");
|
|
201
|
+
}
|
|
202
|
+
this._wrap(redisClientPrototype, "multi", this._getPatchRedisClientMulti());
|
|
203
|
+
}
|
|
204
|
+
if (redisClientPrototype?.MULTI) {
|
|
205
|
+
if (isWrapped(redisClientPrototype?.MULTI)) {
|
|
206
|
+
this._unwrap(redisClientPrototype, "MULTI");
|
|
207
|
+
}
|
|
208
|
+
this._wrap(redisClientPrototype, "MULTI", this._getPatchRedisClientMulti());
|
|
209
|
+
}
|
|
210
|
+
if (isWrapped(redisClientPrototype?.sendCommand)) {
|
|
211
|
+
this._unwrap(redisClientPrototype, "sendCommand");
|
|
212
|
+
}
|
|
213
|
+
this._wrap(redisClientPrototype, "sendCommand", this._getPatchRedisClientSendCommand());
|
|
214
|
+
if (isWrapped(redisClientPrototype?.connect)) {
|
|
215
|
+
this._unwrap(redisClientPrototype, "connect");
|
|
216
|
+
}
|
|
217
|
+
this._wrap(redisClientPrototype, "connect", this._getPatchedClientConnect());
|
|
218
|
+
return moduleExports;
|
|
219
|
+
},
|
|
220
|
+
(moduleExports) => {
|
|
221
|
+
const redisClientPrototype = moduleExports?.default?.prototype;
|
|
222
|
+
if (isWrapped(redisClientPrototype?.multi)) {
|
|
223
|
+
this._unwrap(redisClientPrototype, "multi");
|
|
224
|
+
}
|
|
225
|
+
if (isWrapped(redisClientPrototype?.MULTI)) {
|
|
226
|
+
this._unwrap(redisClientPrototype, "MULTI");
|
|
227
|
+
}
|
|
228
|
+
if (isWrapped(redisClientPrototype?.sendCommand)) {
|
|
229
|
+
this._unwrap(redisClientPrototype, "sendCommand");
|
|
230
|
+
}
|
|
231
|
+
if (isWrapped(redisClientPrototype?.connect)) {
|
|
232
|
+
this._unwrap(redisClientPrototype, "connect");
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
);
|
|
236
|
+
return new InstrumentationNodeModuleDefinition(
|
|
237
|
+
basePackageName,
|
|
238
|
+
["^1.0.0", ">=5.0.0 <5.12.0"],
|
|
239
|
+
(moduleExports) => moduleExports,
|
|
240
|
+
() => {
|
|
241
|
+
},
|
|
242
|
+
[commanderModuleFile, multiCommanderModule, clientIndexModule]
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
_getPatchExtendWithCommands(transformCommandArguments) {
|
|
246
|
+
const plugin = this;
|
|
247
|
+
return function extendWithCommandsPatchWrapper(original) {
|
|
248
|
+
return function extendWithCommandsPatch(config) {
|
|
249
|
+
if (config?.BaseClass?.name !== "RedisClient") {
|
|
250
|
+
return original.apply(this, arguments);
|
|
251
|
+
}
|
|
252
|
+
const origExecutor = config.executor;
|
|
253
|
+
config.executor = function(command, args) {
|
|
254
|
+
const redisCommandArguments = transformCommandArguments(command, args).args;
|
|
255
|
+
return plugin._traceClientCommand(origExecutor, this, arguments, redisCommandArguments);
|
|
256
|
+
};
|
|
257
|
+
return original.apply(this, arguments);
|
|
258
|
+
};
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
_getPatchMultiCommandsExec() {
|
|
262
|
+
const plugin = this;
|
|
263
|
+
return function execPatchWrapper(original) {
|
|
264
|
+
return function execPatch() {
|
|
265
|
+
const execRes = original.apply(this, arguments);
|
|
266
|
+
if (typeof execRes?.then !== "function") {
|
|
267
|
+
DEBUG_BUILD && debug.error("non-promise result when patching exec/execAsPipeline");
|
|
268
|
+
return execRes;
|
|
269
|
+
}
|
|
270
|
+
return execRes.then((redisRes) => {
|
|
271
|
+
const openSpans = this[OTEL_OPEN_SPANS];
|
|
272
|
+
plugin._endSpansWithRedisReplies(openSpans, redisRes);
|
|
273
|
+
return redisRes;
|
|
274
|
+
}).catch((err) => {
|
|
275
|
+
const openSpans = this[OTEL_OPEN_SPANS];
|
|
276
|
+
if (!openSpans) {
|
|
277
|
+
DEBUG_BUILD && debug.error("cannot find open spans to end for multi/pipeline");
|
|
278
|
+
} else {
|
|
279
|
+
const replies = err.constructor.name === "MultiErrorReply" ? err.replies : new Array(openSpans.length).fill(err);
|
|
280
|
+
plugin._endSpansWithRedisReplies(openSpans, replies);
|
|
281
|
+
}
|
|
282
|
+
return Promise.reject(err);
|
|
283
|
+
});
|
|
284
|
+
};
|
|
285
|
+
};
|
|
286
|
+
}
|
|
287
|
+
_getPatchMultiCommandsAddCommand() {
|
|
288
|
+
const plugin = this;
|
|
289
|
+
return function addCommandWrapper(original) {
|
|
290
|
+
return function addCommandPatch(args) {
|
|
291
|
+
return plugin._traceClientCommand(original, this, arguments, args);
|
|
292
|
+
};
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
_getPatchRedisClientMulti() {
|
|
296
|
+
return function multiPatchWrapper(original) {
|
|
297
|
+
return function multiPatch() {
|
|
298
|
+
const multiRes = original.apply(this, arguments);
|
|
299
|
+
multiRes[MULTI_COMMAND_OPTIONS] = this.options;
|
|
300
|
+
return multiRes;
|
|
301
|
+
};
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
_getPatchRedisClientSendCommand() {
|
|
305
|
+
const plugin = this;
|
|
306
|
+
return function sendCommandWrapper(original) {
|
|
307
|
+
return function sendCommandPatch(args) {
|
|
308
|
+
return plugin._traceClientCommand(original, this, arguments, args);
|
|
309
|
+
};
|
|
310
|
+
};
|
|
311
|
+
}
|
|
312
|
+
_getPatchedClientConnect() {
|
|
313
|
+
return function connectWrapper(original) {
|
|
314
|
+
return function patchedConnect() {
|
|
315
|
+
const attributes = getClientAttributes(this.options);
|
|
316
|
+
const span = startInactiveSpan({
|
|
317
|
+
name: `${_RedisInstrumentationV4_V5.COMPONENT}-connect`,
|
|
318
|
+
kind: SPAN_KIND.CLIENT,
|
|
319
|
+
attributes
|
|
320
|
+
});
|
|
321
|
+
const res = withActiveSpan(span, () => original.apply(this));
|
|
322
|
+
return res.then(
|
|
323
|
+
(result) => {
|
|
324
|
+
span.end();
|
|
325
|
+
return result;
|
|
326
|
+
},
|
|
327
|
+
(error) => {
|
|
328
|
+
endSpan(span, error);
|
|
329
|
+
return Promise.reject(error);
|
|
330
|
+
}
|
|
331
|
+
);
|
|
332
|
+
};
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
_traceClientCommand(origFunction, origThis, origArguments, redisCommandArguments) {
|
|
336
|
+
const clientOptions = origThis.options || origThis[MULTI_COMMAND_OPTIONS];
|
|
337
|
+
const commandName = redisCommandArguments[0];
|
|
338
|
+
const commandArgs = redisCommandArguments.slice(1);
|
|
339
|
+
const attributes = getClientAttributes(clientOptions);
|
|
340
|
+
const dbStatement = defaultDbStatementSerializer(commandName, commandArgs);
|
|
341
|
+
if (dbStatement != null) {
|
|
342
|
+
attributes[DB_STATEMENT] = dbStatement;
|
|
343
|
+
}
|
|
344
|
+
const span = startInactiveSpan({
|
|
345
|
+
name: `${_RedisInstrumentationV4_V5.COMPONENT}-${commandName}`,
|
|
346
|
+
kind: SPAN_KIND.CLIENT,
|
|
347
|
+
attributes
|
|
348
|
+
});
|
|
349
|
+
const res = withActiveSpan(span, () => origFunction.apply(origThis, origArguments));
|
|
350
|
+
if (res instanceof Promise) {
|
|
351
|
+
res.then(
|
|
352
|
+
(redisRes) => {
|
|
353
|
+
this._endSpanWithResponse(span, commandName, commandArgs, redisRes, void 0);
|
|
354
|
+
},
|
|
355
|
+
(err) => {
|
|
356
|
+
this._endSpanWithResponse(span, commandName, commandArgs, null, err);
|
|
357
|
+
}
|
|
358
|
+
);
|
|
359
|
+
} else {
|
|
360
|
+
const redisClientMultiCommand = res;
|
|
361
|
+
redisClientMultiCommand[OTEL_OPEN_SPANS] = redisClientMultiCommand[OTEL_OPEN_SPANS] || [];
|
|
362
|
+
redisClientMultiCommand[OTEL_OPEN_SPANS].push({
|
|
363
|
+
span,
|
|
364
|
+
commandName,
|
|
365
|
+
commandArgs
|
|
366
|
+
});
|
|
367
|
+
}
|
|
368
|
+
return res;
|
|
369
|
+
}
|
|
370
|
+
_endSpansWithRedisReplies(openSpans, replies) {
|
|
371
|
+
if (!openSpans) {
|
|
372
|
+
DEBUG_BUILD && debug.error("cannot find open spans to end for redis multi/pipeline");
|
|
373
|
+
return;
|
|
374
|
+
}
|
|
375
|
+
if (replies.length !== openSpans.length) {
|
|
376
|
+
DEBUG_BUILD && debug.error("number of multi command spans does not match response from redis");
|
|
377
|
+
return;
|
|
378
|
+
}
|
|
379
|
+
for (let i = 0; i < openSpans.length; i++) {
|
|
380
|
+
const { span, commandName, commandArgs } = openSpans[i];
|
|
381
|
+
const currCommandRes = replies[i];
|
|
382
|
+
const [res, err] = currCommandRes instanceof Error ? [null, currCommandRes] : [currCommandRes, void 0];
|
|
383
|
+
this._endSpanWithResponse(span, commandName, commandArgs, res, err);
|
|
384
|
+
}
|
|
385
|
+
}
|
|
386
|
+
_endSpanWithResponse(span, commandName, commandArgs, response, error) {
|
|
387
|
+
if (!error) {
|
|
388
|
+
runResponseHook(this.getConfig().responseHook, span, commandName, commandArgs, response);
|
|
389
|
+
}
|
|
390
|
+
endSpan(span, error);
|
|
391
|
+
}
|
|
392
|
+
};
|
|
393
|
+
_RedisInstrumentationV4_V5.COMPONENT = "redis";
|
|
394
|
+
let RedisInstrumentationV4_V5 = _RedisInstrumentationV4_V5;
|
|
395
|
+
class RedisInstrumentation extends InstrumentationBase {
|
|
396
|
+
constructor(config = {}) {
|
|
397
|
+
super(PACKAGE_NAME, SDK_VERSION, config);
|
|
398
|
+
this.initialized = false;
|
|
399
|
+
this.instrumentationV2_V3 = new RedisInstrumentationV2_V3(this.getConfig());
|
|
400
|
+
this.instrumentationV4_V5 = new RedisInstrumentationV4_V5(this.getConfig());
|
|
401
|
+
this.initialized = true;
|
|
402
|
+
}
|
|
403
|
+
setConfig(config = {}) {
|
|
404
|
+
super.setConfig(config);
|
|
405
|
+
if (!this.initialized) {
|
|
406
|
+
return;
|
|
407
|
+
}
|
|
408
|
+
this.instrumentationV2_V3.setConfig(config);
|
|
409
|
+
this.instrumentationV4_V5.setConfig(config);
|
|
410
|
+
}
|
|
411
|
+
init() {
|
|
412
|
+
}
|
|
413
|
+
getModuleDefinitions() {
|
|
414
|
+
return [...this.instrumentationV2_V3.getModuleDefinitions(), ...this.instrumentationV4_V5.getModuleDefinitions()];
|
|
415
|
+
}
|
|
416
|
+
setTracerProvider(tracerProvider) {
|
|
417
|
+
super.setTracerProvider(tracerProvider);
|
|
418
|
+
if (!this.initialized) {
|
|
419
|
+
return;
|
|
420
|
+
}
|
|
421
|
+
this.instrumentationV2_V3.setTracerProvider(tracerProvider);
|
|
422
|
+
this.instrumentationV4_V5.setTracerProvider(tracerProvider);
|
|
423
|
+
}
|
|
424
|
+
enable() {
|
|
425
|
+
super.enable();
|
|
426
|
+
if (!this.initialized) {
|
|
427
|
+
return;
|
|
428
|
+
}
|
|
429
|
+
this.instrumentationV2_V3.enable();
|
|
430
|
+
this.instrumentationV4_V5.enable();
|
|
431
|
+
}
|
|
432
|
+
disable() {
|
|
433
|
+
super.disable();
|
|
434
|
+
if (!this.initialized) {
|
|
435
|
+
return;
|
|
436
|
+
}
|
|
437
|
+
this.instrumentationV2_V3.disable();
|
|
438
|
+
this.instrumentationV4_V5.disable();
|
|
439
|
+
}
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
export { RedisInstrumentation };
|
|
443
|
+
//# sourceMappingURL=redis-instrumentation.js.map
|