@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,52 @@
|
|
|
1
|
+
import { ConnectInstrumentation } from './vendored/instrumentation.js';
|
|
2
|
+
import { defineIntegration, getClient, captureException, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_OP, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';
|
|
3
|
+
import { generateInstrumentOnce, ensureIsWrapped } from '@sentry/node-core';
|
|
4
|
+
|
|
5
|
+
const INTEGRATION_NAME = "Connect";
|
|
6
|
+
const instrumentConnect = generateInstrumentOnce(INTEGRATION_NAME, () => new ConnectInstrumentation());
|
|
7
|
+
const _connectIntegration = (() => {
|
|
8
|
+
return {
|
|
9
|
+
name: INTEGRATION_NAME,
|
|
10
|
+
setupOnce() {
|
|
11
|
+
instrumentConnect();
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
});
|
|
15
|
+
const connectIntegration = defineIntegration(_connectIntegration);
|
|
16
|
+
function connectErrorMiddleware(err, req, res, next) {
|
|
17
|
+
captureException(err, {
|
|
18
|
+
mechanism: {
|
|
19
|
+
handled: false,
|
|
20
|
+
type: "auto.middleware.connect"
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
next(err);
|
|
24
|
+
}
|
|
25
|
+
const setupConnectErrorHandler = (app) => {
|
|
26
|
+
app.use(connectErrorMiddleware);
|
|
27
|
+
const client = getClient();
|
|
28
|
+
if (client) {
|
|
29
|
+
client.on("spanStart", (span) => {
|
|
30
|
+
addConnectSpanAttributes(span);
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
ensureIsWrapped(app.use, "connect");
|
|
34
|
+
};
|
|
35
|
+
function addConnectSpanAttributes(span) {
|
|
36
|
+
const attributes = spanToJSON(span).data;
|
|
37
|
+
const type = attributes["connect.type"];
|
|
38
|
+
if (attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP] || !type) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
span.setAttributes({
|
|
42
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: "auto.http.otel.connect",
|
|
43
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_OP]: `${type}.connect`
|
|
44
|
+
});
|
|
45
|
+
const name = attributes["connect.name"];
|
|
46
|
+
if (typeof name === "string") {
|
|
47
|
+
span.updateName(name);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export { connectIntegration, instrumentConnect, setupConnectErrorHandler };
|
|
52
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/connect/index.ts"],"sourcesContent":["import { ConnectInstrumentation } from './vendored/instrumentation';\nimport type { IntegrationFn, Span } from '@sentry/core';\nimport {\n captureException,\n defineIntegration,\n getClient,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n spanToJSON,\n} from '@sentry/core';\nimport { ensureIsWrapped, generateInstrumentOnce } from '@sentry/node-core';\n\ntype ConnectApp = {\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n use: (middleware: any) => void;\n};\n\nconst INTEGRATION_NAME = 'Connect';\n\nexport const instrumentConnect = generateInstrumentOnce(INTEGRATION_NAME, () => new ConnectInstrumentation());\n\nconst _connectIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentConnect();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for [Connect](https://github.com/senchalabs/connect/).\n *\n * If you also want to capture errors, you need to call `setupConnectErrorHandler(app)` after you initialize your connect app.\n *\n * For more information, see the [connect documentation](https://docs.sentry.io/platforms/javascript/guides/connect/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.connectIntegration()],\n * })\n * ```\n */\nexport const connectIntegration = defineIntegration(_connectIntegration);\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nfunction connectErrorMiddleware(err: any, req: any, res: any, next: any): void {\n captureException(err, {\n mechanism: {\n handled: false,\n type: 'auto.middleware.connect',\n },\n });\n next(err);\n}\n\n/**\n * Add a Connect middleware to capture errors to Sentry.\n *\n * @param app The Connect app to attach the error handler to\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n * const connect = require(\"connect\");\n *\n * const app = connect();\n *\n * Sentry.setupConnectErrorHandler(app);\n *\n * // Add you connect routes here\n *\n * app.listen(3000);\n * ```\n */\nexport const setupConnectErrorHandler = (app: ConnectApp): void => {\n app.use(connectErrorMiddleware);\n\n // Sadly, ConnectInstrumentation has no requestHook, so we need to add the attributes here\n // We register this hook in this method, because if we register it in the integration `setup`,\n // it would always run even for users that are not even using connect\n const client = getClient();\n if (client) {\n client.on('spanStart', span => {\n addConnectSpanAttributes(span);\n });\n }\n\n ensureIsWrapped(app.use, 'connect');\n};\n\nfunction addConnectSpanAttributes(span: Span): void {\n const attributes = spanToJSON(span).data;\n\n // this is one of: middleware, request_handler\n const type = attributes['connect.type'];\n\n // If this is already set, or we have no connect span, no need to process again...\n if (attributes[SEMANTIC_ATTRIBUTE_SENTRY_OP] || !type) {\n return;\n }\n\n span.setAttributes({\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: 'auto.http.otel.connect',\n [SEMANTIC_ATTRIBUTE_SENTRY_OP]: `${type}.connect`,\n });\n\n // Also update the name, we don't need the \"middleware - \" prefix\n const name = attributes['connect.name'];\n if (typeof name === 'string') {\n span.updateName(name);\n }\n}\n"],"names":[],"mappings":";;;;AAiBA,MAAM,gBAAA,GAAmB,SAAA;AAElB,MAAM,oBAAoB,sBAAA,CAAuB,gBAAA,EAAkB,MAAM,IAAI,wBAAwB;AAE5G,MAAM,uBAAuB,MAAM;AACjC,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,iBAAA,EAAkB;AAAA,IACpB;AAAA,GACF;AACF,CAAA,CAAA;AAkBO,MAAM,kBAAA,GAAqB,kBAAkB,mBAAmB;AAGvE,SAAS,sBAAA,CAAuB,GAAA,EAAU,GAAA,EAAU,GAAA,EAAU,IAAA,EAAiB;AAC7E,EAAA,gBAAA,CAAiB,GAAA,EAAK;AAAA,IACpB,SAAA,EAAW;AAAA,MACT,OAAA,EAAS,KAAA;AAAA,MACT,IAAA,EAAM;AAAA;AACR,GACD,CAAA;AACD,EAAA,IAAA,CAAK,GAAG,CAAA;AACV;AAqBO,MAAM,wBAAA,GAA2B,CAAC,GAAA,KAA0B;AACjE,EAAA,GAAA,CAAI,IAAI,sBAAsB,CAAA;AAK9B,EAAA,MAAM,SAAS,SAAA,EAAU;AACzB,EAAA,IAAI,MAAA,EAAQ;AACV,IAAA,MAAA,CAAO,EAAA,CAAG,aAAa,CAAA,IAAA,KAAQ;AAC7B,MAAA,wBAAA,CAAyB,IAAI,CAAA;AAAA,IAC/B,CAAC,CAAA;AAAA,EACH;AAEA,EAAA,eAAA,CAAgB,GAAA,CAAI,KAAK,SAAS,CAAA;AACpC;AAEA,SAAS,yBAAyB,IAAA,EAAkB;AAClD,EAAA,MAAM,UAAA,GAAa,UAAA,CAAW,IAAI,CAAA,CAAE,IAAA;AAGpC,EAAA,MAAM,IAAA,GAAO,WAAW,cAAc,CAAA;AAGtC,EAAA,IAAI,UAAA,CAAW,4BAA4B,CAAA,IAAK,CAAC,IAAA,EAAM;AACrD,IAAA;AAAA,EACF;AAEA,EAAA,IAAA,CAAK,aAAA,CAAc;AAAA,IACjB,CAAC,gCAAgC,GAAG,wBAAA;AAAA,IACpC,CAAC,4BAA4B,GAAG,CAAA,EAAG,IAAI,CAAA,QAAA;AAAA,GACxC,CAAA;AAGD,EAAA,MAAM,IAAA,GAAO,WAAW,cAAc,CAAA;AACtC,EAAA,IAAI,OAAO,SAAS,QAAA,EAAU;AAC5B,IAAA,IAAA,CAAK,WAAW,IAAI,CAAA;AAAA,EACtB;AACF;;;;"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
var AttributeNames = /* @__PURE__ */ ((AttributeNames2) => {
|
|
2
|
+
AttributeNames2["CONNECT_TYPE"] = "connect.type";
|
|
3
|
+
AttributeNames2["CONNECT_NAME"] = "connect.name";
|
|
4
|
+
return AttributeNames2;
|
|
5
|
+
})(AttributeNames || {});
|
|
6
|
+
var ConnectTypes = /* @__PURE__ */ ((ConnectTypes2) => {
|
|
7
|
+
ConnectTypes2["MIDDLEWARE"] = "middleware";
|
|
8
|
+
ConnectTypes2["REQUEST_HANDLER"] = "request_handler";
|
|
9
|
+
return ConnectTypes2;
|
|
10
|
+
})(ConnectTypes || {});
|
|
11
|
+
var ConnectNames = /* @__PURE__ */ ((ConnectNames2) => {
|
|
12
|
+
ConnectNames2["MIDDLEWARE"] = "middleware";
|
|
13
|
+
ConnectNames2["REQUEST_HANDLER"] = "request handler";
|
|
14
|
+
return ConnectNames2;
|
|
15
|
+
})(ConnectNames || {});
|
|
16
|
+
|
|
17
|
+
export { AttributeNames, ConnectNames, ConnectTypes };
|
|
18
|
+
//# sourceMappingURL=AttributeNames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttributeNames.js","sources":["../../../../../../../src/integrations/tracing/connect/vendored/enums/AttributeNames.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-connect\n * - Upstream version: @opentelemetry/instrumentation-connect@0.61.0\n */\n/* eslint-disable */\n\nexport enum AttributeNames {\n CONNECT_TYPE = 'connect.type',\n CONNECT_NAME = 'connect.name',\n}\n\nexport enum ConnectTypes {\n MIDDLEWARE = 'middleware',\n REQUEST_HANDLER = 'request_handler',\n}\n\nexport enum ConnectNames {\n MIDDLEWARE = 'middleware',\n REQUEST_HANDLER = 'request handler',\n}\n"],"names":["AttributeNames","ConnectTypes","ConnectNames"],"mappings":"AAqBO,IAAK,cAAA,qBAAAA,eAAAA,KAAL;AACL,EAAAA,gBAAA,cAAA,CAAA,GAAe,cAAA;AACf,EAAAA,gBAAA,cAAA,CAAA,GAAe,cAAA;AAFL,EAAA,OAAAA,eAAAA;AAAA,CAAA,EAAA,cAAA,IAAA,EAAA;AAKL,IAAK,YAAA,qBAAAC,aAAAA,KAAL;AACL,EAAAA,cAAA,YAAA,CAAA,GAAa,YAAA;AACb,EAAAA,cAAA,iBAAA,CAAA,GAAkB,iBAAA;AAFR,EAAA,OAAAA,aAAAA;AAAA,CAAA,EAAA,YAAA,IAAA,EAAA;AAKL,IAAK,YAAA,qBAAAC,aAAAA,KAAL;AACL,EAAAA,cAAA,YAAA,CAAA,GAAa,YAAA;AACb,EAAAA,cAAA,iBAAA,CAAA,GAAkB,iBAAA;AAFR,EAAA,OAAAA,aAAAA;AAAA,CAAA,EAAA,YAAA,IAAA,EAAA;;;;"}
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { context } from '@opentelemetry/api';
|
|
2
|
+
import { getRPCMetadata, RPCType } from '@opentelemetry/core';
|
|
3
|
+
import { ConnectTypes, ConnectNames, AttributeNames } from './enums/AttributeNames.js';
|
|
4
|
+
import { SDK_VERSION } from '@sentry/core';
|
|
5
|
+
import { InstrumentationBase, InstrumentationNodeModuleDefinition, isWrapped } from '@opentelemetry/instrumentation';
|
|
6
|
+
import { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';
|
|
7
|
+
import { addNewStackLayer, replaceCurrentStackRoute, generateRoute } from './utils.js';
|
|
8
|
+
|
|
9
|
+
const PACKAGE_NAME = "@sentry/instrumentation-connect";
|
|
10
|
+
const ANONYMOUS_NAME = "anonymous";
|
|
11
|
+
class ConnectInstrumentation extends InstrumentationBase {
|
|
12
|
+
constructor(config = {}) {
|
|
13
|
+
super(PACKAGE_NAME, SDK_VERSION, config);
|
|
14
|
+
}
|
|
15
|
+
init() {
|
|
16
|
+
return [
|
|
17
|
+
new InstrumentationNodeModuleDefinition("connect", [">=3.0.0 <4"], (moduleExports) => {
|
|
18
|
+
return this._patchConstructor(moduleExports);
|
|
19
|
+
})
|
|
20
|
+
];
|
|
21
|
+
}
|
|
22
|
+
_patchApp(patchedApp) {
|
|
23
|
+
if (!isWrapped(patchedApp.use)) {
|
|
24
|
+
this._wrap(patchedApp, "use", this._patchUse.bind(this));
|
|
25
|
+
}
|
|
26
|
+
if (!isWrapped(patchedApp.handle)) {
|
|
27
|
+
this._wrap(patchedApp, "handle", this._patchHandle.bind(this));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
_patchConstructor(original) {
|
|
31
|
+
const instrumentation = this;
|
|
32
|
+
return function(...args) {
|
|
33
|
+
const app = original.apply(this, args);
|
|
34
|
+
instrumentation._patchApp(app);
|
|
35
|
+
return app;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
_patchNext(next, finishSpan) {
|
|
39
|
+
return function nextFunction(err) {
|
|
40
|
+
const result = next.apply(this, [err]);
|
|
41
|
+
finishSpan();
|
|
42
|
+
return result;
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
_startSpan(routeName, middleWare) {
|
|
46
|
+
let connectType;
|
|
47
|
+
let connectName;
|
|
48
|
+
let connectTypeName;
|
|
49
|
+
if (routeName) {
|
|
50
|
+
connectType = ConnectTypes.REQUEST_HANDLER;
|
|
51
|
+
connectTypeName = ConnectNames.REQUEST_HANDLER;
|
|
52
|
+
connectName = routeName;
|
|
53
|
+
} else {
|
|
54
|
+
connectType = ConnectTypes.MIDDLEWARE;
|
|
55
|
+
connectTypeName = ConnectNames.MIDDLEWARE;
|
|
56
|
+
connectName = middleWare.name || ANONYMOUS_NAME;
|
|
57
|
+
}
|
|
58
|
+
const spanName = `${connectTypeName} - ${connectName}`;
|
|
59
|
+
const options = {
|
|
60
|
+
attributes: {
|
|
61
|
+
[ATTR_HTTP_ROUTE]: routeName.length > 0 ? routeName : "/",
|
|
62
|
+
[AttributeNames.CONNECT_TYPE]: connectType,
|
|
63
|
+
[AttributeNames.CONNECT_NAME]: connectName
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
return this.tracer.startSpan(spanName, options);
|
|
67
|
+
}
|
|
68
|
+
_patchMiddleware(routeName, middleWare) {
|
|
69
|
+
const instrumentation = this;
|
|
70
|
+
const isErrorMiddleware = middleWare.length === 4;
|
|
71
|
+
function patchedMiddleware() {
|
|
72
|
+
if (!instrumentation.isEnabled()) {
|
|
73
|
+
return middleWare.apply(this, arguments);
|
|
74
|
+
}
|
|
75
|
+
const [reqArgIdx, resArgIdx, nextArgIdx] = isErrorMiddleware ? [1, 2, 3] : [0, 1, 2];
|
|
76
|
+
const req = arguments[reqArgIdx];
|
|
77
|
+
const res = arguments[resArgIdx];
|
|
78
|
+
const next = arguments[nextArgIdx];
|
|
79
|
+
replaceCurrentStackRoute(req, routeName);
|
|
80
|
+
const rpcMetadata = getRPCMetadata(context.active());
|
|
81
|
+
if (routeName && rpcMetadata?.type === RPCType.HTTP) {
|
|
82
|
+
rpcMetadata.route = generateRoute(req);
|
|
83
|
+
}
|
|
84
|
+
let spanName = "";
|
|
85
|
+
if (routeName) {
|
|
86
|
+
spanName = `request handler - ${routeName}`;
|
|
87
|
+
} else {
|
|
88
|
+
spanName = `middleware - ${middleWare.name || ANONYMOUS_NAME}`;
|
|
89
|
+
}
|
|
90
|
+
const span = instrumentation._startSpan(routeName, middleWare);
|
|
91
|
+
instrumentation._diag.debug("start span", spanName);
|
|
92
|
+
let spanFinished = false;
|
|
93
|
+
function finishSpan() {
|
|
94
|
+
if (!spanFinished) {
|
|
95
|
+
spanFinished = true;
|
|
96
|
+
instrumentation._diag.debug(`finishing span ${span.name}`);
|
|
97
|
+
span.end();
|
|
98
|
+
} else {
|
|
99
|
+
instrumentation._diag.debug(`span ${span.name} - already finished`);
|
|
100
|
+
}
|
|
101
|
+
res.removeListener("close", finishSpan);
|
|
102
|
+
}
|
|
103
|
+
res.addListener("close", finishSpan);
|
|
104
|
+
arguments[nextArgIdx] = instrumentation._patchNext(next, finishSpan);
|
|
105
|
+
return middleWare.apply(this, arguments);
|
|
106
|
+
}
|
|
107
|
+
Object.defineProperty(patchedMiddleware, "length", {
|
|
108
|
+
value: middleWare.length,
|
|
109
|
+
writable: false,
|
|
110
|
+
configurable: true
|
|
111
|
+
});
|
|
112
|
+
return patchedMiddleware;
|
|
113
|
+
}
|
|
114
|
+
_patchUse(original) {
|
|
115
|
+
const instrumentation = this;
|
|
116
|
+
return function(...args) {
|
|
117
|
+
const middleWare = args[args.length - 1];
|
|
118
|
+
const routeName = args[args.length - 2] || "";
|
|
119
|
+
args[args.length - 1] = instrumentation._patchMiddleware(routeName, middleWare);
|
|
120
|
+
return original.apply(this, args);
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
_patchHandle(original) {
|
|
124
|
+
const instrumentation = this;
|
|
125
|
+
return function() {
|
|
126
|
+
const [reqIdx, outIdx] = [0, 2];
|
|
127
|
+
const req = arguments[reqIdx];
|
|
128
|
+
const out = arguments[outIdx];
|
|
129
|
+
const completeStack = addNewStackLayer(req);
|
|
130
|
+
if (typeof out === "function") {
|
|
131
|
+
arguments[outIdx] = instrumentation._patchOut(out, completeStack);
|
|
132
|
+
}
|
|
133
|
+
return original.apply(this, arguments);
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
_patchOut(out, completeStack) {
|
|
137
|
+
return function nextFunction(...args) {
|
|
138
|
+
completeStack();
|
|
139
|
+
return Reflect.apply(out, this, args);
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export { ANONYMOUS_NAME, ConnectInstrumentation };
|
|
145
|
+
//# sourceMappingURL=instrumentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentation.js","sources":["../../../../../../src/integrations/tracing/connect/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-connect\n * - Upstream version: @opentelemetry/instrumentation-connect@0.61.0\n * - Minor TypeScript strictness adjustments for this repository's compiler settings\n */\n/* eslint-disable */\n\nimport { context, Span, SpanOptions } from '@opentelemetry/api';\nimport { getRPCMetadata, RPCType } from '@opentelemetry/core';\nimport type { ServerResponse } from 'http';\nimport { AttributeNames, ConnectNames, ConnectTypes } from './enums/AttributeNames';\nimport { HandleFunction, NextFunction, Server, PatchedRequest, Use, UseArgs, UseArgs2 } from './internal-types';\nimport { SDK_VERSION } from '@sentry/core';\nimport {\n InstrumentationBase,\n InstrumentationConfig,\n InstrumentationNodeModuleDefinition,\n isWrapped,\n} from '@opentelemetry/instrumentation';\nimport { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';\nimport { replaceCurrentStackRoute, addNewStackLayer, generateRoute } from './utils';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-connect';\n\nexport const ANONYMOUS_NAME = 'anonymous';\n\n/** Connect instrumentation for OpenTelemetry */\nexport class ConnectInstrumentation extends InstrumentationBase {\n constructor(config: InstrumentationConfig = {}) {\n super(PACKAGE_NAME, SDK_VERSION, config);\n }\n\n init() {\n return [\n new InstrumentationNodeModuleDefinition('connect', ['>=3.0.0 <4'], moduleExports => {\n return this._patchConstructor(moduleExports);\n }),\n ];\n }\n\n private _patchApp(patchedApp: Server) {\n if (!isWrapped(patchedApp.use)) {\n this._wrap(patchedApp, 'use', this._patchUse.bind(this));\n }\n if (!isWrapped(patchedApp.handle)) {\n this._wrap(patchedApp, 'handle', this._patchHandle.bind(this));\n }\n }\n\n private _patchConstructor(original: () => Server): () => Server {\n const instrumentation = this;\n return function (this: Server, ...args: any[]) {\n const app = original.apply(this, args) as Server;\n instrumentation._patchApp(app);\n return app;\n };\n }\n\n public _patchNext(next: NextFunction, finishSpan: () => void): NextFunction {\n return function nextFunction(this: NextFunction, err?: any): void {\n const result = next.apply(this, [err]);\n finishSpan();\n return result;\n };\n }\n\n public _startSpan(routeName: string, middleWare: HandleFunction): Span {\n let connectType: ConnectTypes;\n let connectName: string;\n let connectTypeName: string;\n if (routeName) {\n connectType = ConnectTypes.REQUEST_HANDLER;\n connectTypeName = ConnectNames.REQUEST_HANDLER;\n connectName = routeName;\n } else {\n connectType = ConnectTypes.MIDDLEWARE;\n connectTypeName = ConnectNames.MIDDLEWARE;\n connectName = middleWare.name || ANONYMOUS_NAME;\n }\n const spanName = `${connectTypeName} - ${connectName}`;\n const options: SpanOptions = {\n attributes: {\n [ATTR_HTTP_ROUTE]: routeName.length > 0 ? routeName : '/',\n [AttributeNames.CONNECT_TYPE]: connectType,\n [AttributeNames.CONNECT_NAME]: connectName,\n },\n };\n\n return this.tracer.startSpan(spanName, options);\n }\n\n public _patchMiddleware(routeName: string, middleWare: HandleFunction): HandleFunction {\n const instrumentation = this;\n const isErrorMiddleware = middleWare.length === 4;\n\n function patchedMiddleware(this: Use): void {\n if (!instrumentation.isEnabled()) {\n return (middleWare as any).apply(this, arguments);\n }\n const [reqArgIdx, resArgIdx, nextArgIdx] = isErrorMiddleware ? [1, 2, 3] : [0, 1, 2];\n const req = arguments[reqArgIdx] as PatchedRequest;\n const res = arguments[resArgIdx] as ServerResponse;\n const next = arguments[nextArgIdx] as NextFunction;\n\n replaceCurrentStackRoute(req, routeName);\n\n const rpcMetadata = getRPCMetadata(context.active());\n if (routeName && rpcMetadata?.type === RPCType.HTTP) {\n rpcMetadata.route = generateRoute(req);\n }\n\n let spanName = '';\n if (routeName) {\n spanName = `request handler - ${routeName}`;\n } else {\n spanName = `middleware - ${middleWare.name || ANONYMOUS_NAME}`;\n }\n const span = instrumentation._startSpan(routeName, middleWare);\n instrumentation._diag.debug('start span', spanName);\n let spanFinished = false;\n\n function finishSpan() {\n if (!spanFinished) {\n spanFinished = true;\n instrumentation._diag.debug(`finishing span ${(span as any).name}`);\n span.end();\n } else {\n instrumentation._diag.debug(`span ${(span as any).name} - already finished`);\n }\n res.removeListener('close', finishSpan);\n }\n\n res.addListener('close', finishSpan);\n arguments[nextArgIdx] = instrumentation._patchNext(next, finishSpan);\n\n return (middleWare as any).apply(this, arguments);\n }\n\n Object.defineProperty(patchedMiddleware, 'length', {\n value: middleWare.length,\n writable: false,\n configurable: true,\n });\n\n return patchedMiddleware;\n }\n\n public _patchUse(original: Server['use']): Use {\n const instrumentation = this;\n return function (this: Server, ...args: UseArgs): Server {\n const middleWare = args[args.length - 1] as HandleFunction;\n const routeName = (args[args.length - 2] || '') as string;\n\n args[args.length - 1] = instrumentation._patchMiddleware(routeName, middleWare);\n\n return original.apply(this, args as UseArgs2);\n };\n }\n\n public _patchHandle(original: Server['handle']): Server['handle'] {\n const instrumentation = this;\n return function (this: Server): ReturnType<Server['handle']> {\n const [reqIdx, outIdx] = [0, 2];\n const req = arguments[reqIdx] as PatchedRequest;\n const out = arguments[outIdx];\n const completeStack = addNewStackLayer(req);\n\n if (typeof out === 'function') {\n arguments[outIdx] = instrumentation._patchOut(out as NextFunction, completeStack);\n }\n\n return (original as any).apply(this, arguments);\n };\n }\n\n public _patchOut(out: NextFunction, completeStack: () => void): NextFunction {\n return function nextFunction(this: NextFunction, ...args: any[]): void {\n completeStack();\n return Reflect.apply(out, this, args);\n };\n }\n}\n"],"names":[],"mappings":";;;;;;;;AAqCA,MAAM,YAAA,GAAe,iCAAA;AAEd,MAAM,cAAA,GAAiB;AAGvB,MAAM,+BAA+B,mBAAA,CAAoB;AAAA,EAC9D,WAAA,CAAY,MAAA,GAAgC,EAAC,EAAG;AAC9C,IAAA,KAAA,CAAM,YAAA,EAAc,aAAa,MAAM,CAAA;AAAA,EACzC;AAAA,EAEA,IAAA,GAAO;AACL,IAAA,OAAO;AAAA,MACL,IAAI,mCAAA,CAAoC,SAAA,EAAW,CAAC,YAAY,GAAG,CAAA,aAAA,KAAiB;AAClF,QAAA,OAAO,IAAA,CAAK,kBAAkB,aAAa,CAAA;AAAA,MAC7C,CAAC;AAAA,KACH;AAAA,EACF;AAAA,EAEQ,UAAU,UAAA,EAAoB;AACpC,IAAA,IAAI,CAAC,SAAA,CAAU,UAAA,CAAW,GAAG,CAAA,EAAG;AAC9B,MAAA,IAAA,CAAK,MAAM,UAAA,EAAY,KAAA,EAAO,KAAK,SAAA,CAAU,IAAA,CAAK,IAAI,CAAC,CAAA;AAAA,IACzD;AACA,IAAA,IAAI,CAAC,SAAA,CAAU,UAAA,CAAW,MAAM,CAAA,EAAG;AACjC,MAAA,IAAA,CAAK,MAAM,UAAA,EAAY,QAAA,EAAU,KAAK,YAAA,CAAa,IAAA,CAAK,IAAI,CAAC,CAAA;AAAA,IAC/D;AAAA,EACF;AAAA,EAEQ,kBAAkB,QAAA,EAAsC;AAC9D,IAAA,MAAM,eAAA,GAAkB,IAAA;AACxB,IAAA,OAAO,YAA2B,IAAA,EAAa;AAC7C,MAAA,MAAM,GAAA,GAAM,QAAA,CAAS,KAAA,CAAM,IAAA,EAAM,IAAI,CAAA;AACrC,MAAA,eAAA,CAAgB,UAAU,GAAG,CAAA;AAC7B,MAAA,OAAO,GAAA;AAAA,IACT,CAAA;AAAA,EACF;AAAA,EAEO,UAAA,CAAW,MAAoB,UAAA,EAAsC;AAC1E,IAAA,OAAO,SAAS,aAAiC,GAAA,EAAiB;AAChE,MAAA,MAAM,SAAS,IAAA,CAAK,KAAA,CAAM,IAAA,EAAM,CAAC,GAAG,CAAC,CAAA;AACrC,MAAA,UAAA,EAAW;AACX,MAAA,OAAO,MAAA;AAAA,IACT,CAAA;AAAA,EACF;AAAA,EAEO,UAAA,CAAW,WAAmB,UAAA,EAAkC;AACrE,IAAA,IAAI,WAAA;AACJ,IAAA,IAAI,WAAA;AACJ,IAAA,IAAI,eAAA;AACJ,IAAA,IAAI,SAAA,EAAW;AACb,MAAA,WAAA,GAAc,YAAA,CAAa,eAAA;AAC3B,MAAA,eAAA,GAAkB,YAAA,CAAa,eAAA;AAC/B,MAAA,WAAA,GAAc,SAAA;AAAA,IAChB,CAAA,MAAO;AACL,MAAA,WAAA,GAAc,YAAA,CAAa,UAAA;AAC3B,MAAA,eAAA,GAAkB,YAAA,CAAa,UAAA;AAC/B,MAAA,WAAA,GAAc,WAAW,IAAA,IAAQ,cAAA;AAAA,IACnC;AACA,IAAA,MAAM,QAAA,GAAW,CAAA,EAAG,eAAe,CAAA,GAAA,EAAM,WAAW,CAAA,CAAA;AACpD,IAAA,MAAM,OAAA,GAAuB;AAAA,MAC3B,UAAA,EAAY;AAAA,QACV,CAAC,eAAe,GAAG,SAAA,CAAU,MAAA,GAAS,IAAI,SAAA,GAAY,GAAA;AAAA,QACtD,CAAC,cAAA,CAAe,YAAY,GAAG,WAAA;AAAA,QAC/B,CAAC,cAAA,CAAe,YAAY,GAAG;AAAA;AACjC,KACF;AAEA,IAAA,OAAO,IAAA,CAAK,MAAA,CAAO,SAAA,CAAU,QAAA,EAAU,OAAO,CAAA;AAAA,EAChD;AAAA,EAEO,gBAAA,CAAiB,WAAmB,UAAA,EAA4C;AACrF,IAAA,MAAM,eAAA,GAAkB,IAAA;AACxB,IAAA,MAAM,iBAAA,GAAoB,WAAW,MAAA,KAAW,CAAA;AAEhD,IAAA,SAAS,iBAAA,GAAmC;AAC1C,MAAA,IAAI,CAAC,eAAA,CAAgB,SAAA,EAAU,EAAG;AAChC,QAAA,OAAQ,UAAA,CAAmB,KAAA,CAAM,IAAA,EAAM,SAAS,CAAA;AAAA,MAClD;AACA,MAAA,MAAM,CAAC,SAAA,EAAW,SAAA,EAAW,UAAU,IAAI,iBAAA,GAAoB,CAAC,CAAA,EAAG,CAAA,EAAG,CAAC,CAAA,GAAI,CAAC,CAAA,EAAG,GAAG,CAAC,CAAA;AACnF,MAAA,MAAM,GAAA,GAAM,UAAU,SAAS,CAAA;AAC/B,MAAA,MAAM,GAAA,GAAM,UAAU,SAAS,CAAA;AAC/B,MAAA,MAAM,IAAA,GAAO,UAAU,UAAU,CAAA;AAEjC,MAAA,wBAAA,CAAyB,KAAK,SAAS,CAAA;AAEvC,MAAA,MAAM,WAAA,GAAc,cAAA,CAAe,OAAA,CAAQ,MAAA,EAAQ,CAAA;AACnD,MAAA,IAAI,SAAA,IAAa,WAAA,EAAa,IAAA,KAAS,OAAA,CAAQ,IAAA,EAAM;AACnD,QAAA,WAAA,CAAY,KAAA,GAAQ,cAAc,GAAG,CAAA;AAAA,MACvC;AAEA,MAAA,IAAI,QAAA,GAAW,EAAA;AACf,MAAA,IAAI,SAAA,EAAW;AACb,QAAA,QAAA,GAAW,qBAAqB,SAAS,CAAA,CAAA;AAAA,MAC3C,CAAA,MAAO;AACL,QAAA,QAAA,GAAW,CAAA,aAAA,EAAgB,UAAA,CAAW,IAAA,IAAQ,cAAc,CAAA,CAAA;AAAA,MAC9D;AACA,MAAA,MAAM,IAAA,GAAO,eAAA,CAAgB,UAAA,CAAW,SAAA,EAAW,UAAU,CAAA;AAC7D,MAAA,eAAA,CAAgB,KAAA,CAAM,KAAA,CAAM,YAAA,EAAc,QAAQ,CAAA;AAClD,MAAA,IAAI,YAAA,GAAe,KAAA;AAEnB,MAAA,SAAS,UAAA,GAAa;AACpB,QAAA,IAAI,CAAC,YAAA,EAAc;AACjB,UAAA,YAAA,GAAe,IAAA;AACf,UAAA,eAAA,CAAgB,KAAA,CAAM,KAAA,CAAM,CAAA,eAAA,EAAmB,IAAA,CAAa,IAAI,CAAA,CAAE,CAAA;AAClE,UAAA,IAAA,CAAK,GAAA,EAAI;AAAA,QACX,CAAA,MAAO;AACL,UAAA,eAAA,CAAgB,KAAA,CAAM,KAAA,CAAM,CAAA,KAAA,EAAS,IAAA,CAAa,IAAI,CAAA,mBAAA,CAAqB,CAAA;AAAA,QAC7E;AACA,QAAA,GAAA,CAAI,cAAA,CAAe,SAAS,UAAU,CAAA;AAAA,MACxC;AAEA,MAAA,GAAA,CAAI,WAAA,CAAY,SAAS,UAAU,CAAA;AACnC,MAAA,SAAA,CAAU,UAAU,CAAA,GAAI,eAAA,CAAgB,UAAA,CAAW,MAAM,UAAU,CAAA;AAEnE,MAAA,OAAQ,UAAA,CAAmB,KAAA,CAAM,IAAA,EAAM,SAAS,CAAA;AAAA,IAClD;AAEA,IAAA,MAAA,CAAO,cAAA,CAAe,mBAAmB,QAAA,EAAU;AAAA,MACjD,OAAO,UAAA,CAAW,MAAA;AAAA,MAClB,QAAA,EAAU,KAAA;AAAA,MACV,YAAA,EAAc;AAAA,KACf,CAAA;AAED,IAAA,OAAO,iBAAA;AAAA,EACT;AAAA,EAEO,UAAU,QAAA,EAA8B;AAC7C,IAAA,MAAM,eAAA,GAAkB,IAAA;AACxB,IAAA,OAAO,YAA2B,IAAA,EAAuB;AACvD,MAAA,MAAM,UAAA,GAAa,IAAA,CAAK,IAAA,CAAK,MAAA,GAAS,CAAC,CAAA;AACvC,MAAA,MAAM,SAAA,GAAa,IAAA,CAAK,IAAA,CAAK,MAAA,GAAS,CAAC,CAAA,IAAK,EAAA;AAE5C,MAAA,IAAA,CAAK,KAAK,MAAA,GAAS,CAAC,IAAI,eAAA,CAAgB,gBAAA,CAAiB,WAAW,UAAU,CAAA;AAE9E,MAAA,OAAO,QAAA,CAAS,KAAA,CAAM,IAAA,EAAM,IAAgB,CAAA;AAAA,IAC9C,CAAA;AAAA,EACF;AAAA,EAEO,aAAa,QAAA,EAA8C;AAChE,IAAA,MAAM,eAAA,GAAkB,IAAA;AACxB,IAAA,OAAO,WAAsD;AAC3D,MAAA,MAAM,CAAC,MAAA,EAAQ,MAAM,CAAA,GAAI,CAAC,GAAG,CAAC,CAAA;AAC9B,MAAA,MAAM,GAAA,GAAM,UAAU,MAAM,CAAA;AAC5B,MAAA,MAAM,GAAA,GAAM,UAAU,MAAM,CAAA;AAC5B,MAAA,MAAM,aAAA,GAAgB,iBAAiB,GAAG,CAAA;AAE1C,MAAA,IAAI,OAAO,QAAQ,UAAA,EAAY;AAC7B,QAAA,SAAA,CAAU,MAAM,CAAA,GAAI,eAAA,CAAgB,SAAA,CAAU,KAAqB,aAAa,CAAA;AAAA,MAClF;AAEA,MAAA,OAAQ,QAAA,CAAiB,KAAA,CAAM,IAAA,EAAM,SAAS,CAAA;AAAA,IAChD,CAAA;AAAA,EACF;AAAA,EAEO,SAAA,CAAU,KAAmB,aAAA,EAAyC;AAC3E,IAAA,OAAO,SAAS,gBAAoC,IAAA,EAAmB;AACrE,MAAA,aAAA,EAAc;AACd,MAAA,OAAO,OAAA,CAAQ,KAAA,CAAM,GAAA,EAAK,IAAA,EAAM,IAAI,CAAA;AAAA,IACtC,CAAA;AAAA,EACF;AACF;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"internal-types.js","sources":["../../../../../../src/integrations/tracing/connect/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-connect\n * - Upstream version: @opentelemetry/instrumentation-connect@0.61.0\n * - Some types vendored from @types/connect\n */\n/* eslint-disable */\n\nimport type * as http from 'http';\n\nexport type IncomingMessage = http.IncomingMessage & {\n originalUrl?: http.IncomingMessage['url'] | undefined;\n};\n\nexport type NextFunction = (err?: any) => void;\n\nexport type SimpleHandleFunction = (req: IncomingMessage, res: http.ServerResponse) => void;\nexport type NextHandleFunction = (req: IncomingMessage, res: http.ServerResponse, next: NextFunction) => void;\nexport type ErrorHandleFunction = (\n err: any,\n req: IncomingMessage,\n res: http.ServerResponse,\n next: NextFunction,\n) => void;\nexport type HandleFunction = SimpleHandleFunction | NextHandleFunction | ErrorHandleFunction;\n\nexport interface Server extends NodeJS.EventEmitter {\n (req: http.IncomingMessage, res: http.ServerResponse, next?: Function): void;\n\n route: string;\n stack: Array<{ route: string; handle: HandleFunction | http.Server }>;\n\n use(fn: NextHandleFunction): Server;\n use(fn: HandleFunction): Server;\n use(route: string, fn: NextHandleFunction): Server;\n use(route: string, fn: HandleFunction): Server;\n\n handle(req: http.IncomingMessage, res: http.ServerResponse, next: Function): void;\n}\n\nexport const _LAYERS_STORE_PROPERTY: unique symbol = Symbol(\n 'opentelemetry.instrumentation-connect.request-route-stack',\n);\n\nexport type UseArgs1 = [HandleFunction];\nexport type UseArgs2 = [string, HandleFunction];\nexport type UseArgs = UseArgs1 | UseArgs2;\nexport type Use = (...args: UseArgs) => Server;\nexport type PatchedRequest = {\n [_LAYERS_STORE_PROPERTY]: string[];\n} & IncomingMessage;\n"],"names":[],"mappings":"AAsDO,MAAM,sBAAA,mBAAwC,MAAA;AAAA,EACnD;AACF;;;;"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { diag } from '@opentelemetry/api';
|
|
2
|
+
import { _LAYERS_STORE_PROPERTY } from './internal-types.js';
|
|
3
|
+
|
|
4
|
+
const addNewStackLayer = (request) => {
|
|
5
|
+
if (Array.isArray(request[_LAYERS_STORE_PROPERTY]) === false) {
|
|
6
|
+
Object.defineProperty(request, _LAYERS_STORE_PROPERTY, {
|
|
7
|
+
enumerable: false,
|
|
8
|
+
value: []
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
request[_LAYERS_STORE_PROPERTY].push("/");
|
|
12
|
+
const stackLength = request[_LAYERS_STORE_PROPERTY].length;
|
|
13
|
+
return () => {
|
|
14
|
+
if (stackLength === request[_LAYERS_STORE_PROPERTY].length) {
|
|
15
|
+
request[_LAYERS_STORE_PROPERTY].pop();
|
|
16
|
+
} else {
|
|
17
|
+
diag.warn("Connect: Trying to pop the stack multiple time");
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
const replaceCurrentStackRoute = (request, newRoute) => {
|
|
22
|
+
if (newRoute) {
|
|
23
|
+
request[_LAYERS_STORE_PROPERTY].splice(-1, 1, newRoute);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const generateRoute = (request) => {
|
|
27
|
+
return request[_LAYERS_STORE_PROPERTY].reduce((acc, sub) => acc.replace(/\/+$/, "") + sub);
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
export { addNewStackLayer, generateRoute, replaceCurrentStackRoute };
|
|
31
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../src/integrations/tracing/connect/vendored/utils.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-connect\n * - Upstream version: @opentelemetry/instrumentation-connect@0.61.0\n */\n/* eslint-disable */\n\nimport { diag } from '@opentelemetry/api';\nimport { _LAYERS_STORE_PROPERTY, PatchedRequest } from './internal-types';\n\nexport const addNewStackLayer = (request: PatchedRequest) => {\n if (Array.isArray(request[_LAYERS_STORE_PROPERTY]) === false) {\n Object.defineProperty(request, _LAYERS_STORE_PROPERTY, {\n enumerable: false,\n value: [],\n });\n }\n request[_LAYERS_STORE_PROPERTY].push('/');\n\n const stackLength = request[_LAYERS_STORE_PROPERTY].length;\n\n return () => {\n if (stackLength === request[_LAYERS_STORE_PROPERTY].length) {\n request[_LAYERS_STORE_PROPERTY].pop();\n } else {\n diag.warn('Connect: Trying to pop the stack multiple time');\n }\n };\n};\n\nexport const replaceCurrentStackRoute = (request: PatchedRequest, newRoute?: string) => {\n if (newRoute) {\n request[_LAYERS_STORE_PROPERTY].splice(-1, 1, newRoute);\n }\n};\n\n// generate route from existing stack on request object.\n// splash between stack layer will be deduped\n// [\"/first/\", \"/second\", \"/third/\"] => /first/second/third/\nexport const generateRoute = (request: PatchedRequest) => {\n return request[_LAYERS_STORE_PROPERTY].reduce((acc, sub) => acc.replace(/\\/+$/, '') + sub);\n};\n"],"names":[],"mappings":";;;AAwBO,MAAM,gBAAA,GAAmB,CAAC,OAAA,KAA4B;AAC3D,EAAA,IAAI,MAAM,OAAA,CAAQ,OAAA,CAAQ,sBAAsB,CAAC,MAAM,KAAA,EAAO;AAC5D,IAAA,MAAA,CAAO,cAAA,CAAe,SAAS,sBAAA,EAAwB;AAAA,MACrD,UAAA,EAAY,KAAA;AAAA,MACZ,OAAO;AAAC,KACT,CAAA;AAAA,EACH;AACA,EAAA,OAAA,CAAQ,sBAAsB,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA;AAExC,EAAA,MAAM,WAAA,GAAc,OAAA,CAAQ,sBAAsB,CAAA,CAAE,MAAA;AAEpD,EAAA,OAAO,MAAM;AACX,IAAA,IAAI,WAAA,KAAgB,OAAA,CAAQ,sBAAsB,CAAA,CAAE,MAAA,EAAQ;AAC1D,MAAA,OAAA,CAAQ,sBAAsB,EAAE,GAAA,EAAI;AAAA,IACtC,CAAA,MAAO;AACL,MAAA,IAAA,CAAK,KAAK,gDAAgD,CAAA;AAAA,IAC5D;AAAA,EACF,CAAA;AACF;AAEO,MAAM,wBAAA,GAA2B,CAAC,OAAA,EAAyB,QAAA,KAAsB;AACtF,EAAA,IAAI,QAAA,EAAU;AACZ,IAAA,OAAA,CAAQ,sBAAsB,CAAA,CAAE,MAAA,CAAO,EAAA,EAAI,GAAG,QAAQ,CAAA;AAAA,EACxD;AACF;AAKO,MAAM,aAAA,GAAgB,CAAC,OAAA,KAA4B;AACxD,EAAA,OAAO,OAAA,CAAQ,sBAAsB,CAAA,CAAE,MAAA,CAAO,CAAC,GAAA,EAAK,GAAA,KAAQ,GAAA,CAAI,OAAA,CAAQ,MAAA,EAAQ,EAAE,CAAA,GAAI,GAAG,CAAA;AAC3F;;;;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DataloaderInstrumentation } from './vendored/instrumentation.js';
|
|
2
|
+
import { defineIntegration, spanToJSON, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, SEMANTIC_ATTRIBUTE_SENTRY_OP } from '@sentry/core';
|
|
3
|
+
import { generateInstrumentOnce, instrumentWhenWrapped } from '@sentry/node-core';
|
|
4
|
+
|
|
5
|
+
const INTEGRATION_NAME = "Dataloader";
|
|
6
|
+
const instrumentDataloader = generateInstrumentOnce(
|
|
7
|
+
INTEGRATION_NAME,
|
|
8
|
+
() => new DataloaderInstrumentation({
|
|
9
|
+
requireParentSpan: true
|
|
10
|
+
})
|
|
11
|
+
);
|
|
12
|
+
const _dataloaderIntegration = (() => {
|
|
13
|
+
let instrumentationWrappedCallback;
|
|
14
|
+
return {
|
|
15
|
+
name: INTEGRATION_NAME,
|
|
16
|
+
setupOnce() {
|
|
17
|
+
const instrumentation = instrumentDataloader();
|
|
18
|
+
instrumentationWrappedCallback = instrumentWhenWrapped(instrumentation);
|
|
19
|
+
},
|
|
20
|
+
setup(client) {
|
|
21
|
+
instrumentationWrappedCallback?.(() => {
|
|
22
|
+
client.on("spanStart", (span) => {
|
|
23
|
+
const spanJSON = spanToJSON(span);
|
|
24
|
+
if (spanJSON.description?.startsWith("dataloader")) {
|
|
25
|
+
span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, "auto.db.otel.dataloader");
|
|
26
|
+
}
|
|
27
|
+
if (spanJSON.description === "dataloader.load" || spanJSON.description === "dataloader.loadMany" || spanJSON.description === "dataloader.batch") {
|
|
28
|
+
span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, "cache.get");
|
|
29
|
+
}
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
const dataloaderIntegration = defineIntegration(_dataloaderIntegration);
|
|
36
|
+
|
|
37
|
+
export { dataloaderIntegration, instrumentDataloader };
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/dataloader/index.ts"],"sourcesContent":["import { DataloaderInstrumentation } from './vendored/instrumentation';\nimport type { IntegrationFn } from '@sentry/core';\nimport {\n defineIntegration,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n spanToJSON,\n} from '@sentry/core';\nimport { generateInstrumentOnce, instrumentWhenWrapped } from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'Dataloader';\n\nexport const instrumentDataloader = generateInstrumentOnce(\n INTEGRATION_NAME,\n () =>\n new DataloaderInstrumentation({\n requireParentSpan: true,\n }),\n);\n\nconst _dataloaderIntegration = (() => {\n let instrumentationWrappedCallback: undefined | ((callback: () => void) => void);\n\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n const instrumentation = instrumentDataloader();\n instrumentationWrappedCallback = instrumentWhenWrapped(instrumentation);\n },\n\n setup(client) {\n // This is called either immediately or when the instrumentation is wrapped\n instrumentationWrappedCallback?.(() => {\n client.on('spanStart', span => {\n const spanJSON = spanToJSON(span);\n if (spanJSON.description?.startsWith('dataloader')) {\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.db.otel.dataloader');\n }\n\n // These are all possible dataloader span descriptions\n // Still checking for the future versions\n // in case they add support for `clear` and `prime`\n if (\n spanJSON.description === 'dataloader.load' ||\n spanJSON.description === 'dataloader.loadMany' ||\n spanJSON.description === 'dataloader.batch'\n ) {\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, 'cache.get');\n // TODO: We can try adding `key` to the `data` attribute upstream.\n // Or alternatively, we can add `requestHook` to the dataloader instrumentation.\n }\n });\n });\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [dataloader](https://www.npmjs.com/package/dataloader) library.\n *\n * For more information, see the [`dataloaderIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/dataloader/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.dataloaderIntegration()],\n * });\n * ```\n */\nexport const dataloaderIntegration = defineIntegration(_dataloaderIntegration);\n"],"names":[],"mappings":";;;;AAUA,MAAM,gBAAA,GAAmB,YAAA;AAElB,MAAM,oBAAA,GAAuB,sBAAA;AAAA,EAClC,gBAAA;AAAA,EACA,MACE,IAAI,yBAAA,CAA0B;AAAA,IAC5B,iBAAA,EAAmB;AAAA,GACpB;AACL;AAEA,MAAM,0BAA0B,MAAM;AACpC,EAAA,IAAI,8BAAA;AAEJ,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,MAAM,kBAAkB,oBAAA,EAAqB;AAC7C,MAAA,8BAAA,GAAiC,sBAAsB,eAAe,CAAA;AAAA,IACxE,CAAA;AAAA,IAEA,MAAM,MAAA,EAAQ;AAEZ,MAAA,8BAAA,GAAiC,MAAM;AACrC,QAAA,MAAA,CAAO,EAAA,CAAG,aAAa,CAAA,IAAA,KAAQ;AAC7B,UAAA,MAAM,QAAA,GAAW,WAAW,IAAI,CAAA;AAChC,UAAA,IAAI,QAAA,CAAS,WAAA,EAAa,UAAA,CAAW,YAAY,CAAA,EAAG;AAClD,YAAA,IAAA,CAAK,YAAA,CAAa,kCAAkC,yBAAyB,CAAA;AAAA,UAC/E;AAKA,UAAA,IACE,QAAA,CAAS,gBAAgB,iBAAA,IACzB,QAAA,CAAS,gBAAgB,qBAAA,IACzB,QAAA,CAAS,gBAAgB,kBAAA,EACzB;AACA,YAAA,IAAA,CAAK,YAAA,CAAa,8BAA8B,WAAW,CAAA;AAAA,UAG7D;AAAA,QACF,CAAC,CAAA;AAAA,MACH,CAAC,CAAA;AAAA,IACH;AAAA,GACF;AACF,CAAA,CAAA;AAgBO,MAAM,qBAAA,GAAwB,kBAAkB,sBAAsB;;;;"}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { InstrumentationBase, InstrumentationNodeModuleDefinition, isWrapped } from '@opentelemetry/instrumentation';
|
|
2
|
+
import { trace, context, SpanStatusCode, SpanKind } from '@opentelemetry/api';
|
|
3
|
+
import { SDK_VERSION } from '@sentry/core';
|
|
4
|
+
|
|
5
|
+
const MODULE_NAME = "dataloader";
|
|
6
|
+
const PACKAGE_NAME = "@sentry/instrumentation-dataloader";
|
|
7
|
+
function extractModuleExports(module) {
|
|
8
|
+
return module[Symbol.toStringTag] === "Module" ? module.default : module;
|
|
9
|
+
}
|
|
10
|
+
class DataloaderInstrumentation extends InstrumentationBase {
|
|
11
|
+
constructor(config = {}) {
|
|
12
|
+
super(PACKAGE_NAME, SDK_VERSION, config);
|
|
13
|
+
}
|
|
14
|
+
init() {
|
|
15
|
+
return [
|
|
16
|
+
new InstrumentationNodeModuleDefinition(
|
|
17
|
+
MODULE_NAME,
|
|
18
|
+
[">=2.0.0 <3"],
|
|
19
|
+
(module) => {
|
|
20
|
+
const dataloader = extractModuleExports(module);
|
|
21
|
+
this._patchLoad(dataloader.prototype);
|
|
22
|
+
this._patchLoadMany(dataloader.prototype);
|
|
23
|
+
this._patchPrime(dataloader.prototype);
|
|
24
|
+
this._patchClear(dataloader.prototype);
|
|
25
|
+
this._patchClearAll(dataloader.prototype);
|
|
26
|
+
return this._getPatchedConstructor(dataloader);
|
|
27
|
+
},
|
|
28
|
+
(module) => {
|
|
29
|
+
const dataloader = extractModuleExports(module);
|
|
30
|
+
["load", "loadMany", "prime", "clear", "clearAll"].forEach((method) => {
|
|
31
|
+
if (isWrapped(dataloader.prototype[method])) {
|
|
32
|
+
this._unwrap(dataloader.prototype, method);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
)
|
|
37
|
+
];
|
|
38
|
+
}
|
|
39
|
+
shouldCreateSpans() {
|
|
40
|
+
const config = this.getConfig();
|
|
41
|
+
const hasParentSpan = trace.getSpan(context.active()) !== void 0;
|
|
42
|
+
return hasParentSpan || !config.requireParentSpan;
|
|
43
|
+
}
|
|
44
|
+
getSpanName(dataloader, operation) {
|
|
45
|
+
const dataloaderName = dataloader.name;
|
|
46
|
+
if (dataloaderName === void 0 || dataloaderName === null) {
|
|
47
|
+
return `${MODULE_NAME}.${operation}`;
|
|
48
|
+
}
|
|
49
|
+
return `${MODULE_NAME}.${operation} ${dataloaderName}`;
|
|
50
|
+
}
|
|
51
|
+
_wrapBatchLoadFn(batchLoadFn) {
|
|
52
|
+
const instrumentation = this;
|
|
53
|
+
return function patchedBatchLoadFn(...args) {
|
|
54
|
+
if (!instrumentation.isEnabled() || !instrumentation.shouldCreateSpans()) {
|
|
55
|
+
return batchLoadFn.call(this, ...args);
|
|
56
|
+
}
|
|
57
|
+
const parent = context.active();
|
|
58
|
+
const span = instrumentation.tracer.startSpan(
|
|
59
|
+
instrumentation.getSpanName(this, "batch"),
|
|
60
|
+
{ links: this._batch?.spanLinks },
|
|
61
|
+
parent
|
|
62
|
+
);
|
|
63
|
+
return context.with(trace.setSpan(parent, span), () => {
|
|
64
|
+
return batchLoadFn.apply(this, args).then((value) => {
|
|
65
|
+
span.end();
|
|
66
|
+
return value;
|
|
67
|
+
}).catch((err) => {
|
|
68
|
+
span.recordException(err);
|
|
69
|
+
span.setStatus({
|
|
70
|
+
code: SpanStatusCode.ERROR,
|
|
71
|
+
message: err.message
|
|
72
|
+
});
|
|
73
|
+
span.end();
|
|
74
|
+
throw err;
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
}
|
|
79
|
+
_getPatchedConstructor(constructor) {
|
|
80
|
+
const instrumentation = this;
|
|
81
|
+
const prototype = constructor.prototype;
|
|
82
|
+
if (!instrumentation.isEnabled()) {
|
|
83
|
+
return constructor;
|
|
84
|
+
}
|
|
85
|
+
function PatchedDataloader(...args) {
|
|
86
|
+
if (typeof args[0] === "function") {
|
|
87
|
+
if (isWrapped(args[0])) {
|
|
88
|
+
instrumentation._unwrap(args, 0);
|
|
89
|
+
}
|
|
90
|
+
args[0] = instrumentation._wrapBatchLoadFn(args[0]);
|
|
91
|
+
}
|
|
92
|
+
return constructor.apply(this, args);
|
|
93
|
+
}
|
|
94
|
+
PatchedDataloader.prototype = prototype;
|
|
95
|
+
return PatchedDataloader;
|
|
96
|
+
}
|
|
97
|
+
_patchLoad(proto) {
|
|
98
|
+
if (isWrapped(proto.load)) {
|
|
99
|
+
this._unwrap(proto, "load");
|
|
100
|
+
}
|
|
101
|
+
this._wrap(proto, "load", this._getPatchedLoad.bind(this));
|
|
102
|
+
}
|
|
103
|
+
_getPatchedLoad(original) {
|
|
104
|
+
const instrumentation = this;
|
|
105
|
+
return function patchedLoad(...args) {
|
|
106
|
+
if (!instrumentation.shouldCreateSpans()) {
|
|
107
|
+
return original.call(this, ...args);
|
|
108
|
+
}
|
|
109
|
+
const parent = context.active();
|
|
110
|
+
const span = instrumentation.tracer.startSpan(
|
|
111
|
+
instrumentation.getSpanName(this, "load"),
|
|
112
|
+
{ kind: SpanKind.CLIENT },
|
|
113
|
+
parent
|
|
114
|
+
);
|
|
115
|
+
return context.with(trace.setSpan(parent, span), () => {
|
|
116
|
+
const result = original.call(this, ...args).then((value) => {
|
|
117
|
+
span.end();
|
|
118
|
+
return value;
|
|
119
|
+
}).catch((err) => {
|
|
120
|
+
span.recordException(err);
|
|
121
|
+
span.setStatus({
|
|
122
|
+
code: SpanStatusCode.ERROR,
|
|
123
|
+
message: err.message
|
|
124
|
+
});
|
|
125
|
+
span.end();
|
|
126
|
+
throw err;
|
|
127
|
+
});
|
|
128
|
+
const loader = this;
|
|
129
|
+
if (loader._batch) {
|
|
130
|
+
if (!loader._batch.spanLinks) {
|
|
131
|
+
loader._batch.spanLinks = [];
|
|
132
|
+
}
|
|
133
|
+
loader._batch.spanLinks.push({ context: span.spanContext() });
|
|
134
|
+
}
|
|
135
|
+
return result;
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
_patchLoadMany(proto) {
|
|
140
|
+
if (isWrapped(proto.loadMany)) {
|
|
141
|
+
this._unwrap(proto, "loadMany");
|
|
142
|
+
}
|
|
143
|
+
this._wrap(proto, "loadMany", this._getPatchedLoadMany.bind(this));
|
|
144
|
+
}
|
|
145
|
+
_getPatchedLoadMany(original) {
|
|
146
|
+
const instrumentation = this;
|
|
147
|
+
return function patchedLoadMany(...args) {
|
|
148
|
+
if (!instrumentation.shouldCreateSpans()) {
|
|
149
|
+
return original.call(this, ...args);
|
|
150
|
+
}
|
|
151
|
+
const parent = context.active();
|
|
152
|
+
const span = instrumentation.tracer.startSpan(
|
|
153
|
+
instrumentation.getSpanName(this, "loadMany"),
|
|
154
|
+
{ kind: SpanKind.CLIENT },
|
|
155
|
+
parent
|
|
156
|
+
);
|
|
157
|
+
return context.with(trace.setSpan(parent, span), () => {
|
|
158
|
+
return original.call(this, ...args).then((value) => {
|
|
159
|
+
span.end();
|
|
160
|
+
return value;
|
|
161
|
+
});
|
|
162
|
+
});
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
_patchPrime(proto) {
|
|
166
|
+
if (isWrapped(proto.prime)) {
|
|
167
|
+
this._unwrap(proto, "prime");
|
|
168
|
+
}
|
|
169
|
+
this._wrap(proto, "prime", this._getPatchedPrime.bind(this));
|
|
170
|
+
}
|
|
171
|
+
_getPatchedPrime(original) {
|
|
172
|
+
const instrumentation = this;
|
|
173
|
+
return function patchedPrime(...args) {
|
|
174
|
+
if (!instrumentation.shouldCreateSpans()) {
|
|
175
|
+
return original.call(this, ...args);
|
|
176
|
+
}
|
|
177
|
+
const parent = context.active();
|
|
178
|
+
const span = instrumentation.tracer.startSpan(
|
|
179
|
+
instrumentation.getSpanName(this, "prime"),
|
|
180
|
+
{ kind: SpanKind.CLIENT },
|
|
181
|
+
parent
|
|
182
|
+
);
|
|
183
|
+
const ret = context.with(trace.setSpan(parent, span), () => {
|
|
184
|
+
return original.call(this, ...args);
|
|
185
|
+
});
|
|
186
|
+
span.end();
|
|
187
|
+
return ret;
|
|
188
|
+
};
|
|
189
|
+
}
|
|
190
|
+
_patchClear(proto) {
|
|
191
|
+
if (isWrapped(proto.clear)) {
|
|
192
|
+
this._unwrap(proto, "clear");
|
|
193
|
+
}
|
|
194
|
+
this._wrap(proto, "clear", this._getPatchedClear.bind(this));
|
|
195
|
+
}
|
|
196
|
+
_getPatchedClear(original) {
|
|
197
|
+
const instrumentation = this;
|
|
198
|
+
return function patchedClear(...args) {
|
|
199
|
+
if (!instrumentation.shouldCreateSpans()) {
|
|
200
|
+
return original.call(this, ...args);
|
|
201
|
+
}
|
|
202
|
+
const parent = context.active();
|
|
203
|
+
const span = instrumentation.tracer.startSpan(
|
|
204
|
+
instrumentation.getSpanName(this, "clear"),
|
|
205
|
+
{ kind: SpanKind.CLIENT },
|
|
206
|
+
parent
|
|
207
|
+
);
|
|
208
|
+
const ret = context.with(trace.setSpan(parent, span), () => {
|
|
209
|
+
return original.call(this, ...args);
|
|
210
|
+
});
|
|
211
|
+
span.end();
|
|
212
|
+
return ret;
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
_patchClearAll(proto) {
|
|
216
|
+
if (isWrapped(proto.clearAll)) {
|
|
217
|
+
this._unwrap(proto, "clearAll");
|
|
218
|
+
}
|
|
219
|
+
this._wrap(proto, "clearAll", this._getPatchedClearAll.bind(this));
|
|
220
|
+
}
|
|
221
|
+
_getPatchedClearAll(original) {
|
|
222
|
+
const instrumentation = this;
|
|
223
|
+
return function patchedClearAll(...args) {
|
|
224
|
+
if (!instrumentation.shouldCreateSpans()) {
|
|
225
|
+
return original.call(this, ...args);
|
|
226
|
+
}
|
|
227
|
+
const parent = context.active();
|
|
228
|
+
const span = instrumentation.tracer.startSpan(
|
|
229
|
+
instrumentation.getSpanName(this, "clearAll"),
|
|
230
|
+
{ kind: SpanKind.CLIENT },
|
|
231
|
+
parent
|
|
232
|
+
);
|
|
233
|
+
const ret = context.with(trace.setSpan(parent, span), () => {
|
|
234
|
+
return original.call(this, ...args);
|
|
235
|
+
});
|
|
236
|
+
span.end();
|
|
237
|
+
return ret;
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export { DataloaderInstrumentation };
|
|
243
|
+
//# sourceMappingURL=instrumentation.js.map
|