@sentry/node 10.53.0 → 10.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/debug-build.js +0 -5
- package/build/cjs/debug-build.js.map +1 -1
- package/build/cjs/index.js +68 -68
- 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 +107 -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 +311 -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 +11 -37
- package/build/cjs/integrations/http.js.map +1 -1
- package/build/cjs/integrations/node-fetch/index.js +19 -46
- package/build/cjs/integrations/node-fetch/index.js.map +1 -1
- package/build/cjs/integrations/node-fetch/vendored/undici.js +71 -215
- package/build/cjs/integrations/node-fetch/vendored/undici.js.map +1 -1
- package/build/cjs/integrations/tracing/amqplib/index.js +29 -0
- package/build/cjs/integrations/tracing/amqplib/index.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/amqplib.js +452 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/amqplib.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv-obsolete.js +24 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js +12 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/types.js +23 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/types.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/utils.js +137 -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 +16 -39
- package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/connect/index.js +56 -0
- package/build/cjs/integrations/tracing/connect/index.js.map +1 -0
- package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js +22 -0
- package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js +148 -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 +35 -0
- package/build/cjs/integrations/tracing/connect/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/dataloader/index.js +41 -0
- package/build/cjs/integrations/tracing/dataloader/index.js.map +1 -0
- package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js +245 -0
- package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/express.js +15 -23
- package/build/cjs/integrations/tracing/express.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/index.js +46 -165
- 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 +68 -150
- 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/fastify/vendored/instrumentation.js +388 -0
- package/build/cjs/integrations/tracing/fastify/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/firebase/firebase.js +15 -21
- package/build/cjs/integrations/tracing/firebase/firebase.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js +6 -14
- package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js +57 -161
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js +81 -147
- package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
- package/build/cjs/integrations/tracing/genericPool/index.js +35 -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 +18 -39
- package/build/cjs/integrations/tracing/google-genai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/graphql/index.js +83 -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 +17 -0
- package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js +318 -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 +300 -0
- package/build/cjs/integrations/tracing/graphql/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/hapi/index.js +20 -78
- 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 +275 -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/semconv.js +6 -0
- package/build/cjs/integrations/tracing/hapi/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/hapi/vendored/utils.js +91 -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 +19 -70
- 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 -82
- package/build/cjs/integrations/tracing/index.js.map +1 -1
- package/build/cjs/integrations/tracing/kafka/index.js +31 -0
- package/build/cjs/integrations/tracing/kafka/index.js.map +1 -0
- package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js +438 -0
- package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/kafka/vendored/internal-types.js +6 -0
- package/build/cjs/integrations/tracing/kafka/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/kafka/vendored/propagator.js +22 -0
- package/build/cjs/integrations/tracing/kafka/vendored/propagator.js.map +1 -0
- package/build/cjs/integrations/tracing/kafka/vendored/semconv.js +38 -0
- package/build/cjs/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/index.js +36 -0
- package/build/cjs/integrations/tracing/knex/index.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/vendored/constants.js +16 -0
- package/build/cjs/integrations/tracing/knex/vendored/constants.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js +162 -0
- package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/vendored/semconv.js +24 -0
- package/build/cjs/integrations/tracing/knex/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/vendored/utils.js +97 -0
- package/build/cjs/integrations/tracing/knex/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/index.js +69 -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 +140 -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 +33 -0
- package/build/cjs/integrations/tracing/koa/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/langchain/index.js +3 -97
- package/build/cjs/integrations/tracing/langchain/index.js.map +1 -1
- package/build/cjs/integrations/tracing/langchain/instrumentation.js +51 -146
- 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 +27 -38
- 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 +39 -0
- package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/index.js +62 -0
- package/build/cjs/integrations/tracing/mongo/index.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js +678 -0
- package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/vendored/internal-types.js +14 -0
- package/build/cjs/integrations/tracing/mongo/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/vendored/semconv.js +26 -0
- package/build/cjs/integrations/tracing/mongo/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose/index.js +28 -0
- package/build/cjs/integrations/tracing/mongoose/index.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js +375 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/semconv.js +22 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/utils.js +87 -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/AttributeNames.js +9 -0
- package/build/cjs/integrations/tracing/mysql/vendored/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js +278 -0
- package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql/vendored/semconv.js +22 -0
- package/build/cjs/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql/vendored/utils.js +63 -0
- package/build/cjs/integrations/tracing/mysql/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/index.js +28 -0
- package/build/cjs/integrations/tracing/mysql2/index.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js +173 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js +20 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/utils.js +97 -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 +17 -41
- package/build/cjs/integrations/tracing/openai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/postgres/index.js +31 -0
- package/build/cjs/integrations/tracing/postgres/index.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js +12 -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 +436 -0
- package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/internal-types.js +6 -0
- package/build/cjs/integrations/tracing/postgres/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/semconv.js +32 -0
- package/build/cjs/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/utils.js +275 -0
- package/build/cjs/integrations/tracing/postgres/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/postgresjs.js +66 -181
- package/build/cjs/integrations/tracing/postgresjs.js.map +1 -1
- package/build/cjs/integrations/tracing/prisma/index.js +123 -0
- package/build/cjs/integrations/tracing/prisma/index.js.map +1 -0
- package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js +119 -0
- package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -0
- package/build/cjs/integrations/tracing/prisma/vendored/constants.js +14 -0
- package/build/cjs/integrations/tracing/prisma/vendored/constants.js.map +1 -0
- package/build/cjs/integrations/tracing/prisma/vendored/global.js +28 -0
- package/build/cjs/integrations/tracing/prisma/vendored/global.js.map +1 -0
- package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js +38 -0
- package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/redis/index.js +15 -72
- package/build/cjs/integrations/tracing/redis/index.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/redis-dc-subscriber.js +42 -77
- package/build/cjs/integrations/tracing/redis/redis-dc-subscriber.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js +53 -98
- package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/vendored/redis-common.js +9 -49
- package/build/cjs/integrations/tracing/redis/vendored/redis-common.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js +175 -282
- package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/vendored/semconv.js +7 -36
- package/build/cjs/integrations/tracing/redis/vendored/semconv.js.map +1 -1
- package/build/cjs/integrations/tracing/tedious/index.js +45 -0
- package/build/cjs/integrations/tracing/tedious/index.js.map +1 -0
- package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js +205 -0
- package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/tedious/vendored/semconv.js +20 -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/utils/sql-common.js +43 -0
- package/build/cjs/integrations/tracing/utils/sql-common.js.map +1 -0
- package/build/cjs/integrations/tracing/vercelai/constants.js +1 -1
- package/build/cjs/integrations/tracing/vercelai/index.js +3 -50
- package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/vercelai/instrumentation.js +58 -157
- 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/index.js +6 -34
- package/build/cjs/sdk/index.js.map +1 -1
- package/build/cjs/sdk/initOtel.js +13 -51
- 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/esm/debug-build.js +0 -5
- package/build/esm/debug-build.js.map +1 -1
- package/build/esm/index.js +17 -17
- 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 +105 -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 +309 -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 +11 -37
- package/build/esm/integrations/http.js.map +1 -1
- package/build/esm/integrations/node-fetch/index.js +19 -46
- package/build/esm/integrations/node-fetch/index.js.map +1 -1
- package/build/esm/integrations/node-fetch/vendored/undici.js +71 -215
- package/build/esm/integrations/node-fetch/vendored/undici.js.map +1 -1
- package/build/esm/integrations/tracing/amqplib/index.js +26 -0
- package/build/esm/integrations/tracing/amqplib/index.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/amqplib.js +450 -0
- package/build/esm/integrations/tracing/amqplib/vendored/amqplib.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/semconv-obsolete.js +13 -0
- package/build/esm/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/semconv.js +7 -0
- package/build/esm/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/types.js +20 -0
- package/build/esm/integrations/tracing/amqplib/vendored/types.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/utils.js +126 -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 +16 -39
- package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/connect/index.js +52 -0
- package/build/esm/integrations/tracing/connect/index.js.map +1 -0
- package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js +18 -0
- package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/connect/vendored/instrumentation.js +145 -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 +31 -0
- package/build/esm/integrations/tracing/connect/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/dataloader/index.js +38 -0
- package/build/esm/integrations/tracing/dataloader/index.js.map +1 -0
- package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js +243 -0
- package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/express.js +15 -23
- package/build/esm/integrations/tracing/express.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/index.js +45 -164
- 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 +68 -150
- 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/fastify/vendored/instrumentation.js +386 -0
- package/build/esm/integrations/tracing/fastify/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/firebase/firebase.js +15 -21
- package/build/esm/integrations/tracing/firebase/firebase.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js +6 -14
- package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js +57 -161
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/patches/functions.js +81 -147
- package/build/esm/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
- package/build/esm/integrations/tracing/genericPool/index.js +32 -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 +18 -39
- package/build/esm/integrations/tracing/google-genai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/graphql/index.js +80 -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 +15 -0
- package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js +316 -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 +291 -0
- package/build/esm/integrations/tracing/graphql/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/hapi/index.js +19 -77
- 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 +273 -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/semconv.js +4 -0
- package/build/esm/integrations/tracing/hapi/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/hapi/vendored/utils.js +82 -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 +19 -70
- 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 +16 -24
- package/build/esm/integrations/tracing/index.js.map +1 -1
- package/build/esm/integrations/tracing/kafka/index.js +28 -0
- package/build/esm/integrations/tracing/kafka/index.js.map +1 -0
- package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js +436 -0
- package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/kafka/vendored/internal-types.js +4 -0
- package/build/esm/integrations/tracing/kafka/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/kafka/vendored/propagator.js +20 -0
- package/build/esm/integrations/tracing/kafka/vendored/propagator.js.map +1 -0
- package/build/esm/integrations/tracing/kafka/vendored/semconv.js +20 -0
- package/build/esm/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/knex/index.js +33 -0
- package/build/esm/integrations/tracing/knex/index.js.map +1 -0
- package/build/esm/integrations/tracing/knex/vendored/constants.js +13 -0
- package/build/esm/integrations/tracing/knex/vendored/constants.js.map +1 -0
- package/build/esm/integrations/tracing/knex/vendored/instrumentation.js +160 -0
- package/build/esm/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/knex/vendored/semconv.js +13 -0
- package/build/esm/integrations/tracing/knex/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/knex/vendored/utils.js +87 -0
- package/build/esm/integrations/tracing/knex/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/koa/index.js +65 -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 +138 -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 +30 -0
- package/build/esm/integrations/tracing/koa/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/langchain/index.js +3 -97
- package/build/esm/integrations/tracing/langchain/index.js.map +1 -1
- package/build/esm/integrations/tracing/langchain/instrumentation.js +52 -147
- 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 +27 -38
- 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 +37 -0
- package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/index.js +58 -0
- package/build/esm/integrations/tracing/mongo/index.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js +676 -0
- package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/vendored/internal-types.js +12 -0
- package/build/esm/integrations/tracing/mongo/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/vendored/semconv.js +14 -0
- package/build/esm/integrations/tracing/mongo/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose/index.js +25 -0
- package/build/esm/integrations/tracing/mongoose/index.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js +371 -0
- package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose/vendored/semconv.js +12 -0
- package/build/esm/integrations/tracing/mongoose/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose/vendored/utils.js +83 -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/AttributeNames.js +7 -0
- package/build/esm/integrations/tracing/mysql/vendored/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js +276 -0
- package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mysql/vendored/semconv.js +12 -0
- package/build/esm/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/mysql/vendored/utils.js +55 -0
- package/build/esm/integrations/tracing/mysql/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/index.js +25 -0
- package/build/esm/integrations/tracing/mysql2/index.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js +171 -0
- package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/vendored/semconv.js +11 -0
- package/build/esm/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/vendored/utils.js +91 -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 +17 -41
- package/build/esm/integrations/tracing/openai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/postgres/index.js +28 -0
- package/build/esm/integrations/tracing/postgres/index.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js +10 -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 +434 -0
- package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/internal-types.js +4 -0
- package/build/esm/integrations/tracing/postgres/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/semconv.js +17 -0
- package/build/esm/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/utils.js +257 -0
- package/build/esm/integrations/tracing/postgres/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/postgresjs.js +66 -181
- package/build/esm/integrations/tracing/postgresjs.js.map +1 -1
- package/build/esm/integrations/tracing/prisma/index.js +120 -0
- package/build/esm/integrations/tracing/prisma/index.js.map +1 -0
- package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js +117 -0
- package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -0
- package/build/esm/integrations/tracing/prisma/vendored/constants.js +9 -0
- package/build/esm/integrations/tracing/prisma/vendored/constants.js.map +1 -0
- package/build/esm/integrations/tracing/prisma/vendored/global.js +24 -0
- package/build/esm/integrations/tracing/prisma/vendored/global.js.map +1 -0
- package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js +36 -0
- package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/redis/index.js +15 -72
- package/build/esm/integrations/tracing/redis/index.js.map +1 -1
- package/build/esm/integrations/tracing/redis/redis-dc-subscriber.js +42 -77
- package/build/esm/integrations/tracing/redis/redis-dc-subscriber.js.map +1 -1
- package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js +53 -98
- package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/redis/vendored/redis-common.js +9 -49
- package/build/esm/integrations/tracing/redis/vendored/redis-common.js.map +1 -1
- package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js +175 -282
- package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/redis/vendored/semconv.js +7 -36
- package/build/esm/integrations/tracing/redis/vendored/semconv.js.map +1 -1
- package/build/esm/integrations/tracing/tedious/index.js +42 -0
- package/build/esm/integrations/tracing/tedious/index.js.map +1 -0
- package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js +202 -0
- package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/tedious/vendored/semconv.js +11 -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/utils/sql-common.js +41 -0
- package/build/esm/integrations/tracing/utils/sql-common.js.map +1 -0
- package/build/esm/integrations/tracing/vercelai/constants.js +1 -1
- package/build/esm/integrations/tracing/vercelai/index.js +3 -50
- package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/esm/integrations/tracing/vercelai/instrumentation.js +58 -157
- 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/index.js +6 -34
- package/build/esm/sdk/index.js.map +1 -1
- package/build/esm/sdk/initOtel.js +13 -51
- 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/types/integrations/{fs.d.ts → fs/index.d.ts} +1 -1
- 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 +15 -0
- package/build/types/integrations/fs/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/fs/vendored/types.d.ts +29 -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-ts3.8/integrations/tracing/amqplib.d.ts → types/integrations/tracing/amqplib/index.d.ts} +20 -20
- 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/amqplib.d.ts +26 -0
- package/build/types/integrations/tracing/amqplib/vendored/amqplib.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts +63 -0
- package/build/types/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts +41 -0
- package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/types.d.ts +130 -0
- package/build/types/integrations/tracing/amqplib/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts +35 -0
- package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{connect.d.ts → connect/index.d.ts} +2 -2
- package/build/types/integrations/tracing/connect/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +13 -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} +2 -2
- package/build/types/integrations/tracing/dataloader/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/dataloader/vendored/dataloader-types.d.ts +14 -0
- package/build/types/integrations/tracing/dataloader/vendored/dataloader-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts +21 -0
- package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/dataloader/vendored/types.d.ts +10 -0
- package/build/types/integrations/tracing/dataloader/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/fastify/vendored/instrumentation.d.ts +27 -0
- package/build/types/integrations/tracing/fastify/vendored/instrumentation.d.ts.map +1 -0
- package/build/{types-ts3.8/integrations/tracing/genericPool.d.ts → types/integrations/tracing/genericPool/index.d.ts} +20 -20
- 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 +10 -0
- package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +2 -2
- 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 +12 -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 +136 -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 +20 -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 +71 -0
- package/build/types/integrations/tracing/graphql/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/utils.d.ts +17 -0
- package/build/types/integrations/tracing/graphql/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/index.d.ts +1 -1
- package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +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/semconv.d.ts +13 -0
- package/build/types/integrations/tracing/hapi/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/vendored/utils.d.ts +19 -0
- package/build/types/integrations/tracing/hapi/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +2 -2
- package/build/types/integrations/tracing/kafka/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts +25 -0
- package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/internal-types.d.ts +9 -0
- package/build/types/integrations/tracing/kafka/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +111 -0
- package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/propagator.d.ts +3 -0
- package/build/types/integrations/tracing/kafka/vendored/propagator.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts +131 -0
- package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/types.d.ts +26 -0
- package/build/types/integrations/tracing/kafka/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/{knex.d.ts → knex/index.d.ts} +2 -2
- package/build/types/integrations/tracing/knex/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/constants.d.ts +3 -0
- package/build/types/integrations/tracing/knex/vendored/constants.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts +14 -0
- package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/semconv.d.ts +38 -0
- package/build/types/integrations/tracing/knex/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/types.d.ts +8 -0
- package/build/types/integrations/tracing/knex/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/utils.d.ts +15 -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} +2 -2
- 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 +50 -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/instrumentation.d.ts.map +1 -1
- package/build/{types-ts3.8/integrations/tracing/lrumemoizer.d.ts → types/integrations/tracing/lrumemoizer/index.d.ts} +19 -19
- 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/integrations/tracing/{mongo.d.ts → mongo/index.d.ts} +2 -2
- package/build/types/integrations/tracing/mongo/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts +79 -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 +121 -0
- package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongo/vendored/semconv.d.ts +107 -0
- package/build/types/integrations/tracing/mongo/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongo/vendored/types.d.ts +51 -0
- package/build/types/integrations/tracing/mongo/vendored/types.d.ts.map +1 -0
- package/build/{types-ts3.8/integrations/tracing/mongoose.d.ts → types/integrations/tracing/mongoose/index.d.ts} +20 -20
- package/build/types/integrations/tracing/mongoose/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +30 -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 +24 -0
- package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/vendored/semconv.d.ts +71 -0
- package/build/types/integrations/tracing/mongoose/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/vendored/types.d.ts +36 -0
- package/build/types/integrations/tracing/mongoose/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts +8 -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} +2 -2
- package/build/types/integrations/tracing/mysql/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/AttributeNames.d.ts +4 -0
- package/build/types/integrations/tracing/mysql/vendored/AttributeNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts +28 -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 +88 -0
- package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/types.d.ts +9 -0
- package/build/types/integrations/tracing/mysql/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/utils.d.ts +25 -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} +2 -2
- package/build/types/integrations/tracing/mysql2/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts +12 -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 +9 -0
- package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2/vendored/types.d.ts +18 -0
- package/build/types/integrations/tracing/mysql2/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts +27 -0
- package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +2 -2
- package/build/types/integrations/tracing/postgres/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +7 -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 +20 -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 +35 -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 +112 -0
- package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/types.d.ts +65 -0
- package/build/types/integrations/tracing/postgres/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/utils.d.ts +69 -0
- package/build/types/integrations/tracing/postgres/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{prisma.d.ts → prisma/index.d.ts} +2 -2
- package/build/types/integrations/tracing/prisma/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts +18 -0
- package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/constants.d.ts +5 -0
- package/build/types/integrations/tracing/prisma/vendored/constants.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/global.d.ts +5 -0
- package/build/types/integrations/tracing/prisma/vendored/global.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts +17 -0
- package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/types.d.ts +52 -0
- package/build/types/integrations/tracing/prisma/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/v5-tracing-helper.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/v6-tracing-helper.d.ts.map +1 -0
- package/build/types/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +2 -2
- package/build/types/integrations/tracing/tedious/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts +22 -0
- package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts +80 -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/types.d.ts +10 -0
- package/build/types/integrations/tracing/tedious/vendored/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/utils/sql-common.d.ts +3 -0
- package/build/types/integrations/tracing/utils/sql-common.d.ts.map +1 -0
- package/build/types-ts3.8/integrations/{fs.d.ts → fs/index.d.ts} +1 -1
- package/build/types-ts3.8/integrations/fs/vendored/constants.d.ts +5 -0
- package/build/types-ts3.8/integrations/fs/vendored/instrumentation.d.ts +15 -0
- package/build/types-ts3.8/integrations/fs/vendored/types.d.ts +29 -0
- package/build/types-ts3.8/integrations/fs/vendored/utils.d.ts +15 -0
- package/build/{types/integrations/tracing/amqplib.d.ts → types-ts3.8/integrations/tracing/amqplib/index.d.ts} +20 -20
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +44 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib.d.ts +26 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts +63 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv.d.ts +41 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/types.d.ts +130 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/utils.d.ts +35 -0
- package/build/types-ts3.8/integrations/tracing/{connect.d.ts → connect/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +13 -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} +2 -2
- package/build/types-ts3.8/integrations/tracing/dataloader/vendored/dataloader-types.d.ts +14 -0
- package/build/types-ts3.8/integrations/tracing/dataloader/vendored/instrumentation.d.ts +21 -0
- package/build/types-ts3.8/integrations/tracing/dataloader/vendored/types.d.ts +10 -0
- package/build/types-ts3.8/integrations/tracing/fastify/vendored/instrumentation.d.ts +27 -0
- package/build/{types/integrations/tracing/genericPool.d.ts → types-ts3.8/integrations/tracing/genericPool/index.d.ts} +20 -20
- 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 +10 -0
- package/build/types-ts3.8/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +2 -2
- 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 +12 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/graphql-types.d.ts +136 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/instrumentation.d.ts +20 -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 +71 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/utils.d.ts +17 -0
- package/build/types-ts3.8/integrations/tracing/hapi/index.d.ts +1 -1
- 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/semconv.d.ts +13 -0
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/utils.d.ts +19 -0
- package/build/types-ts3.8/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/instrumentation.d.ts +25 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/internal-types.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +111 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/propagator.d.ts +3 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/semconv.d.ts +131 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/types.d.ts +26 -0
- package/build/types-ts3.8/integrations/tracing/{knex.d.ts → knex/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/knex/vendored/constants.d.ts +3 -0
- package/build/types-ts3.8/integrations/tracing/knex/vendored/instrumentation.d.ts +14 -0
- package/build/types-ts3.8/integrations/tracing/knex/vendored/semconv.d.ts +38 -0
- package/build/types-ts3.8/integrations/tracing/knex/vendored/types.d.ts +8 -0
- package/build/types-ts3.8/integrations/tracing/knex/vendored/utils.d.ts +15 -0
- package/build/types-ts3.8/integrations/tracing/{koa.d.ts → koa/index.d.ts} +2 -2
- 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 +50 -0
- package/build/types-ts3.8/integrations/tracing/koa/vendored/utils.d.ts +15 -0
- package/build/{types/integrations/tracing/lrumemoizer.d.ts → types-ts3.8/integrations/tracing/lrumemoizer/index.d.ts} +19 -19
- package/build/types-ts3.8/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
- package/build/types-ts3.8/integrations/tracing/{mongo.d.ts → mongo/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/instrumentation.d.ts +79 -0
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/internal-types.d.ts +121 -0
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/semconv.d.ts +107 -0
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/types.d.ts +51 -0
- package/build/{types/integrations/tracing/mongoose.d.ts → types-ts3.8/integrations/tracing/mongoose/index.d.ts} +20 -20
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +30 -0
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose.d.ts +24 -0
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/semconv.d.ts +71 -0
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/types.d.ts +36 -0
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/utils.d.ts +8 -0
- package/build/types-ts3.8/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/AttributeNames.d.ts +4 -0
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/instrumentation.d.ts +28 -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 +88 -0
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/types.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/utils.d.ts +25 -0
- package/build/types-ts3.8/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/instrumentation.d.ts +12 -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 +9 -0
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/types.d.ts +18 -0
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/utils.d.ts +27 -0
- package/build/types-ts3.8/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +7 -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 +20 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/internal-types.d.ts +35 -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 +112 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/types.d.ts +65 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/utils.d.ts +69 -0
- package/build/types-ts3.8/integrations/tracing/{prisma.d.ts → prisma/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts +18 -0
- package/build/types-ts3.8/integrations/tracing/prisma/vendored/constants.d.ts +5 -0
- package/build/types-ts3.8/integrations/tracing/prisma/vendored/global.d.ts +5 -0
- package/build/types-ts3.8/integrations/tracing/prisma/vendored/instrumentation.d.ts +17 -0
- package/build/types-ts3.8/integrations/tracing/prisma/vendored/types.d.ts +55 -0
- package/build/types-ts3.8/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/instrumentation.d.ts +22 -0
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/semconv.d.ts +80 -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/types.d.ts +10 -0
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/utils.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing/utils/sql-common.d.ts +3 -0
- package/package.json +4 -24
- 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 -207
- package/build/cjs/integrations/tracing/prisma.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 -204
- package/build/esm/integrations/tracing/prisma.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.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.map +0 -1
- package/build/types/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts.map +0 -1
- package/build/types/integrations/tracing/prisma.d.ts.map +0 -1
- package/build/types/integrations/tracing/tedious.d.ts.map +0 -1
- /package/build/types/integrations/tracing/prisma/{vendor → vendored}/v5-tracing-helper.d.ts +0 -0
- /package/build/types/integrations/tracing/prisma/{vendor → vendored}/v6-tracing-helper.d.ts +0 -0
- /package/build/types-ts3.8/integrations/tracing/prisma/{vendor → vendored}/v5-tracing-helper.d.ts +0 -0
- /package/build/types-ts3.8/integrations/tracing/prisma/{vendor → vendored}/v6-tracing-helper.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentation.js","sources":["../../../../../../src/integrations/tracing/mongo/vendored/instrumentation.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-mongodb\n * - Upstream version: @opentelemetry/instrumentation-mongodb@0.71.0\n */\n/* eslint-disable */\n\nimport { context, trace, Span, SpanKind, SpanStatusCode, UpDownCounter, type Attributes } from '@opentelemetry/api';\nimport {\n InstrumentationBase,\n InstrumentationNodeModuleDefinition,\n InstrumentationNodeModuleFile,\n isWrapped,\n safeExecuteInTheMiddle,\n SemconvStability,\n semconvStabilityFromStr,\n} from '@opentelemetry/instrumentation';\nimport {\n ATTR_DB_COLLECTION_NAME,\n ATTR_DB_NAMESPACE,\n ATTR_DB_OPERATION_NAME,\n ATTR_DB_QUERY_TEXT,\n ATTR_DB_SYSTEM_NAME,\n ATTR_SERVER_ADDRESS,\n ATTR_SERVER_PORT,\n} from '@opentelemetry/semantic-conventions';\nimport {\n ATTR_DB_CONNECTION_STRING,\n ATTR_DB_MONGODB_COLLECTION,\n ATTR_DB_NAME,\n ATTR_DB_OPERATION,\n ATTR_DB_STATEMENT,\n ATTR_DB_SYSTEM,\n ATTR_NET_PEER_NAME,\n ATTR_NET_PEER_PORT,\n DB_SYSTEM_NAME_VALUE_MONGODB,\n DB_SYSTEM_VALUE_MONGODB,\n METRIC_DB_CLIENT_CONNECTIONS_USAGE,\n} from './semconv';\nimport { MongoDBInstrumentationConfig, CommandResult } from './types';\nimport {\n CursorState,\n ServerSession,\n MongodbCommandType,\n MongoInternalCommand,\n MongodbNamespace,\n MongoInternalTopology,\n WireProtocolInternal,\n V4Connection,\n V4ConnectionPool,\n Replacer,\n} from './internal-types';\nimport { V4Connect, V4Session } from './internal-types';\nimport { SDK_VERSION } from '@sentry/core';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-mongodb';\n\nconst DEFAULT_CONFIG: MongoDBInstrumentationConfig = {\n requireParentSpan: true,\n};\n\n/** mongodb instrumentation plugin for OpenTelemetry */\nexport class MongoDBInstrumentation extends InstrumentationBase<MongoDBInstrumentationConfig> {\n private _netSemconvStability!: SemconvStability;\n private _dbSemconvStability!: SemconvStability;\n declare private _connectionsUsage: UpDownCounter;\n declare private _poolName: string;\n\n constructor(config: MongoDBInstrumentationConfig = {}) {\n super(PACKAGE_NAME, SDK_VERSION, { ...DEFAULT_CONFIG, ...config });\n this._setSemconvStabilityFromEnv();\n }\n\n // Used for testing.\n private _setSemconvStabilityFromEnv() {\n this._netSemconvStability = semconvStabilityFromStr('http', process.env.OTEL_SEMCONV_STABILITY_OPT_IN);\n this._dbSemconvStability = semconvStabilityFromStr('database', process.env.OTEL_SEMCONV_STABILITY_OPT_IN);\n }\n\n override setConfig(config: MongoDBInstrumentationConfig = {}) {\n super.setConfig({ ...DEFAULT_CONFIG, ...config });\n }\n\n override _updateMetricInstruments() {\n this._connectionsUsage = this.meter.createUpDownCounter(METRIC_DB_CLIENT_CONNECTIONS_USAGE, {\n description: 'The number of connections that are currently in state described by the state attribute.',\n unit: '{connection}',\n });\n }\n\n /**\n * Convenience function for updating the `db.client.connections.usage` metric.\n * The name \"count\" comes from the eventual replacement for this metric per\n * https://opentelemetry.io/docs/specs/semconv/non-normative/db-migration/#database-client-connection-count\n */\n private _connCountAdd(n: number, poolName: string, state: string) {\n this._connectionsUsage?.add(n, { 'pool.name': poolName, state });\n }\n\n init() {\n const { v3PatchConnection: v3PatchConnection, v3UnpatchConnection: v3UnpatchConnection } =\n this._getV3ConnectionPatches();\n\n const { v4PatchConnect, v4UnpatchConnect } = this._getV4ConnectPatches();\n const { v4PatchConnectionCallback, v4PatchConnectionPromise, v4UnpatchConnection } = this._getV4ConnectionPatches();\n const { v4PatchConnectionPool, v4UnpatchConnectionPool } = this._getV4ConnectionPoolPatches();\n const { v4PatchSessions, v4UnpatchSessions } = this._getV4SessionsPatches();\n\n return [\n new InstrumentationNodeModuleDefinition('mongodb', ['>=3.3.0 <4'], undefined, undefined, [\n new InstrumentationNodeModuleFile(\n 'mongodb/lib/core/wireprotocol/index.js',\n ['>=3.3.0 <4'],\n v3PatchConnection,\n v3UnpatchConnection,\n ),\n ]),\n new InstrumentationNodeModuleDefinition('mongodb', ['>=4.0.0 <8'], undefined, undefined, [\n new InstrumentationNodeModuleFile(\n 'mongodb/lib/cmap/connection.js',\n ['>=4.0.0 <6.4'],\n v4PatchConnectionCallback,\n v4UnpatchConnection,\n ),\n new InstrumentationNodeModuleFile(\n 'mongodb/lib/cmap/connection.js',\n ['>=6.4.0 <8'],\n v4PatchConnectionPromise,\n v4UnpatchConnection,\n ),\n new InstrumentationNodeModuleFile(\n 'mongodb/lib/cmap/connection_pool.js',\n ['>=4.0.0 <6.4'],\n v4PatchConnectionPool,\n v4UnpatchConnectionPool,\n ),\n new InstrumentationNodeModuleFile(\n 'mongodb/lib/cmap/connect.js',\n ['>=4.0.0 <8'],\n v4PatchConnect,\n v4UnpatchConnect,\n ),\n new InstrumentationNodeModuleFile(\n 'mongodb/lib/sessions.js',\n ['>=4.0.0 <8'],\n v4PatchSessions,\n v4UnpatchSessions,\n ),\n ]),\n ];\n }\n\n private _getV3ConnectionPatches<T extends WireProtocolInternal>() {\n return {\n v3PatchConnection: (moduleExports: T) => {\n // patch insert operation\n if (isWrapped(moduleExports.insert)) {\n this._unwrap(moduleExports, 'insert');\n }\n this._wrap(moduleExports, 'insert', this._getV3PatchOperation('insert'));\n // patch remove operation\n if (isWrapped(moduleExports.remove)) {\n this._unwrap(moduleExports, 'remove');\n }\n this._wrap(moduleExports, 'remove', this._getV3PatchOperation('remove'));\n // patch update operation\n if (isWrapped(moduleExports.update)) {\n this._unwrap(moduleExports, 'update');\n }\n this._wrap(moduleExports, 'update', this._getV3PatchOperation('update'));\n // patch other command\n if (isWrapped(moduleExports.command)) {\n this._unwrap(moduleExports, 'command');\n }\n this._wrap(moduleExports, 'command', this._getV3PatchCommand());\n // patch query\n if (isWrapped(moduleExports.query)) {\n this._unwrap(moduleExports, 'query');\n }\n this._wrap(moduleExports, 'query', this._getV3PatchFind());\n // patch get more operation on cursor\n if (isWrapped(moduleExports.getMore)) {\n this._unwrap(moduleExports, 'getMore');\n }\n this._wrap(moduleExports, 'getMore', this._getV3PatchCursor());\n return moduleExports;\n },\n v3UnpatchConnection: (moduleExports?: T) => {\n if (moduleExports === undefined) return;\n this._unwrap(moduleExports, 'insert');\n this._unwrap(moduleExports, 'remove');\n this._unwrap(moduleExports, 'update');\n this._unwrap(moduleExports, 'command');\n this._unwrap(moduleExports, 'query');\n this._unwrap(moduleExports, 'getMore');\n },\n };\n }\n\n private _getV4SessionsPatches<T extends V4Session>() {\n return {\n v4PatchSessions: (moduleExports: any) => {\n if (isWrapped(moduleExports.acquire)) {\n this._unwrap(moduleExports, 'acquire');\n }\n this._wrap(moduleExports.ServerSessionPool.prototype, 'acquire', this._getV4AcquireCommand());\n\n if (isWrapped(moduleExports.release)) {\n this._unwrap(moduleExports, 'release');\n }\n this._wrap(moduleExports.ServerSessionPool.prototype, 'release', this._getV4ReleaseCommand());\n return moduleExports;\n },\n v4UnpatchSessions: (moduleExports?: T) => {\n if (moduleExports === undefined) return;\n if (isWrapped(moduleExports.acquire)) {\n this._unwrap(moduleExports, 'acquire');\n }\n if (isWrapped(moduleExports.release)) {\n this._unwrap(moduleExports, 'release');\n }\n },\n };\n }\n\n private _getV4AcquireCommand() {\n const instrumentation = this;\n return (original: V4Session['acquire']) => {\n return function patchAcquire(this: any) {\n const nSessionsBeforeAcquire = this.sessions.length;\n const session = original.call(this);\n const nSessionsAfterAcquire = this.sessions.length;\n\n if (nSessionsBeforeAcquire === nSessionsAfterAcquire) {\n //no session in the pool. a new session was created and used\n instrumentation._connCountAdd(1, instrumentation._poolName, 'used');\n } else if (nSessionsBeforeAcquire - 1 === nSessionsAfterAcquire) {\n //a session was already in the pool. remove it from the pool and use it.\n instrumentation._connCountAdd(-1, instrumentation._poolName, 'idle');\n instrumentation._connCountAdd(1, instrumentation._poolName, 'used');\n }\n return session;\n };\n };\n }\n\n private _getV4ReleaseCommand() {\n const instrumentation = this;\n return (original: V4Session['release']) => {\n return function patchRelease(this: any, session: ServerSession) {\n const cmdPromise = original.call(this, session);\n\n instrumentation._connCountAdd(-1, instrumentation._poolName, 'used');\n instrumentation._connCountAdd(1, instrumentation._poolName, 'idle');\n return cmdPromise;\n };\n };\n }\n\n private _getV4ConnectionPoolPatches<T extends V4ConnectionPool>() {\n return {\n v4PatchConnectionPool: (moduleExports: any) => {\n const poolPrototype = moduleExports.ConnectionPool.prototype;\n\n if (isWrapped(poolPrototype.checkOut)) {\n this._unwrap(poolPrototype, 'checkOut');\n }\n\n this._wrap(poolPrototype, 'checkOut', this._getV4ConnectionPoolCheckOut());\n return moduleExports;\n },\n v4UnpatchConnectionPool: (moduleExports?: any) => {\n if (moduleExports === undefined) return;\n\n this._unwrap(moduleExports.ConnectionPool.prototype, 'checkOut');\n },\n };\n }\n\n private _getV4ConnectPatches<T extends V4Connect>() {\n return {\n v4PatchConnect: (moduleExports: any) => {\n if (isWrapped(moduleExports.connect)) {\n this._unwrap(moduleExports, 'connect');\n }\n\n this._wrap(moduleExports, 'connect', this._getV4ConnectCommand());\n return moduleExports;\n },\n v4UnpatchConnect: (moduleExports?: T) => {\n if (moduleExports === undefined) return;\n\n this._unwrap(moduleExports, 'connect');\n },\n };\n }\n\n // This patch will become unnecessary once\n // https://jira.mongodb.org/browse/NODE-5639 is done.\n private _getV4ConnectionPoolCheckOut() {\n return (original: V4ConnectionPool['checkOut']) => {\n return function patchedCheckout(this: unknown, callback: any) {\n const patchedCallback = context.bind(context.active(), callback);\n return original.call(this, patchedCallback);\n };\n };\n }\n\n private _getV4ConnectCommand() {\n const instrumentation = this;\n\n return (original: V4Connect['connectCallback'] | V4Connect['connectPromise']) => {\n return function patchedConnect(this: unknown, options: any, callback: any) {\n // from v6.4 `connect` method only accepts an options param and returns a promise\n // with the connection\n if (original.length === 1) {\n const result = (original as V4Connect['connectPromise']).call(this, options);\n if (result && typeof result.then === 'function') {\n result.then(\n () => instrumentation.setPoolName(options),\n // this handler is set to pass the lint rules\n () => undefined,\n );\n }\n return result;\n }\n\n // Earlier versions expects a callback param and return void\n const patchedCallback = function (err: any, conn: any) {\n if (err || !conn) {\n callback(err, conn);\n return;\n }\n instrumentation.setPoolName(options);\n callback(err, conn);\n };\n\n return (original as V4Connect['connectCallback']).call(this, options, patchedCallback);\n };\n };\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n private _getV4ConnectionPatches<T extends V4Connection>() {\n return {\n v4PatchConnectionCallback: (moduleExports: any) => {\n // patch insert operation\n if (isWrapped(moduleExports.Connection.prototype.command)) {\n this._unwrap(moduleExports.Connection.prototype, 'command');\n }\n\n this._wrap(moduleExports.Connection.prototype, 'command', this._getV4PatchCommandCallback());\n return moduleExports;\n },\n v4PatchConnectionPromise: (moduleExports: any) => {\n // patch insert operation\n if (isWrapped(moduleExports.Connection.prototype.command)) {\n this._unwrap(moduleExports.Connection.prototype, 'command');\n }\n\n this._wrap(moduleExports.Connection.prototype, 'command', this._getV4PatchCommandPromise());\n return moduleExports;\n },\n v4UnpatchConnection: (moduleExports?: any) => {\n if (moduleExports === undefined) return;\n this._unwrap(moduleExports.Connection.prototype, 'command');\n },\n };\n }\n\n /** Creates spans for common operations */\n private _getV3PatchOperation(operationName: 'insert' | 'update' | 'remove') {\n const instrumentation = this;\n return (original: WireProtocolInternal[typeof operationName]) => {\n return function patchedServerCommand(\n this: unknown,\n server: MongoInternalTopology,\n ns: string,\n ops: unknown[],\n options: unknown | Function,\n callback?: Function,\n ) {\n const currentSpan = trace.getSpan(context.active());\n const skipInstrumentation = instrumentation._checkSkipInstrumentation(currentSpan);\n\n const resultHandler = typeof options === 'function' ? options : callback;\n if (skipInstrumentation || typeof resultHandler !== 'function' || typeof ops !== 'object') {\n if (typeof options === 'function') {\n return original.call(this, server, ns, ops, options);\n } else {\n return original.call(this, server, ns, ops, options, callback);\n }\n }\n\n const attributes = instrumentation._getV3SpanAttributes(\n ns,\n server,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n ops[0] as any,\n operationName,\n );\n const spanName = instrumentation._spanNameFromAttrs(attributes);\n const span = instrumentation.tracer.startSpan(spanName, {\n kind: SpanKind.CLIENT,\n attributes,\n });\n\n const patchedCallback = instrumentation._patchEnd(span, resultHandler);\n // handle when options is the callback to send the correct number of args\n if (typeof options === 'function') {\n return original.call(this, server, ns, ops, patchedCallback);\n } else {\n return original.call(this, server, ns, ops, options, patchedCallback);\n }\n };\n };\n }\n\n /** Creates spans for command operation */\n private _getV3PatchCommand() {\n const instrumentation = this;\n return (original: WireProtocolInternal['command']) => {\n return function patchedServerCommand(\n this: unknown,\n server: MongoInternalTopology,\n ns: string,\n cmd: MongoInternalCommand,\n options: unknown | Function,\n callback?: Function,\n ) {\n const currentSpan = trace.getSpan(context.active());\n const skipInstrumentation = instrumentation._checkSkipInstrumentation(currentSpan);\n\n const resultHandler = typeof options === 'function' ? options : callback;\n\n if (skipInstrumentation || typeof resultHandler !== 'function' || typeof cmd !== 'object') {\n if (typeof options === 'function') {\n return original.call(this, server, ns, cmd, options);\n } else {\n return original.call(this, server, ns, cmd, options, callback);\n }\n }\n\n const commandType = MongoDBInstrumentation._getCommandType(cmd);\n const operationName = commandType === MongodbCommandType.UNKNOWN ? undefined : commandType;\n const attributes = instrumentation._getV3SpanAttributes(ns, server, cmd, operationName);\n const spanName = instrumentation._spanNameFromAttrs(attributes);\n const span = instrumentation.tracer.startSpan(spanName, {\n kind: SpanKind.CLIENT,\n attributes,\n });\n\n const patchedCallback = instrumentation._patchEnd(span, resultHandler);\n // handle when options is the callback to send the correct number of args\n if (typeof options === 'function') {\n return original.call(this, server, ns, cmd, patchedCallback);\n } else {\n return original.call(this, server, ns, cmd, options, patchedCallback);\n }\n };\n };\n }\n\n /** Creates spans for command operation */\n private _getV4PatchCommandCallback() {\n const instrumentation = this;\n return (original: V4Connection['commandCallback']) => {\n return function patchedV4ServerCommand(\n this: any,\n ns: MongodbNamespace,\n cmd: any,\n options: undefined | unknown,\n callback: any,\n ) {\n const currentSpan = trace.getSpan(context.active());\n const skipInstrumentation = instrumentation._checkSkipInstrumentation(currentSpan);\n const resultHandler = callback;\n const commandType = Object.keys(cmd)[0];\n\n if (typeof cmd !== 'object' || cmd.ismaster || cmd.hello) {\n return original.call(this, ns, cmd, options, callback);\n }\n\n let span = undefined;\n if (!skipInstrumentation) {\n const attributes = instrumentation._getV4SpanAttributes(this, ns, cmd, commandType);\n const spanName = instrumentation._spanNameFromAttrs(attributes);\n span = instrumentation.tracer.startSpan(spanName, {\n kind: SpanKind.CLIENT,\n attributes,\n });\n }\n const patchedCallback = instrumentation._patchEnd(span, resultHandler, this.id, commandType);\n\n return original.call(this, ns, cmd, options, patchedCallback);\n };\n };\n }\n\n private _getV4PatchCommandPromise() {\n const instrumentation = this;\n return (original: V4Connection['commandPromise']) => {\n return function patchedV4ServerCommand(this: any, ...args: Parameters<V4Connection['commandPromise']>) {\n const [ns, cmd] = args;\n const currentSpan = trace.getSpan(context.active());\n const skipInstrumentation = instrumentation._checkSkipInstrumentation(currentSpan);\n\n const commandType = Object.keys(cmd)[0];\n const resultHandler = () => undefined;\n\n if (typeof cmd !== 'object' || cmd.ismaster || cmd.hello) {\n return original.apply(this, args);\n }\n\n let span = undefined;\n if (!skipInstrumentation) {\n const attributes = instrumentation._getV4SpanAttributes(this, ns, cmd, commandType);\n const spanName = instrumentation._spanNameFromAttrs(attributes);\n span = instrumentation.tracer.startSpan(spanName, {\n kind: SpanKind.CLIENT,\n attributes,\n });\n }\n\n const patchedCallback = instrumentation._patchEnd(span, resultHandler, this.id, commandType);\n\n const result = original.apply(this, args);\n result.then(\n (res: any) => patchedCallback(null, res),\n (err: any) => patchedCallback(err),\n );\n\n return result;\n };\n };\n }\n\n /** Creates spans for find operation */\n private _getV3PatchFind() {\n const instrumentation = this;\n return (original: WireProtocolInternal['query']) => {\n return function patchedServerCommand(\n this: unknown,\n server: MongoInternalTopology,\n ns: string,\n cmd: MongoInternalCommand,\n cursorState: CursorState,\n options: unknown | Function,\n callback?: Function,\n ) {\n const currentSpan = trace.getSpan(context.active());\n const skipInstrumentation = instrumentation._checkSkipInstrumentation(currentSpan);\n const resultHandler = typeof options === 'function' ? options : callback;\n\n if (skipInstrumentation || typeof resultHandler !== 'function' || typeof cmd !== 'object') {\n if (typeof options === 'function') {\n return original.call(this, server, ns, cmd, cursorState, options);\n } else {\n return original.call(this, server, ns, cmd, cursorState, options, callback);\n }\n }\n\n const attributes = instrumentation._getV3SpanAttributes(ns, server, cmd, 'find');\n const spanName = instrumentation._spanNameFromAttrs(attributes);\n const span = instrumentation.tracer.startSpan(spanName, {\n kind: SpanKind.CLIENT,\n attributes,\n });\n\n const patchedCallback = instrumentation._patchEnd(span, resultHandler);\n // handle when options is the callback to send the correct number of args\n if (typeof options === 'function') {\n return original.call(this, server, ns, cmd, cursorState, patchedCallback);\n } else {\n return original.call(this, server, ns, cmd, cursorState, options, patchedCallback);\n }\n };\n };\n }\n\n /** Creates spans for find operation */\n private _getV3PatchCursor() {\n const instrumentation = this;\n return (original: WireProtocolInternal['getMore']) => {\n return function patchedServerCommand(\n this: unknown,\n server: MongoInternalTopology,\n ns: string,\n cursorState: CursorState,\n batchSize: number,\n options: unknown | Function,\n callback?: Function,\n ) {\n const currentSpan = trace.getSpan(context.active());\n const skipInstrumentation = instrumentation._checkSkipInstrumentation(currentSpan);\n\n const resultHandler = typeof options === 'function' ? options : callback;\n\n if (skipInstrumentation || typeof resultHandler !== 'function') {\n if (typeof options === 'function') {\n return original.call(this, server, ns, cursorState, batchSize, options);\n } else {\n return original.call(this, server, ns, cursorState, batchSize, options, callback);\n }\n }\n\n const attributes = instrumentation._getV3SpanAttributes(ns, server, cursorState.cmd, 'getMore');\n const spanName = instrumentation._spanNameFromAttrs(attributes);\n const span = instrumentation.tracer.startSpan(spanName, {\n kind: SpanKind.CLIENT,\n attributes,\n });\n\n const patchedCallback = instrumentation._patchEnd(span, resultHandler);\n // handle when options is the callback to send the correct number of args\n if (typeof options === 'function') {\n return original.call(this, server, ns, cursorState, batchSize, patchedCallback);\n } else {\n return original.call(this, server, ns, cursorState, batchSize, options, patchedCallback);\n }\n };\n };\n }\n\n /**\n * Get the mongodb command type from the object.\n * @param command Internal mongodb command object\n */\n private static _getCommandType(command: MongoInternalCommand): MongodbCommandType {\n if (command.createIndexes !== undefined) {\n return MongodbCommandType.CREATE_INDEXES;\n } else if (command.findandmodify !== undefined) {\n return MongodbCommandType.FIND_AND_MODIFY;\n } else if (command.ismaster !== undefined) {\n return MongodbCommandType.IS_MASTER;\n } else if (command.count !== undefined) {\n return MongodbCommandType.COUNT;\n } else if (command.aggregate !== undefined) {\n return MongodbCommandType.AGGREGATE;\n } else {\n return MongodbCommandType.UNKNOWN;\n }\n }\n\n /**\n * Determine a span's attributes by fetching related metadata from the context\n * @param connectionCtx mongodb internal connection context\n * @param ns mongodb namespace\n * @param command mongodb internal representation of a command\n */\n private _getV4SpanAttributes(\n connectionCtx: any,\n ns: MongodbNamespace,\n command?: any,\n operation?: string,\n ): Attributes {\n let host, port: undefined | string;\n if (connectionCtx) {\n const hostParts = typeof connectionCtx.address === 'string' ? connectionCtx.address.split(':') : '';\n if (hostParts.length === 2) {\n host = hostParts[0];\n port = hostParts[1];\n }\n }\n // capture parameters within the query as well if enhancedDatabaseReporting is enabled.\n let commandObj: Record<string, unknown>;\n if (command?.documents && command.documents[0]) {\n commandObj = command.documents[0];\n } else if (command?.cursors) {\n commandObj = command.cursors;\n } else {\n commandObj = command;\n }\n\n return this._getSpanAttributes(ns.db, ns.collection, host, port, commandObj, operation);\n }\n\n /**\n * Determine a span's attributes by fetching related metadata from the context\n * @param ns mongodb namespace\n * @param topology mongodb internal representation of the network topology\n * @param command mongodb internal representation of a command\n */\n private _getV3SpanAttributes(\n ns: string,\n topology: MongoInternalTopology,\n command?: MongoInternalCommand,\n operation?: string | undefined,\n ): Attributes {\n // Extract host/port info.\n let host: undefined | string;\n let port: undefined | string;\n if (topology && topology.s) {\n host = topology.s.options?.host ?? topology.s.host;\n port = (topology.s.options?.port ?? topology.s.port)?.toString();\n if (host == null || port == null) {\n const address = topology.description?.address;\n if (address) {\n const addressSegments = address.split(':');\n host = addressSegments[0];\n port = addressSegments[1];\n }\n }\n }\n\n // The namespace is a combination of the database name and the name of the\n // collection or index, like so: [database-name].[collection-or-index-name].\n // It could be a string or an instance of MongoDBNamespace, as such we\n // always coerce to a string to extract db and collection.\n const [dbName, dbCollection] = ns.toString().split('.');\n // capture parameters within the query as well if enhancedDatabaseReporting is enabled.\n const commandObj = command?.query ?? command?.q ?? command;\n\n return this._getSpanAttributes(dbName, dbCollection, host, port, commandObj, operation);\n }\n\n private _getSpanAttributes(\n dbName?: string,\n dbCollection?: string,\n host?: undefined | string,\n port?: undefined | string,\n commandObj?: any,\n operation?: string | undefined,\n ): Attributes {\n const attributes: Attributes = {};\n\n if (this._dbSemconvStability & SemconvStability.OLD) {\n attributes[ATTR_DB_SYSTEM] = DB_SYSTEM_VALUE_MONGODB;\n attributes[ATTR_DB_NAME] = dbName;\n attributes[ATTR_DB_MONGODB_COLLECTION] = dbCollection;\n attributes[ATTR_DB_OPERATION] = operation;\n attributes[ATTR_DB_CONNECTION_STRING] = `mongodb://${host}:${port}/${dbName}`;\n }\n if (this._dbSemconvStability & SemconvStability.STABLE) {\n attributes[ATTR_DB_SYSTEM_NAME] = DB_SYSTEM_NAME_VALUE_MONGODB;\n attributes[ATTR_DB_NAMESPACE] = dbName;\n attributes[ATTR_DB_OPERATION_NAME] = operation;\n attributes[ATTR_DB_COLLECTION_NAME] = dbCollection;\n }\n\n if (host && port) {\n if (this._netSemconvStability & SemconvStability.OLD) {\n attributes[ATTR_NET_PEER_NAME] = host;\n }\n if (this._netSemconvStability & SemconvStability.STABLE) {\n attributes[ATTR_SERVER_ADDRESS] = host;\n }\n const portNumber = parseInt(port, 10);\n if (!isNaN(portNumber)) {\n if (this._netSemconvStability & SemconvStability.OLD) {\n attributes[ATTR_NET_PEER_PORT] = portNumber;\n }\n if (this._netSemconvStability & SemconvStability.STABLE) {\n attributes[ATTR_SERVER_PORT] = portNumber;\n }\n }\n }\n\n if (commandObj) {\n const { dbStatementSerializer: configDbStatementSerializer } = this.getConfig();\n const dbStatementSerializer =\n typeof configDbStatementSerializer === 'function'\n ? configDbStatementSerializer\n : this._defaultDbStatementSerializer.bind(this);\n\n safeExecuteInTheMiddle(\n () => {\n const query = dbStatementSerializer(commandObj);\n if (this._dbSemconvStability & SemconvStability.OLD) {\n attributes[ATTR_DB_STATEMENT] = query;\n }\n if (this._dbSemconvStability & SemconvStability.STABLE) {\n attributes[ATTR_DB_QUERY_TEXT] = query;\n }\n },\n err => {\n if (err) {\n this._diag.error('Error running dbStatementSerializer hook', err);\n }\n },\n true,\n );\n }\n\n return attributes;\n }\n\n private _spanNameFromAttrs(attributes: Attributes): string {\n let spanName;\n if (this._dbSemconvStability & SemconvStability.STABLE) {\n // https://opentelemetry.io/docs/specs/semconv/database/database-spans/#name\n spanName =\n [attributes[ATTR_DB_OPERATION_NAME], attributes[ATTR_DB_COLLECTION_NAME]].filter(attr => attr).join(' ') ||\n DB_SYSTEM_NAME_VALUE_MONGODB;\n } else {\n spanName = `mongodb.${attributes[ATTR_DB_OPERATION] || 'command'}`;\n }\n return spanName;\n }\n\n private _getDefaultDbStatementReplacer(): Replacer {\n const seen = new WeakSet();\n return (_key, value) => {\n // undefined, boolean, number, bigint, string, symbol, function || null\n if (typeof value !== 'object' || !value) return '?';\n\n // objects (including arrays)\n if (seen.has(value)) return '[Circular]';\n seen.add(value);\n return value;\n };\n }\n\n private _defaultDbStatementSerializer(commandObj: Record<string, unknown>) {\n const { enhancedDatabaseReporting } = this.getConfig();\n\n if (enhancedDatabaseReporting) {\n return JSON.stringify(commandObj);\n }\n\n return JSON.stringify(commandObj, this._getDefaultDbStatementReplacer());\n }\n\n /**\n * Triggers the response hook in case it is defined.\n * @param span The span to add the results to.\n * @param result The command result\n */\n private _handleExecutionResult(span: Span, result: CommandResult) {\n const { responseHook } = this.getConfig();\n if (typeof responseHook === 'function') {\n safeExecuteInTheMiddle(\n () => {\n responseHook(span, { data: result });\n },\n err => {\n if (err) {\n this._diag.error('Error running response hook', err);\n }\n },\n true,\n );\n }\n }\n\n /**\n * Ends a created span.\n * @param span The created span to end.\n * @param resultHandler A callback function.\n * @param connectionId: The connection ID of the Command response.\n */\n private _patchEnd(\n span: Span | undefined,\n resultHandler: Function,\n connectionId?: number,\n commandType?: string,\n ): Function {\n // mongodb is using \"tick\" when calling a callback, this way the context\n // in final callback (resultHandler) is lost\n const activeContext = context.active();\n const instrumentation = this;\n let spanEnded = false;\n\n return function patchedEnd(this: {}, ...args: unknown[]) {\n if (!spanEnded) {\n spanEnded = true;\n const error = args[0];\n if (span) {\n if (error instanceof Error) {\n span.setStatus({\n code: SpanStatusCode.ERROR,\n message: error.message,\n });\n } else {\n const result = args[1] as CommandResult;\n instrumentation._handleExecutionResult(span, result);\n }\n span.end();\n }\n\n if (commandType === 'endSessions') {\n instrumentation._connCountAdd(-1, instrumentation._poolName, 'idle');\n }\n }\n\n return context.with(activeContext, () => {\n return resultHandler.apply(this, args);\n });\n };\n }\n private setPoolName(options: any) {\n const host = options.hostAddress?.host;\n const port = options.hostAddress?.port;\n const database = options.dbName;\n const poolName = `mongodb://${host}:${port}/${database}`;\n this._poolName = poolName;\n }\n\n private _checkSkipInstrumentation(currentSpan: Span | undefined) {\n const requireParentSpan = this.getConfig().requireParentSpan;\n const hasNoParentSpan = currentSpan === undefined;\n return requireParentSpan === true && hasNoParentSpan;\n }\n}\n"],"names":["InstrumentationBase","SDK_VERSION","semconvStabilityFromStr","METRIC_DB_CLIENT_CONNECTIONS_USAGE","InstrumentationNodeModuleDefinition","InstrumentationNodeModuleFile","isWrapped","context","trace","SpanKind","MongodbCommandType","SemconvStability","ATTR_DB_SYSTEM","DB_SYSTEM_VALUE_MONGODB","ATTR_DB_NAME","ATTR_DB_MONGODB_COLLECTION","ATTR_DB_OPERATION","ATTR_DB_CONNECTION_STRING","ATTR_DB_SYSTEM_NAME","DB_SYSTEM_NAME_VALUE_MONGODB","ATTR_DB_NAMESPACE","ATTR_DB_OPERATION_NAME","ATTR_DB_COLLECTION_NAME","ATTR_NET_PEER_NAME","ATTR_SERVER_ADDRESS","ATTR_NET_PEER_PORT","ATTR_SERVER_PORT","safeExecuteInTheMiddle","ATTR_DB_STATEMENT","ATTR_DB_QUERY_TEXT","SpanStatusCode"],"mappings":";;;;;;;;;AAqEA,MAAM,YAAA,GAAe,iCAAA;AAErB,MAAM,cAAA,GAA+C;AAAA,EACnD,iBAAA,EAAmB;AACrB,CAAA;AAGO,MAAM,+BAA+BA,mCAAA,CAAkD;AAAA,EAM5F,WAAA,CAAY,MAAA,GAAuC,EAAC,EAAG;AACrD,IAAA,KAAA,CAAM,cAAcC,gBAAA,EAAa,EAAE,GAAG,cAAA,EAAgB,GAAG,QAAQ,CAAA;AACjE,IAAA,IAAA,CAAK,2BAAA,EAA4B;AAAA,EACnC;AAAA;AAAA,EAGQ,2BAAA,GAA8B;AACpC,IAAA,IAAA,CAAK,oBAAA,GAAuBC,uCAAA,CAAwB,MAAA,EAAQ,OAAA,CAAQ,IAAI,6BAA6B,CAAA;AACrG,IAAA,IAAA,CAAK,mBAAA,GAAsBA,uCAAA,CAAwB,UAAA,EAAY,OAAA,CAAQ,IAAI,6BAA6B,CAAA;AAAA,EAC1G;AAAA,EAES,SAAA,CAAU,MAAA,GAAuC,EAAC,EAAG;AAC5D,IAAA,KAAA,CAAM,UAAU,EAAE,GAAG,cAAA,EAAgB,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AAA,CAAQ,IAAA,CAAK,aAAA,EAAe,MAAM;AACvC,QAAA,OAAO,aAAA,CAAc,KAAA,CAAM,IAAA,EAAM,IAAI,CAAA;AAAA,MACvC,CAAC,CAAA;AAAA,IACH,CAAA;AAAA,EACF;AAAA,EACQ,YAAY,OAAA,EAAc;AAChC,IAAA,MAAM,IAAA,GAAO,QAAQ,WAAA,EAAa,IAAA;AAClC,IAAA,MAAM,IAAA,GAAO,QAAQ,WAAA,EAAa,IAAA;AAClC,IAAA,MAAM,WAAW,OAAA,CAAQ,MAAA;AACzB,IAAA,MAAM,WAAW,CAAA,UAAA,EAAa,IAAI,CAAA,CAAA,EAAI,IAAI,IAAI,QAAQ,CAAA,CAAA;AACtD,IAAA,IAAA,CAAK,SAAA,GAAY,QAAA;AAAA,EACnB;AAAA,EAEQ,0BAA0B,WAAA,EAA+B;AAC/D,IAAA,MAAM,iBAAA,GAAoB,IAAA,CAAK,SAAA,EAAU,CAAE,iBAAA;AAC3C,IAAA,MAAM,kBAAkB,WAAA,KAAgB,MAAA;AACxC,IAAA,OAAO,sBAAsB,IAAA,IAAQ,eAAA;AAAA,EACvC;AACF;;;;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
var MongodbCommandType = /* @__PURE__ */ ((MongodbCommandType2) => {
|
|
4
|
+
MongodbCommandType2["CREATE_INDEXES"] = "createIndexes";
|
|
5
|
+
MongodbCommandType2["FIND_AND_MODIFY"] = "findAndModify";
|
|
6
|
+
MongodbCommandType2["IS_MASTER"] = "isMaster";
|
|
7
|
+
MongodbCommandType2["COUNT"] = "count";
|
|
8
|
+
MongodbCommandType2["AGGREGATE"] = "aggregate";
|
|
9
|
+
MongodbCommandType2["UNKNOWN"] = "unknown";
|
|
10
|
+
return MongodbCommandType2;
|
|
11
|
+
})(MongodbCommandType || {});
|
|
12
|
+
|
|
13
|
+
exports.MongodbCommandType = MongodbCommandType;
|
|
14
|
+
//# sourceMappingURL=internal-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-types.js","sources":["../../../../../../src/integrations/tracing/mongo/vendored/internal-types.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-mongodb\n * - Upstream version: @opentelemetry/instrumentation-mongodb@0.71.0\n */\n/* eslint-disable */\n\nimport { InstrumentationConfig } from '@opentelemetry/instrumentation';\nimport { Span } from '@opentelemetry/api';\n\nexport interface MongoDBInstrumentationExecutionResponseHook {\n (span: Span, responseInfo: MongoResponseHookInformation): void;\n}\n\n/**\n * Function that can be used to serialize db.statement tag\n * @param cmd - MongoDB command object\n *\n * @returns serialized string that will be used as the db.statement attribute.\n */\nexport type DbStatementSerializer = (cmd: Record<string, unknown>) => string;\n\nexport interface MongoDBInstrumentationConfig extends InstrumentationConfig {\n /**\n * If true, additional information about query parameters and\n * results will be attached (as `attributes`) to spans representing\n * database operations.\n */\n enhancedDatabaseReporting?: boolean;\n\n /**\n * Hook that allows adding custom span attributes based on the data\n * returned from MongoDB actions.\n *\n * @default undefined\n */\n responseHook?: MongoDBInstrumentationExecutionResponseHook;\n\n /**\n * Custom serializer function for the db.statement tag\n */\n dbStatementSerializer?: DbStatementSerializer;\n}\n\nexport type Func<T> = (...args: unknown[]) => T;\nexport type MongoInternalCommand = {\n findandmodify: boolean;\n createIndexes: boolean;\n count: boolean;\n aggregate: boolean;\n ismaster: boolean;\n indexes?: unknown[];\n query?: Record<string, unknown>;\n limit?: number;\n q?: Record<string, unknown>;\n u?: Record<string, unknown>;\n};\n\nexport type ServerSession = {\n id: any;\n lastUse: number;\n txnNumber: number;\n isDirty: boolean;\n};\n\nexport type CursorState = { cmd: MongoInternalCommand } & Record<string, unknown>;\n\nexport interface MongoResponseHookInformation {\n data: CommandResult;\n}\n\n// https://github.com/mongodb/node-mongodb-native/blob/3.6/lib/core/connection/command_result.js\nexport type CommandResult = {\n result?: unknown;\n connection?: unknown;\n message?: unknown;\n};\n\n// https://github.com/mongodb/node-mongodb-native/blob/3.6/lib/core/wireprotocol/index.js\nexport type WireProtocolInternal = {\n insert: (\n server: MongoInternalTopology,\n ns: string,\n ops: unknown[],\n options: unknown | Function,\n callback?: Function,\n ) => unknown;\n update: (\n server: MongoInternalTopology,\n ns: string,\n ops: unknown[],\n options: unknown | Function,\n callback?: Function,\n ) => unknown;\n remove: (\n server: MongoInternalTopology,\n ns: string,\n ops: unknown[],\n options: unknown | Function,\n callback?: Function,\n ) => unknown;\n killCursors: (server: MongoInternalTopology, ns: string, cursorState: CursorState, callback: Function) => unknown;\n getMore: (\n server: MongoInternalTopology,\n ns: string,\n cursorState: CursorState,\n batchSize: number,\n options: unknown | Function,\n callback?: Function,\n ) => unknown;\n query: (\n server: MongoInternalTopology,\n ns: string,\n cmd: MongoInternalCommand,\n cursorState: CursorState,\n options: unknown | Function,\n callback?: Function,\n ) => unknown;\n command: (\n server: MongoInternalTopology,\n ns: string,\n cmd: MongoInternalCommand,\n options: unknown | Function,\n callback?: Function,\n ) => unknown;\n};\n\n// https://github.com/mongodb/node-mongodb-native/blob/3.6/lib/topologies/server.js#L172\n// https://github.com/mongodb/node-mongodb-native/blob/2.2/lib/server.js#L174\nexport type MongoInternalTopology = {\n s?: {\n // those are for mongodb@3\n options?: {\n host?: string;\n port?: number;\n servername?: string;\n };\n // those are for mongodb@2\n host?: string;\n port?: number;\n };\n // mongodb@3 with useUnifiedTopology option\n description?: {\n address?: string;\n };\n};\n\nexport enum MongodbCommandType {\n CREATE_INDEXES = 'createIndexes',\n FIND_AND_MODIFY = 'findAndModify',\n IS_MASTER = 'isMaster',\n COUNT = 'count',\n AGGREGATE = 'aggregate',\n UNKNOWN = 'unknown',\n}\n\n// https://github.com/mongodb/js-bson/blob/main/src/bson.ts\nexport type Document = {\n [key: string]: any;\n};\n\n// https://github.com/mongodb/node-mongodb-native/blob/v6.4.0/src/utils.ts#L281\nexport interface MongodbNamespace {\n db: string;\n collection?: string;\n}\n\nexport type V4Connection = {\n command: Function;\n // From version 6.4.0 the method does not expect a callback and returns a promise\n // https://github.com/mongodb/node-mongodb-native/blob/v6.4.2/src/cmap/connection.ts\n commandPromise(\n ns: MongodbNamespace,\n cmd: Document,\n options: undefined | unknown,\n // From v6.6.0 we have this new param which is a constructor function\n // https://github.com/mongodb/node-mongodb-native/blob/v6.6.0/src/cmap/connection.ts#L588\n responseType: undefined | unknown,\n ): Promise<any>;\n // Earlier versions expect a callback param and return void\n // https://github.com/mongodb/node-mongodb-native/blob/v4.2.2/src/cmap/connection.ts\n commandCallback(ns: MongodbNamespace, cmd: Document, options: undefined | unknown, callback: any): void;\n};\n\n// https://github.com/mongodb/node-mongodb-native/blob/v4.2.2/src/cmap/connection_pool.ts\nexport type V4ConnectionPool = {\n // Instrumentation just cares about carrying the async context so\n // types of callback params are not needed\n checkOut: (callback: (error: any, connection: any) => void) => void;\n};\n\nexport type V4Connect = {\n connect: Function;\n // From version 6.4.0 the method does not expect a callback and returns a promise\n // https://github.com/mongodb/node-mongodb-native/blob/v6.4.0/src/cmap/connect.ts\n connectPromise: (options: any) => Promise<any>;\n // Earlier versions expect a callback param and return void\n // https://github.com/mongodb/node-mongodb-native/blob/v4.2.2/src/cmap/connect.ts\n connectCallback: (options: any, callback: any) => void;\n};\n\n// https://github.com/mongodb/node-mongodb-native/blob/v4.2.2/src/sessions.ts\nexport type V4Session = {\n acquire: () => ServerSession;\n release: (session: ServerSession) => void;\n};\n\n/**\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#replacer\n */\nexport type Replacer = (key: string, value: unknown) => unknown;\n"],"names":["MongodbCommandType"],"mappings":";;AAiKO,IAAK,kBAAA,qBAAAA,mBAAAA,KAAL;AACL,EAAAA,oBAAA,gBAAA,CAAA,GAAiB,eAAA;AACjB,EAAAA,oBAAA,iBAAA,CAAA,GAAkB,eAAA;AAClB,EAAAA,oBAAA,WAAA,CAAA,GAAY,UAAA;AACZ,EAAAA,oBAAA,OAAA,CAAA,GAAQ,OAAA;AACR,EAAAA,oBAAA,WAAA,CAAA,GAAY,WAAA;AACZ,EAAAA,oBAAA,SAAA,CAAA,GAAU,SAAA;AANA,EAAA,OAAAA,mBAAAA;AAAA,CAAA,EAAA,kBAAA,IAAA,EAAA;;;;"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const ATTR_DB_CONNECTION_STRING = "db.connection_string";
|
|
4
|
+
const ATTR_DB_MONGODB_COLLECTION = "db.mongodb.collection";
|
|
5
|
+
const ATTR_DB_NAME = "db.name";
|
|
6
|
+
const ATTR_DB_OPERATION = "db.operation";
|
|
7
|
+
const ATTR_DB_STATEMENT = "db.statement";
|
|
8
|
+
const ATTR_DB_SYSTEM = "db.system";
|
|
9
|
+
const ATTR_NET_PEER_NAME = "net.peer.name";
|
|
10
|
+
const ATTR_NET_PEER_PORT = "net.peer.port";
|
|
11
|
+
const DB_SYSTEM_NAME_VALUE_MONGODB = "mongodb";
|
|
12
|
+
const DB_SYSTEM_VALUE_MONGODB = "mongodb";
|
|
13
|
+
const METRIC_DB_CLIENT_CONNECTIONS_USAGE = "db.client.connections.usage";
|
|
14
|
+
|
|
15
|
+
exports.ATTR_DB_CONNECTION_STRING = ATTR_DB_CONNECTION_STRING;
|
|
16
|
+
exports.ATTR_DB_MONGODB_COLLECTION = ATTR_DB_MONGODB_COLLECTION;
|
|
17
|
+
exports.ATTR_DB_NAME = ATTR_DB_NAME;
|
|
18
|
+
exports.ATTR_DB_OPERATION = ATTR_DB_OPERATION;
|
|
19
|
+
exports.ATTR_DB_STATEMENT = ATTR_DB_STATEMENT;
|
|
20
|
+
exports.ATTR_DB_SYSTEM = ATTR_DB_SYSTEM;
|
|
21
|
+
exports.ATTR_NET_PEER_NAME = ATTR_NET_PEER_NAME;
|
|
22
|
+
exports.ATTR_NET_PEER_PORT = ATTR_NET_PEER_PORT;
|
|
23
|
+
exports.DB_SYSTEM_NAME_VALUE_MONGODB = DB_SYSTEM_NAME_VALUE_MONGODB;
|
|
24
|
+
exports.DB_SYSTEM_VALUE_MONGODB = DB_SYSTEM_VALUE_MONGODB;
|
|
25
|
+
exports.METRIC_DB_CLIENT_CONNECTIONS_USAGE = METRIC_DB_CLIENT_CONNECTIONS_USAGE;
|
|
26
|
+
//# sourceMappingURL=semconv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semconv.js","sources":["../../../../../../src/integrations/tracing/mongo/vendored/semconv.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-mongodb\n * - Upstream version: @opentelemetry/instrumentation-mongodb@0.71.0\n */\n/* eslint-disable */\n\n/*\n * This file contains a copy of unstable semantic convention definitions\n * used by this package.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n\n/**\n * Deprecated, use `server.address`, `server.port` attributes instead.\n *\n * @example \"Server=(localdb)\\\\v11.0;Integrated Security=true;\"\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.address` and `server.port`.\n */\nexport const ATTR_DB_CONNECTION_STRING = 'db.connection_string' as const;\n\n/**\n * Deprecated, use `db.collection.name` instead.\n *\n * @example \"mytable\"\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.collection.name`.\n */\nexport const ATTR_DB_MONGODB_COLLECTION = 'db.mongodb.collection' as const;\n\n/**\n * Deprecated, use `db.namespace` instead.\n *\n * @example customers\n * @example main\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.namespace`.\n */\nexport const ATTR_DB_NAME = 'db.name' as const;\n\n/**\n * Deprecated, use `db.operation.name` instead.\n *\n * @example findAndModify\n * @example HMSET\n * @example SELECT\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.operation.name`.\n */\nexport const ATTR_DB_OPERATION = 'db.operation' as const;\n\n/**\n * The database statement being executed.\n *\n * @example SELECT * FROM wuser_table\n * @example SET mykey \"WuValue\"\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.query.text`.\n */\nexport const ATTR_DB_STATEMENT = 'db.statement' as const;\n\n/**\n * Deprecated, use `db.system.name` instead.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.system.name`.\n */\nexport const ATTR_DB_SYSTEM = 'db.system' as const;\n\n/**\n * Deprecated, use `server.address` on client spans and `client.address` on server spans.\n *\n * @example example.com\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.address` on client spans and `client.address` on server spans.\n */\nexport const ATTR_NET_PEER_NAME = 'net.peer.name' as const;\n\n/**\n * Deprecated, use `server.port` on client spans and `client.port` on server spans.\n *\n * @example 8080\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.port` on client spans and `client.port` on server spans.\n */\nexport const ATTR_NET_PEER_PORT = 'net.peer.port' as const;\n\n/**\n * Enum value \"mongodb\" for attribute {@link ATTR_DB_SYSTEM_NAME}.\n *\n * [MongoDB](https://www.mongodb.com/)\n *\n * @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const DB_SYSTEM_NAME_VALUE_MONGODB = 'mongodb' as const;\n\n/**\n * Enum value \"mongodb\" for attribute {@link ATTR_DB_SYSTEM}.\n *\n * MongoDB\n *\n * @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const DB_SYSTEM_VALUE_MONGODB = 'mongodb' as const;\n\n/**\n * Deprecated, use `db.client.connection.count` instead.\n *\n * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.client.connection.count`.\n */\nexport const METRIC_DB_CLIENT_CONNECTIONS_USAGE = 'db.client.connections.usage' as const;\n"],"names":[],"mappings":";;AAoCO,MAAM,yBAAA,GAA4B;AAWlC,MAAM,0BAAA,GAA6B;AAYnC,MAAM,YAAA,GAAe;AAarB,MAAM,iBAAA,GAAoB;AAY1B,MAAM,iBAAA,GAAoB;AAS1B,MAAM,cAAA,GAAiB;AAWvB,MAAM,kBAAA,GAAqB;AAW3B,MAAM,kBAAA,GAAqB;AAS3B,MAAM,4BAAA,GAA+B;AASrC,MAAM,uBAAA,GAA0B;AAShC,MAAM,kCAAA,GAAqC;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const mongoose = require('./vendored/mongoose.js');
|
|
4
|
+
const core = require('@sentry/core');
|
|
5
|
+
const nodeCore = require('@sentry/node-core');
|
|
6
|
+
|
|
7
|
+
const INTEGRATION_NAME = "Mongoose";
|
|
8
|
+
const instrumentMongoose = nodeCore.generateInstrumentOnce(
|
|
9
|
+
INTEGRATION_NAME,
|
|
10
|
+
() => new mongoose.MongooseInstrumentation({
|
|
11
|
+
responseHook(span) {
|
|
12
|
+
nodeCore.addOriginToSpan(span, "auto.db.otel.mongoose");
|
|
13
|
+
}
|
|
14
|
+
})
|
|
15
|
+
);
|
|
16
|
+
const _mongooseIntegration = (() => {
|
|
17
|
+
return {
|
|
18
|
+
name: INTEGRATION_NAME,
|
|
19
|
+
setupOnce() {
|
|
20
|
+
instrumentMongoose();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
const mongooseIntegration = core.defineIntegration(_mongooseIntegration);
|
|
25
|
+
|
|
26
|
+
exports.instrumentMongoose = instrumentMongoose;
|
|
27
|
+
exports.mongooseIntegration = mongooseIntegration;
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/mongoose/index.ts"],"sourcesContent":["import { MongooseInstrumentation } from './vendored/mongoose';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport { addOriginToSpan, generateInstrumentOnce } from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'Mongoose';\n\nexport const instrumentMongoose = generateInstrumentOnce(\n INTEGRATION_NAME,\n () =>\n new MongooseInstrumentation({\n responseHook(span) {\n addOriginToSpan(span, 'auto.db.otel.mongoose');\n },\n }),\n);\n\nconst _mongooseIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentMongoose();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [mongoose](https://www.npmjs.com/package/mongoose) library.\n *\n * For more information, see the [`mongooseIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mongoose/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.mongooseIntegration()],\n * });\n * ```\n */\nexport const mongooseIntegration = defineIntegration(_mongooseIntegration);\n"],"names":["generateInstrumentOnce","MongooseInstrumentation","addOriginToSpan","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,gBAAA,GAAmB,UAAA;AAElB,MAAM,kBAAA,GAAqBA,+BAAA;AAAA,EAChC,gBAAA;AAAA,EACA,MACE,IAAIC,gCAAA,CAAwB;AAAA,IAC1B,aAAa,IAAA,EAAM;AACjB,MAAAC,wBAAA,CAAgB,MAAM,uBAAuB,CAAA;AAAA,IAC/C;AAAA,GACD;AACL;AAEA,MAAM,wBAAwB,MAAM;AAClC,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,kBAAA,EAAmB;AAAA,IACrB;AAAA,GACF;AACF,CAAA,CAAA;AAgBO,MAAM,mBAAA,GAAsBC,uBAAkB,oBAAoB;;;;;"}
|
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const api = require('@opentelemetry/api');
|
|
4
|
+
const core$1 = require('@opentelemetry/core');
|
|
5
|
+
const utils = require('./utils.js');
|
|
6
|
+
const instrumentation = require('@opentelemetry/instrumentation');
|
|
7
|
+
const core = require('@sentry/core');
|
|
8
|
+
const semconv = require('./semconv.js');
|
|
9
|
+
const semanticConventions = require('@opentelemetry/semantic-conventions');
|
|
10
|
+
|
|
11
|
+
const PACKAGE_NAME = "@sentry/instrumentation-mongoose";
|
|
12
|
+
const contextCaptureFunctionsCommon = [
|
|
13
|
+
"deleteOne",
|
|
14
|
+
"deleteMany",
|
|
15
|
+
"find",
|
|
16
|
+
"findOne",
|
|
17
|
+
"estimatedDocumentCount",
|
|
18
|
+
"countDocuments",
|
|
19
|
+
"distinct",
|
|
20
|
+
"where",
|
|
21
|
+
"$where",
|
|
22
|
+
"findOneAndUpdate",
|
|
23
|
+
"findOneAndDelete",
|
|
24
|
+
"findOneAndReplace"
|
|
25
|
+
];
|
|
26
|
+
const contextCaptureFunctions6 = ["remove", "count", "findOneAndRemove", ...contextCaptureFunctionsCommon];
|
|
27
|
+
const contextCaptureFunctions7 = ["count", "findOneAndRemove", ...contextCaptureFunctionsCommon];
|
|
28
|
+
const contextCaptureFunctions8 = [...contextCaptureFunctionsCommon];
|
|
29
|
+
function getContextCaptureFunctions(moduleVersion) {
|
|
30
|
+
if (!moduleVersion) {
|
|
31
|
+
return contextCaptureFunctionsCommon;
|
|
32
|
+
} else if (moduleVersion.startsWith("6.") || moduleVersion.startsWith("5.")) {
|
|
33
|
+
return contextCaptureFunctions6;
|
|
34
|
+
} else if (moduleVersion.startsWith("7.")) {
|
|
35
|
+
return contextCaptureFunctions7;
|
|
36
|
+
} else {
|
|
37
|
+
return contextCaptureFunctions8;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function instrumentRemove(moduleVersion) {
|
|
41
|
+
return moduleVersion && (moduleVersion.startsWith("5.") || moduleVersion.startsWith("6.")) || false;
|
|
42
|
+
}
|
|
43
|
+
function needsDocumentMethodPatch(moduleVersion) {
|
|
44
|
+
if (!moduleVersion || !moduleVersion.startsWith("8.")) {
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
const minor = parseInt(moduleVersion.split(".")[1], 10);
|
|
48
|
+
return minor >= 21;
|
|
49
|
+
}
|
|
50
|
+
const _STORED_PARENT_SPAN = /* @__PURE__ */ Symbol("stored-parent-span");
|
|
51
|
+
const _ALREADY_INSTRUMENTED = /* @__PURE__ */ Symbol("already-instrumented");
|
|
52
|
+
class MongooseInstrumentation extends instrumentation.InstrumentationBase {
|
|
53
|
+
constructor(config = {}) {
|
|
54
|
+
super(PACKAGE_NAME, core.SDK_VERSION, config);
|
|
55
|
+
this._setSemconvStabilityFromEnv();
|
|
56
|
+
}
|
|
57
|
+
// Used for testing.
|
|
58
|
+
_setSemconvStabilityFromEnv() {
|
|
59
|
+
this._netSemconvStability = instrumentation.semconvStabilityFromStr("http", process.env.OTEL_SEMCONV_STABILITY_OPT_IN);
|
|
60
|
+
this._dbSemconvStability = instrumentation.semconvStabilityFromStr("database", process.env.OTEL_SEMCONV_STABILITY_OPT_IN);
|
|
61
|
+
}
|
|
62
|
+
init() {
|
|
63
|
+
const module = new instrumentation.InstrumentationNodeModuleDefinition(
|
|
64
|
+
"mongoose",
|
|
65
|
+
[">=5.9.7 <10"],
|
|
66
|
+
this.patch.bind(this),
|
|
67
|
+
this.unpatch.bind(this)
|
|
68
|
+
);
|
|
69
|
+
return module;
|
|
70
|
+
}
|
|
71
|
+
patch(module, moduleVersion) {
|
|
72
|
+
const moduleExports = module[Symbol.toStringTag] === "Module" ? module.default : module;
|
|
73
|
+
this._wrap(moduleExports.Model.prototype, "save", this.patchOnModelMethods("save", moduleVersion));
|
|
74
|
+
moduleExports.Model.prototype.$save = moduleExports.Model.prototype.save;
|
|
75
|
+
if (instrumentRemove(moduleVersion)) {
|
|
76
|
+
this._wrap(moduleExports.Model.prototype, "remove", this.patchOnModelMethods("remove", moduleVersion));
|
|
77
|
+
}
|
|
78
|
+
if (needsDocumentMethodPatch(moduleVersion)) {
|
|
79
|
+
this._wrap(
|
|
80
|
+
moduleExports.Model.prototype,
|
|
81
|
+
"updateOne",
|
|
82
|
+
this._patchDocumentUpdateMethods("updateOne", moduleVersion)
|
|
83
|
+
);
|
|
84
|
+
this._wrap(
|
|
85
|
+
moduleExports.Model.prototype,
|
|
86
|
+
"deleteOne",
|
|
87
|
+
this._patchDocumentUpdateMethods("deleteOne", moduleVersion)
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
this._wrap(moduleExports.Query.prototype, "exec", this.patchQueryExec(moduleVersion));
|
|
91
|
+
this._wrap(moduleExports.Aggregate.prototype, "exec", this.patchAggregateExec(moduleVersion));
|
|
92
|
+
const contextCaptureFunctions = getContextCaptureFunctions(moduleVersion);
|
|
93
|
+
contextCaptureFunctions.forEach((funcName) => {
|
|
94
|
+
this._wrap(moduleExports.Query.prototype, funcName, this.patchAndCaptureSpanContext(funcName));
|
|
95
|
+
});
|
|
96
|
+
this._wrap(moduleExports.Model, "aggregate", this.patchModelAggregate());
|
|
97
|
+
this._wrap(moduleExports.Model, "insertMany", this.patchModelStatic("insertMany", moduleVersion));
|
|
98
|
+
this._wrap(moduleExports.Model, "bulkWrite", this.patchModelStatic("bulkWrite", moduleVersion));
|
|
99
|
+
return moduleExports;
|
|
100
|
+
}
|
|
101
|
+
unpatch(module, moduleVersion) {
|
|
102
|
+
const moduleExports = module[Symbol.toStringTag] === "Module" ? module.default : module;
|
|
103
|
+
const contextCaptureFunctions = getContextCaptureFunctions(moduleVersion);
|
|
104
|
+
this._unwrap(moduleExports.Model.prototype, "save");
|
|
105
|
+
moduleExports.Model.prototype.$save = moduleExports.Model.prototype.save;
|
|
106
|
+
if (instrumentRemove(moduleVersion)) {
|
|
107
|
+
this._unwrap(moduleExports.Model.prototype, "remove");
|
|
108
|
+
}
|
|
109
|
+
if (needsDocumentMethodPatch(moduleVersion)) {
|
|
110
|
+
this._unwrap(moduleExports.Model.prototype, "updateOne");
|
|
111
|
+
this._unwrap(moduleExports.Model.prototype, "deleteOne");
|
|
112
|
+
}
|
|
113
|
+
this._unwrap(moduleExports.Query.prototype, "exec");
|
|
114
|
+
this._unwrap(moduleExports.Aggregate.prototype, "exec");
|
|
115
|
+
contextCaptureFunctions.forEach((funcName) => {
|
|
116
|
+
this._unwrap(moduleExports.Query.prototype, funcName);
|
|
117
|
+
});
|
|
118
|
+
this._unwrap(moduleExports.Model, "aggregate");
|
|
119
|
+
this._unwrap(moduleExports.Model, "insertMany");
|
|
120
|
+
this._unwrap(moduleExports.Model, "bulkWrite");
|
|
121
|
+
}
|
|
122
|
+
patchAggregateExec(moduleVersion) {
|
|
123
|
+
const self = this;
|
|
124
|
+
return (originalAggregate) => {
|
|
125
|
+
return function exec(callback) {
|
|
126
|
+
if (self.getConfig().requireParentSpan && api.trace.getSpan(api.context.active()) === void 0) {
|
|
127
|
+
return originalAggregate.apply(this, arguments);
|
|
128
|
+
}
|
|
129
|
+
const parentSpan = this[_STORED_PARENT_SPAN];
|
|
130
|
+
const attributes = {};
|
|
131
|
+
const { dbStatementSerializer } = self.getConfig();
|
|
132
|
+
if (dbStatementSerializer) {
|
|
133
|
+
const statement = dbStatementSerializer("aggregate", {
|
|
134
|
+
options: this.options,
|
|
135
|
+
aggregatePipeline: this._pipeline
|
|
136
|
+
});
|
|
137
|
+
if (self._dbSemconvStability & instrumentation.SemconvStability.OLD) {
|
|
138
|
+
attributes[semconv.ATTR_DB_STATEMENT] = statement;
|
|
139
|
+
}
|
|
140
|
+
if (self._dbSemconvStability & instrumentation.SemconvStability.STABLE) {
|
|
141
|
+
attributes[semanticConventions.ATTR_DB_QUERY_TEXT] = statement;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
const span = self._startSpan(
|
|
145
|
+
this._model.collection,
|
|
146
|
+
this._model?.modelName,
|
|
147
|
+
"aggregate",
|
|
148
|
+
attributes,
|
|
149
|
+
parentSpan
|
|
150
|
+
);
|
|
151
|
+
return self._handleResponse(span, originalAggregate, this, arguments, callback, moduleVersion);
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
patchQueryExec(moduleVersion) {
|
|
156
|
+
const self = this;
|
|
157
|
+
return (originalExec) => {
|
|
158
|
+
return function exec(callback) {
|
|
159
|
+
if (this[_ALREADY_INSTRUMENTED]) {
|
|
160
|
+
return originalExec.apply(this, arguments);
|
|
161
|
+
}
|
|
162
|
+
if (self.getConfig().requireParentSpan && api.trace.getSpan(api.context.active()) === void 0) {
|
|
163
|
+
return originalExec.apply(this, arguments);
|
|
164
|
+
}
|
|
165
|
+
const parentSpan = this[_STORED_PARENT_SPAN];
|
|
166
|
+
const attributes = {};
|
|
167
|
+
const { dbStatementSerializer } = self.getConfig();
|
|
168
|
+
if (dbStatementSerializer) {
|
|
169
|
+
const statement = dbStatementSerializer(this.op, {
|
|
170
|
+
// Use public API methods (getFilter/getOptions) for better compatibility
|
|
171
|
+
condition: this.getFilter?.() ?? this._conditions,
|
|
172
|
+
updates: this._update,
|
|
173
|
+
options: this.getOptions?.() ?? this.options,
|
|
174
|
+
fields: this._fields
|
|
175
|
+
});
|
|
176
|
+
if (self._dbSemconvStability & instrumentation.SemconvStability.OLD) {
|
|
177
|
+
attributes[semconv.ATTR_DB_STATEMENT] = statement;
|
|
178
|
+
}
|
|
179
|
+
if (self._dbSemconvStability & instrumentation.SemconvStability.STABLE) {
|
|
180
|
+
attributes[semanticConventions.ATTR_DB_QUERY_TEXT] = statement;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
const span = self._startSpan(this.mongooseCollection, this.model.modelName, this.op, attributes, parentSpan);
|
|
184
|
+
return self._handleResponse(span, originalExec, this, arguments, callback, moduleVersion);
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
patchOnModelMethods(op, moduleVersion) {
|
|
189
|
+
const self = this;
|
|
190
|
+
return (originalOnModelFunction) => {
|
|
191
|
+
return function method(options, callback) {
|
|
192
|
+
if (self.getConfig().requireParentSpan && api.trace.getSpan(api.context.active()) === void 0) {
|
|
193
|
+
return originalOnModelFunction.apply(this, arguments);
|
|
194
|
+
}
|
|
195
|
+
const serializePayload = { document: this };
|
|
196
|
+
if (options && !(options instanceof Function)) {
|
|
197
|
+
serializePayload.options = options;
|
|
198
|
+
}
|
|
199
|
+
const attributes = {};
|
|
200
|
+
const { dbStatementSerializer } = self.getConfig();
|
|
201
|
+
if (dbStatementSerializer) {
|
|
202
|
+
const statement = dbStatementSerializer(op, serializePayload);
|
|
203
|
+
if (self._dbSemconvStability & instrumentation.SemconvStability.OLD) {
|
|
204
|
+
attributes[semconv.ATTR_DB_STATEMENT] = statement;
|
|
205
|
+
}
|
|
206
|
+
if (self._dbSemconvStability & instrumentation.SemconvStability.STABLE) {
|
|
207
|
+
attributes[semanticConventions.ATTR_DB_QUERY_TEXT] = statement;
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
const span = self._startSpan(this.constructor.collection, this.constructor.modelName, op, attributes);
|
|
211
|
+
if (options instanceof Function) {
|
|
212
|
+
callback = options;
|
|
213
|
+
options = void 0;
|
|
214
|
+
}
|
|
215
|
+
return self._handleResponse(span, originalOnModelFunction, this, arguments, callback, moduleVersion);
|
|
216
|
+
};
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
// Patch document instance methods (doc.updateOne/deleteOne) for Mongoose 8.21.0+.
|
|
220
|
+
_patchDocumentUpdateMethods(op, moduleVersion) {
|
|
221
|
+
const self = this;
|
|
222
|
+
return (originalMethod) => {
|
|
223
|
+
return function method(update, options, callback) {
|
|
224
|
+
if (self.getConfig().requireParentSpan && api.trace.getSpan(api.context.active()) === void 0) {
|
|
225
|
+
return originalMethod.apply(this, arguments);
|
|
226
|
+
}
|
|
227
|
+
let actualCallback = callback;
|
|
228
|
+
let actualUpdate = update;
|
|
229
|
+
let actualOptions = options;
|
|
230
|
+
if (typeof update === "function") {
|
|
231
|
+
actualCallback = update;
|
|
232
|
+
actualUpdate = void 0;
|
|
233
|
+
actualOptions = void 0;
|
|
234
|
+
} else if (typeof options === "function") {
|
|
235
|
+
actualCallback = options;
|
|
236
|
+
actualOptions = void 0;
|
|
237
|
+
}
|
|
238
|
+
const attributes = {};
|
|
239
|
+
const dbStatementSerializer = self.getConfig().dbStatementSerializer;
|
|
240
|
+
if (dbStatementSerializer) {
|
|
241
|
+
const statement = dbStatementSerializer(op, {
|
|
242
|
+
// Document instance methods automatically use the document's _id as filter
|
|
243
|
+
condition: { _id: this._id },
|
|
244
|
+
updates: actualUpdate,
|
|
245
|
+
options: actualOptions
|
|
246
|
+
});
|
|
247
|
+
if (self._dbSemconvStability & instrumentation.SemconvStability.OLD) {
|
|
248
|
+
attributes[semconv.ATTR_DB_STATEMENT] = statement;
|
|
249
|
+
}
|
|
250
|
+
if (self._dbSemconvStability & instrumentation.SemconvStability.STABLE) {
|
|
251
|
+
attributes[semanticConventions.ATTR_DB_QUERY_TEXT] = statement;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
const span = self._startSpan(this.constructor.collection, this.constructor.modelName, op, attributes);
|
|
255
|
+
const result = self._handleResponse(span, originalMethod, this, arguments, actualCallback, moduleVersion);
|
|
256
|
+
if (result && typeof result === "object") {
|
|
257
|
+
result[_ALREADY_INSTRUMENTED] = true;
|
|
258
|
+
}
|
|
259
|
+
return result;
|
|
260
|
+
};
|
|
261
|
+
};
|
|
262
|
+
}
|
|
263
|
+
patchModelStatic(op, moduleVersion) {
|
|
264
|
+
const self = this;
|
|
265
|
+
return (original) => {
|
|
266
|
+
return function patchedStatic(docsOrOps, options, callback) {
|
|
267
|
+
if (self.getConfig().requireParentSpan && api.trace.getSpan(api.context.active()) === void 0) {
|
|
268
|
+
return original.apply(this, arguments);
|
|
269
|
+
}
|
|
270
|
+
if (typeof options === "function") {
|
|
271
|
+
callback = options;
|
|
272
|
+
options = void 0;
|
|
273
|
+
}
|
|
274
|
+
const serializePayload = {};
|
|
275
|
+
switch (op) {
|
|
276
|
+
case "insertMany":
|
|
277
|
+
serializePayload.documents = docsOrOps;
|
|
278
|
+
break;
|
|
279
|
+
case "bulkWrite":
|
|
280
|
+
serializePayload.operations = docsOrOps;
|
|
281
|
+
break;
|
|
282
|
+
default:
|
|
283
|
+
serializePayload.document = docsOrOps;
|
|
284
|
+
break;
|
|
285
|
+
}
|
|
286
|
+
if (options !== void 0) {
|
|
287
|
+
serializePayload.options = options;
|
|
288
|
+
}
|
|
289
|
+
const attributes = {};
|
|
290
|
+
const { dbStatementSerializer } = self.getConfig();
|
|
291
|
+
if (dbStatementSerializer) {
|
|
292
|
+
const statement = dbStatementSerializer(op, serializePayload);
|
|
293
|
+
if (self._dbSemconvStability & instrumentation.SemconvStability.OLD) {
|
|
294
|
+
attributes[semconv.ATTR_DB_STATEMENT] = statement;
|
|
295
|
+
}
|
|
296
|
+
if (self._dbSemconvStability & instrumentation.SemconvStability.STABLE) {
|
|
297
|
+
attributes[semanticConventions.ATTR_DB_QUERY_TEXT] = statement;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
const span = self._startSpan(this.collection, this.modelName, op, attributes);
|
|
301
|
+
return self._handleResponse(span, original, this, arguments, callback, moduleVersion);
|
|
302
|
+
};
|
|
303
|
+
};
|
|
304
|
+
}
|
|
305
|
+
// we want to capture the otel span on the object which is calling exec.
|
|
306
|
+
// in the special case of aggregate, we need have no function to path
|
|
307
|
+
// on the Aggregate object to capture the context on, so we patch
|
|
308
|
+
// the aggregate of Model, and set the context on the Aggregate object
|
|
309
|
+
patchModelAggregate() {
|
|
310
|
+
const self = this;
|
|
311
|
+
return (original) => {
|
|
312
|
+
return function captureSpanContext() {
|
|
313
|
+
const currentSpan = api.trace.getSpan(api.context.active());
|
|
314
|
+
const aggregate = self._callOriginalFunction(() => original.apply(this, arguments));
|
|
315
|
+
if (aggregate) aggregate[_STORED_PARENT_SPAN] = currentSpan;
|
|
316
|
+
return aggregate;
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
}
|
|
320
|
+
patchAndCaptureSpanContext(funcName) {
|
|
321
|
+
const self = this;
|
|
322
|
+
return (original) => {
|
|
323
|
+
return function captureSpanContext() {
|
|
324
|
+
this[_STORED_PARENT_SPAN] = api.trace.getSpan(api.context.active());
|
|
325
|
+
return self._callOriginalFunction(() => original.apply(this, arguments));
|
|
326
|
+
};
|
|
327
|
+
};
|
|
328
|
+
}
|
|
329
|
+
_startSpan(collection, modelName, operation, attributes, parentSpan) {
|
|
330
|
+
const finalAttributes = {
|
|
331
|
+
...attributes,
|
|
332
|
+
...utils.getAttributesFromCollection(collection, this._dbSemconvStability, this._netSemconvStability)
|
|
333
|
+
};
|
|
334
|
+
if (this._dbSemconvStability & instrumentation.SemconvStability.OLD) {
|
|
335
|
+
finalAttributes[semconv.ATTR_DB_OPERATION] = operation;
|
|
336
|
+
finalAttributes[semconv.ATTR_DB_SYSTEM] = "mongoose";
|
|
337
|
+
}
|
|
338
|
+
if (this._dbSemconvStability & instrumentation.SemconvStability.STABLE) {
|
|
339
|
+
finalAttributes[semanticConventions.ATTR_DB_OPERATION_NAME] = operation;
|
|
340
|
+
finalAttributes[semanticConventions.ATTR_DB_SYSTEM_NAME] = semconv.DB_SYSTEM_NAME_VALUE_MONGODB;
|
|
341
|
+
}
|
|
342
|
+
const spanName = this._dbSemconvStability & instrumentation.SemconvStability.STABLE ? `${operation} ${collection.name}` : `mongoose.${modelName}.${operation}`;
|
|
343
|
+
return this.tracer.startSpan(
|
|
344
|
+
spanName,
|
|
345
|
+
{
|
|
346
|
+
kind: api.SpanKind.CLIENT,
|
|
347
|
+
attributes: finalAttributes
|
|
348
|
+
},
|
|
349
|
+
parentSpan ? api.trace.setSpan(api.context.active(), parentSpan) : void 0
|
|
350
|
+
);
|
|
351
|
+
}
|
|
352
|
+
_handleResponse(span, exec, originalThis, args, callback, moduleVersion = void 0) {
|
|
353
|
+
const self = this;
|
|
354
|
+
if (callback instanceof Function) {
|
|
355
|
+
return self._callOriginalFunction(
|
|
356
|
+
() => utils.handleCallbackResponse(callback, exec, originalThis, span, args, self.getConfig().responseHook, moduleVersion)
|
|
357
|
+
);
|
|
358
|
+
} else {
|
|
359
|
+
const response = self._callOriginalFunction(() => exec.apply(originalThis, args));
|
|
360
|
+
return utils.handlePromiseResponse(response, span, self.getConfig().responseHook, moduleVersion);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
_callOriginalFunction(originalFunction) {
|
|
364
|
+
if (this.getConfig().suppressInternalInstrumentation) {
|
|
365
|
+
return api.context.with(core$1.suppressTracing(api.context.active()), originalFunction);
|
|
366
|
+
} else {
|
|
367
|
+
return originalFunction();
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
exports.MongooseInstrumentation = MongooseInstrumentation;
|
|
373
|
+
exports._ALREADY_INSTRUMENTED = _ALREADY_INSTRUMENTED;
|
|
374
|
+
exports._STORED_PARENT_SPAN = _STORED_PARENT_SPAN;
|
|
375
|
+
//# sourceMappingURL=mongoose.js.map
|