@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
|
@@ -3,160 +3,114 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
3
3
|
const api = require('@opentelemetry/api');
|
|
4
4
|
const instrumentation = require('@opentelemetry/instrumentation');
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* @param unwrap - reference to native instrumentation unwrap function
|
|
12
|
-
* @param config - Firebase instrumentation config
|
|
13
|
-
*/
|
|
14
|
-
function patchFunctions(
|
|
15
|
-
tracer,
|
|
16
|
-
functionsSupportedVersions,
|
|
17
|
-
wrap,
|
|
18
|
-
unwrap,
|
|
19
|
-
config,
|
|
20
|
-
) {
|
|
21
|
-
let requestHook = () => {};
|
|
22
|
-
let responseHook = () => {};
|
|
6
|
+
function patchFunctions(tracer, functionsSupportedVersions, wrap, unwrap, config) {
|
|
7
|
+
let requestHook = () => {
|
|
8
|
+
};
|
|
9
|
+
let responseHook = () => {
|
|
10
|
+
};
|
|
23
11
|
const errorHook = config.functions?.errorHook;
|
|
24
12
|
const configRequestHook = config.functions?.requestHook;
|
|
25
13
|
const configResponseHook = config.functions?.responseHook;
|
|
26
|
-
|
|
27
|
-
if (typeof configResponseHook === 'function') {
|
|
14
|
+
if (typeof configResponseHook === "function") {
|
|
28
15
|
responseHook = (span, err) => {
|
|
29
16
|
instrumentation.safeExecuteInTheMiddle(
|
|
30
17
|
() => configResponseHook(span, err),
|
|
31
|
-
error => {
|
|
18
|
+
(error) => {
|
|
32
19
|
if (!error) {
|
|
33
20
|
return;
|
|
34
21
|
}
|
|
35
22
|
api.diag.error(error?.message);
|
|
36
23
|
},
|
|
37
|
-
true
|
|
24
|
+
true
|
|
38
25
|
);
|
|
39
26
|
};
|
|
40
27
|
}
|
|
41
|
-
if (typeof configRequestHook ===
|
|
28
|
+
if (typeof configRequestHook === "function") {
|
|
42
29
|
requestHook = (span) => {
|
|
43
30
|
instrumentation.safeExecuteInTheMiddle(
|
|
44
31
|
() => configRequestHook(span),
|
|
45
|
-
error => {
|
|
32
|
+
(error) => {
|
|
46
33
|
if (!error) {
|
|
47
34
|
return;
|
|
48
35
|
}
|
|
49
36
|
api.diag.error(error?.message);
|
|
50
37
|
},
|
|
51
|
-
true
|
|
38
|
+
true
|
|
52
39
|
);
|
|
53
40
|
};
|
|
54
41
|
}
|
|
55
|
-
|
|
56
|
-
const moduleFunctionsCJS = new instrumentation.InstrumentationNodeModuleDefinition('firebase-functions', functionsSupportedVersions);
|
|
42
|
+
const moduleFunctionsCJS = new instrumentation.InstrumentationNodeModuleDefinition("firebase-functions", functionsSupportedVersions);
|
|
57
43
|
const modulesToInstrument = [
|
|
58
|
-
{ name:
|
|
59
|
-
{ name:
|
|
60
|
-
{ name:
|
|
61
|
-
{ name:
|
|
62
|
-
]
|
|
63
|
-
|
|
44
|
+
{ name: "firebase-functions/lib/v2/providers/https.js", triggerType: "function" },
|
|
45
|
+
{ name: "firebase-functions/lib/v2/providers/firestore.js", triggerType: "firestore" },
|
|
46
|
+
{ name: "firebase-functions/lib/v2/providers/scheduler.js", triggerType: "scheduler" },
|
|
47
|
+
{ name: "firebase-functions/lib/v2/storage.js", triggerType: "storage" }
|
|
48
|
+
];
|
|
64
49
|
modulesToInstrument.forEach(({ name, triggerType }) => {
|
|
65
50
|
moduleFunctionsCJS.files.push(
|
|
66
51
|
new instrumentation.InstrumentationNodeModuleFile(
|
|
67
52
|
name,
|
|
68
53
|
functionsSupportedVersions,
|
|
69
|
-
moduleExports =>
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
),
|
|
54
|
+
(moduleExports) => wrapCommonFunctions(
|
|
55
|
+
moduleExports,
|
|
56
|
+
wrap,
|
|
57
|
+
unwrap,
|
|
58
|
+
tracer,
|
|
59
|
+
{ requestHook, responseHook, errorHook },
|
|
60
|
+
triggerType
|
|
61
|
+
),
|
|
62
|
+
(moduleExports) => unwrapCommonFunctions(moduleExports, unwrap)
|
|
63
|
+
)
|
|
80
64
|
);
|
|
81
65
|
});
|
|
82
|
-
|
|
83
66
|
return moduleFunctionsCJS;
|
|
84
67
|
}
|
|
85
|
-
|
|
86
|
-
/**
|
|
87
|
-
* Patches Cloud Functions for Firebase (v2) to add OpenTelemetry instrumentation
|
|
88
|
-
*
|
|
89
|
-
* @param tracer - Opentelemetry Tracer
|
|
90
|
-
* @param functionsConfig - Firebase instrumentation config
|
|
91
|
-
* @param triggerType - Type of trigger
|
|
92
|
-
* @returns A function that patches the function
|
|
93
|
-
*/
|
|
94
|
-
function patchV2Functions(
|
|
95
|
-
tracer,
|
|
96
|
-
functionsConfig,
|
|
97
|
-
triggerType,
|
|
98
|
-
) {
|
|
68
|
+
function patchV2Functions(tracer, functionsConfig, triggerType) {
|
|
99
69
|
return function v2FunctionsWrapper(original) {
|
|
100
|
-
return function
|
|
101
|
-
const handler = typeof args[0] ===
|
|
102
|
-
const documentOrOptions = typeof args[0] ===
|
|
103
|
-
|
|
70
|
+
return function(...args) {
|
|
71
|
+
const handler = typeof args[0] === "function" ? args[0] : args[1];
|
|
72
|
+
const documentOrOptions = typeof args[0] === "function" ? void 0 : args[0];
|
|
104
73
|
if (!handler) {
|
|
105
74
|
return original.call(this, ...args);
|
|
106
75
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
const functionName = process.env.FUNCTION_TARGET || process.env.K_SERVICE || 'unknown';
|
|
76
|
+
const wrappedHandler = async function(...handlerArgs) {
|
|
77
|
+
const functionName = process.env.FUNCTION_TARGET || process.env.K_SERVICE || "unknown";
|
|
110
78
|
const span = tracer.startSpan(`firebase.function.${triggerType}`, {
|
|
111
|
-
kind: api.SpanKind.SERVER
|
|
79
|
+
kind: api.SpanKind.SERVER
|
|
112
80
|
});
|
|
113
|
-
|
|
114
81
|
const attributes = {
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
82
|
+
"faas.name": functionName,
|
|
83
|
+
"faas.trigger": triggerType,
|
|
84
|
+
"faas.provider": "firebase"
|
|
118
85
|
};
|
|
119
|
-
|
|
120
86
|
if (process.env.GCLOUD_PROJECT) {
|
|
121
|
-
attributes[
|
|
87
|
+
attributes["cloud.project_id"] = process.env.GCLOUD_PROJECT;
|
|
122
88
|
}
|
|
123
|
-
|
|
124
89
|
if (process.env.EVENTARC_CLOUD_EVENT_SOURCE) {
|
|
125
|
-
attributes[
|
|
90
|
+
attributes["cloud.event_source"] = process.env.EVENTARC_CLOUD_EVENT_SOURCE;
|
|
126
91
|
}
|
|
127
|
-
|
|
128
92
|
span.setAttributes(attributes);
|
|
129
93
|
functionsConfig?.requestHook?.(span);
|
|
130
|
-
|
|
131
|
-
// Can be changed to safeExecuteInTheMiddleAsync once following is merged and released
|
|
132
|
-
// https://github.com/open-telemetry/opentelemetry-js/pull/6032
|
|
133
94
|
return api.context.with(api.trace.setSpan(api.context.active(), span), async () => {
|
|
134
95
|
let error;
|
|
135
96
|
let result;
|
|
136
|
-
|
|
137
97
|
try {
|
|
138
98
|
result = await handler.apply(this, handlerArgs);
|
|
139
99
|
} catch (e) {
|
|
140
|
-
error = e
|
|
100
|
+
error = e;
|
|
141
101
|
}
|
|
142
|
-
|
|
143
102
|
functionsConfig?.responseHook?.(span, error);
|
|
144
|
-
|
|
145
103
|
if (error) {
|
|
146
104
|
span.recordException(error);
|
|
147
105
|
}
|
|
148
|
-
|
|
149
106
|
span.end();
|
|
150
|
-
|
|
151
107
|
if (error) {
|
|
152
108
|
await functionsConfig?.errorHook?.(span, error);
|
|
153
109
|
throw error;
|
|
154
110
|
}
|
|
155
|
-
|
|
156
111
|
return result;
|
|
157
112
|
});
|
|
158
113
|
};
|
|
159
|
-
|
|
160
114
|
if (documentOrOptions) {
|
|
161
115
|
return original.call(this, documentOrOptions, wrappedHandler);
|
|
162
116
|
} else {
|
|
@@ -165,93 +119,73 @@ function patchV2Functions(
|
|
|
165
119
|
};
|
|
166
120
|
};
|
|
167
121
|
}
|
|
168
|
-
|
|
169
|
-
function wrapCommonFunctions(
|
|
170
|
-
moduleExports,
|
|
171
|
-
wrap,
|
|
172
|
-
unwrap,
|
|
173
|
-
tracer,
|
|
174
|
-
functionsConfig,
|
|
175
|
-
triggerType,
|
|
176
|
-
) {
|
|
122
|
+
function wrapCommonFunctions(moduleExports, wrap, unwrap, tracer, functionsConfig, triggerType) {
|
|
177
123
|
unwrapCommonFunctions(moduleExports, unwrap);
|
|
178
|
-
|
|
179
124
|
switch (triggerType) {
|
|
180
|
-
case
|
|
181
|
-
wrap(moduleExports,
|
|
182
|
-
wrap(moduleExports,
|
|
125
|
+
case "function":
|
|
126
|
+
wrap(moduleExports, "onRequest", patchV2Functions(tracer, functionsConfig, "http.request"));
|
|
127
|
+
wrap(moduleExports, "onCall", patchV2Functions(tracer, functionsConfig, "http.call"));
|
|
183
128
|
break;
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
wrap(moduleExports,
|
|
187
|
-
wrap(moduleExports,
|
|
188
|
-
wrap(moduleExports,
|
|
189
|
-
wrap(moduleExports, 'onDocumentWritten', patchV2Functions(tracer, functionsConfig, 'firestore.document.written'));
|
|
129
|
+
case "firestore":
|
|
130
|
+
wrap(moduleExports, "onDocumentCreated", patchV2Functions(tracer, functionsConfig, "firestore.document.created"));
|
|
131
|
+
wrap(moduleExports, "onDocumentUpdated", patchV2Functions(tracer, functionsConfig, "firestore.document.updated"));
|
|
132
|
+
wrap(moduleExports, "onDocumentDeleted", patchV2Functions(tracer, functionsConfig, "firestore.document.deleted"));
|
|
133
|
+
wrap(moduleExports, "onDocumentWritten", patchV2Functions(tracer, functionsConfig, "firestore.document.written"));
|
|
190
134
|
wrap(
|
|
191
135
|
moduleExports,
|
|
192
|
-
|
|
193
|
-
patchV2Functions(tracer, functionsConfig,
|
|
136
|
+
"onDocumentCreatedWithAuthContext",
|
|
137
|
+
patchV2Functions(tracer, functionsConfig, "firestore.document.created")
|
|
194
138
|
);
|
|
195
139
|
wrap(
|
|
196
140
|
moduleExports,
|
|
197
|
-
|
|
198
|
-
patchV2Functions(tracer, functionsConfig,
|
|
141
|
+
"onDocumentUpdatedWithAuthContext",
|
|
142
|
+
patchV2Functions(tracer, functionsConfig, "firestore.document.updated")
|
|
199
143
|
);
|
|
200
|
-
|
|
201
144
|
wrap(
|
|
202
145
|
moduleExports,
|
|
203
|
-
|
|
204
|
-
patchV2Functions(tracer, functionsConfig,
|
|
146
|
+
"onDocumentDeletedWithAuthContext",
|
|
147
|
+
patchV2Functions(tracer, functionsConfig, "firestore.document.deleted")
|
|
205
148
|
);
|
|
206
|
-
|
|
207
149
|
wrap(
|
|
208
150
|
moduleExports,
|
|
209
|
-
|
|
210
|
-
patchV2Functions(tracer, functionsConfig,
|
|
151
|
+
"onDocumentWrittenWithAuthContext",
|
|
152
|
+
patchV2Functions(tracer, functionsConfig, "firestore.document.written")
|
|
211
153
|
);
|
|
212
154
|
break;
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
wrap(moduleExports, 'onSchedule', patchV2Functions(tracer, functionsConfig, 'scheduler.scheduled'));
|
|
155
|
+
case "scheduler":
|
|
156
|
+
wrap(moduleExports, "onSchedule", patchV2Functions(tracer, functionsConfig, "scheduler.scheduled"));
|
|
216
157
|
break;
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
wrap(moduleExports,
|
|
220
|
-
wrap(moduleExports,
|
|
221
|
-
wrap(moduleExports, 'onObjectDeleted', patchV2Functions(tracer, functionsConfig, 'storage.object.deleted'));
|
|
158
|
+
case "storage":
|
|
159
|
+
wrap(moduleExports, "onObjectFinalized", patchV2Functions(tracer, functionsConfig, "storage.object.finalized"));
|
|
160
|
+
wrap(moduleExports, "onObjectArchived", patchV2Functions(tracer, functionsConfig, "storage.object.archived"));
|
|
161
|
+
wrap(moduleExports, "onObjectDeleted", patchV2Functions(tracer, functionsConfig, "storage.object.deleted"));
|
|
222
162
|
wrap(
|
|
223
163
|
moduleExports,
|
|
224
|
-
|
|
225
|
-
patchV2Functions(tracer, functionsConfig,
|
|
164
|
+
"onObjectMetadataUpdated",
|
|
165
|
+
patchV2Functions(tracer, functionsConfig, "storage.object.metadataUpdated")
|
|
226
166
|
);
|
|
227
167
|
break;
|
|
228
168
|
}
|
|
229
|
-
|
|
230
169
|
return moduleExports;
|
|
231
170
|
}
|
|
232
|
-
|
|
233
|
-
function unwrapCommonFunctions(
|
|
234
|
-
moduleExports,
|
|
235
|
-
unwrap,
|
|
236
|
-
) {
|
|
171
|
+
function unwrapCommonFunctions(moduleExports, unwrap) {
|
|
237
172
|
const methods = [
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
173
|
+
"onSchedule",
|
|
174
|
+
"onRequest",
|
|
175
|
+
"onCall",
|
|
176
|
+
"onObjectFinalized",
|
|
177
|
+
"onObjectArchived",
|
|
178
|
+
"onObjectDeleted",
|
|
179
|
+
"onObjectMetadataUpdated",
|
|
180
|
+
"onDocumentCreated",
|
|
181
|
+
"onDocumentUpdated",
|
|
182
|
+
"onDocumentDeleted",
|
|
183
|
+
"onDocumentWritten",
|
|
184
|
+
"onDocumentCreatedWithAuthContext",
|
|
185
|
+
"onDocumentUpdatedWithAuthContext",
|
|
186
|
+
"onDocumentDeletedWithAuthContext",
|
|
187
|
+
"onDocumentWrittenWithAuthContext"
|
|
253
188
|
];
|
|
254
|
-
|
|
255
189
|
for (const method of methods) {
|
|
256
190
|
if (instrumentation.isWrapped(moduleExports[method])) {
|
|
257
191
|
unwrap(moduleExports, method);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sources":["../../../../../../../src/integrations/tracing/firebase/otel/patches/functions.ts"],"sourcesContent":["import type { Span, Tracer } from '@opentelemetry/api';\nimport { context, diag, SpanKind, trace } from '@opentelemetry/api';\nimport type { InstrumentationBase } from '@opentelemetry/instrumentation';\nimport {\n InstrumentationNodeModuleDefinition,\n InstrumentationNodeModuleFile,\n isWrapped,\n safeExecuteInTheMiddle,\n} from '@opentelemetry/instrumentation';\nimport type { SpanAttributes } from '@sentry/core';\nimport type { FirebaseInstrumentation } from '../firebaseInstrumentation';\nimport type {\n AvailableFirebaseFunctions,\n FirebaseFunctions,\n FirebaseInstrumentationConfig,\n OverloadedParameters,\n RequestHook,\n ResponseHook,\n} from '../types';\n\n/**\n * Patches Firebase Functions v2 to add OpenTelemetry instrumentation\n * @param tracer - Opentelemetry Tracer\n * @param functionsSupportedVersions - supported versions of firebase-functions\n * @param wrap - reference to native instrumentation wrap function\n * @param unwrap - reference to native instrumentation unwrap function\n * @param config - Firebase instrumentation config\n */\nexport function patchFunctions(\n tracer: Tracer,\n functionsSupportedVersions: string[],\n wrap: InstrumentationBase['_wrap'],\n unwrap: InstrumentationBase['_unwrap'],\n config: FirebaseInstrumentationConfig,\n): InstrumentationNodeModuleDefinition {\n let requestHook: RequestHook = () => {};\n let responseHook: ResponseHook = () => {};\n const errorHook = config.functions?.errorHook;\n const configRequestHook = config.functions?.requestHook;\n const configResponseHook = config.functions?.responseHook;\n\n if (typeof configResponseHook === 'function') {\n responseHook = (span: Span, err: unknown) => {\n safeExecuteInTheMiddle(\n () => configResponseHook(span, err),\n error => {\n if (!error) {\n return;\n }\n diag.error(error?.message);\n },\n true,\n );\n };\n }\n if (typeof configRequestHook === 'function') {\n requestHook = (span: Span) => {\n safeExecuteInTheMiddle(\n () => configRequestHook(span),\n error => {\n if (!error) {\n return;\n }\n diag.error(error?.message);\n },\n true,\n );\n };\n }\n\n const moduleFunctionsCJS = new InstrumentationNodeModuleDefinition('firebase-functions', functionsSupportedVersions);\n const modulesToInstrument = [\n { name: 'firebase-functions/lib/v2/providers/https.js', triggerType: 'function' },\n { name: 'firebase-functions/lib/v2/providers/firestore.js', triggerType: 'firestore' },\n { name: 'firebase-functions/lib/v2/providers/scheduler.js', triggerType: 'scheduler' },\n { name: 'firebase-functions/lib/v2/storage.js', triggerType: 'storage' },\n ] as const;\n\n modulesToInstrument.forEach(({ name, triggerType }) => {\n moduleFunctionsCJS.files.push(\n new InstrumentationNodeModuleFile(\n name,\n functionsSupportedVersions,\n moduleExports =>\n wrapCommonFunctions(\n moduleExports,\n wrap,\n unwrap,\n tracer,\n { requestHook, responseHook, errorHook },\n triggerType,\n ),\n moduleExports => unwrapCommonFunctions(moduleExports, unwrap),\n ),\n );\n });\n\n return moduleFunctionsCJS;\n}\n\n/**\n * Patches Cloud Functions for Firebase (v2) to add OpenTelemetry instrumentation\n *\n * @param tracer - Opentelemetry Tracer\n * @param functionsConfig - Firebase instrumentation config\n * @param triggerType - Type of trigger\n * @returns A function that patches the function\n */\nexport function patchV2Functions<T extends FirebaseFunctions = FirebaseFunctions>(\n tracer: Tracer,\n functionsConfig: FirebaseInstrumentationConfig['functions'],\n triggerType: string,\n): (original: T) => (...args: OverloadedParameters<T>) => ReturnType<T> {\n return function v2FunctionsWrapper(original: T): (...args: OverloadedParameters<T>) => ReturnType<T> {\n return function (this: FirebaseInstrumentation, ...args: OverloadedParameters<T>): ReturnType<T> {\n const handler = typeof args[0] === 'function' ? args[0] : args[1];\n const documentOrOptions = typeof args[0] === 'function' ? undefined : args[0];\n\n if (!handler) {\n return original.call(this, ...args);\n }\n\n const wrappedHandler = async function (this: unknown, ...handlerArgs: unknown[]): Promise<unknown> {\n const functionName = process.env.FUNCTION_TARGET || process.env.K_SERVICE || 'unknown';\n const span = tracer.startSpan(`firebase.function.${triggerType}`, {\n kind: SpanKind.SERVER,\n });\n\n const attributes: SpanAttributes = {\n 'faas.name': functionName,\n 'faas.trigger': triggerType,\n 'faas.provider': 'firebase',\n };\n\n if (process.env.GCLOUD_PROJECT) {\n attributes['cloud.project_id'] = process.env.GCLOUD_PROJECT;\n }\n\n if (process.env.EVENTARC_CLOUD_EVENT_SOURCE) {\n attributes['cloud.event_source'] = process.env.EVENTARC_CLOUD_EVENT_SOURCE;\n }\n\n span.setAttributes(attributes);\n functionsConfig?.requestHook?.(span);\n\n // Can be changed to safeExecuteInTheMiddleAsync once following is merged and released\n // https://github.com/open-telemetry/opentelemetry-js/pull/6032\n return context.with(trace.setSpan(context.active(), span), async () => {\n let error: Error | undefined;\n let result: T | undefined;\n\n try {\n result = await handler.apply(this, handlerArgs);\n } catch (e) {\n error = e as Error;\n }\n\n functionsConfig?.responseHook?.(span, error);\n\n if (error) {\n span.recordException(error);\n }\n\n span.end();\n\n if (error) {\n await functionsConfig?.errorHook?.(span, error);\n throw error;\n }\n\n return result;\n });\n };\n\n if (documentOrOptions) {\n return original.call(this, documentOrOptions, wrappedHandler);\n } else {\n return original.call(this, wrappedHandler);\n }\n };\n };\n}\n\nfunction wrapCommonFunctions(\n moduleExports: AvailableFirebaseFunctions,\n wrap: InstrumentationBase<FirebaseInstrumentationConfig>['_wrap'],\n unwrap: InstrumentationBase<FirebaseInstrumentationConfig>['_unwrap'],\n tracer: Tracer,\n functionsConfig: FirebaseInstrumentationConfig['functions'],\n triggerType: 'function' | 'firestore' | 'scheduler' | 'storage',\n): AvailableFirebaseFunctions {\n unwrapCommonFunctions(moduleExports, unwrap);\n\n switch (triggerType) {\n case 'function':\n wrap(moduleExports, 'onRequest', patchV2Functions(tracer, functionsConfig, 'http.request'));\n wrap(moduleExports, 'onCall', patchV2Functions(tracer, functionsConfig, 'http.call'));\n break;\n\n case 'firestore':\n wrap(moduleExports, 'onDocumentCreated', patchV2Functions(tracer, functionsConfig, 'firestore.document.created'));\n wrap(moduleExports, 'onDocumentUpdated', patchV2Functions(tracer, functionsConfig, 'firestore.document.updated'));\n wrap(moduleExports, 'onDocumentDeleted', patchV2Functions(tracer, functionsConfig, 'firestore.document.deleted'));\n wrap(moduleExports, 'onDocumentWritten', patchV2Functions(tracer, functionsConfig, 'firestore.document.written'));\n wrap(\n moduleExports,\n 'onDocumentCreatedWithAuthContext',\n patchV2Functions(tracer, functionsConfig, 'firestore.document.created'),\n );\n wrap(\n moduleExports,\n 'onDocumentUpdatedWithAuthContext',\n patchV2Functions(tracer, functionsConfig, 'firestore.document.updated'),\n );\n\n wrap(\n moduleExports,\n 'onDocumentDeletedWithAuthContext',\n patchV2Functions(tracer, functionsConfig, 'firestore.document.deleted'),\n );\n\n wrap(\n moduleExports,\n 'onDocumentWrittenWithAuthContext',\n patchV2Functions(tracer, functionsConfig, 'firestore.document.written'),\n );\n break;\n\n case 'scheduler':\n wrap(moduleExports, 'onSchedule', patchV2Functions(tracer, functionsConfig, 'scheduler.scheduled'));\n break;\n\n case 'storage':\n wrap(moduleExports, 'onObjectFinalized', patchV2Functions(tracer, functionsConfig, 'storage.object.finalized'));\n wrap(moduleExports, 'onObjectArchived', patchV2Functions(tracer, functionsConfig, 'storage.object.archived'));\n wrap(moduleExports, 'onObjectDeleted', patchV2Functions(tracer, functionsConfig, 'storage.object.deleted'));\n wrap(\n moduleExports,\n 'onObjectMetadataUpdated',\n patchV2Functions(tracer, functionsConfig, 'storage.object.metadataUpdated'),\n );\n break;\n }\n\n return moduleExports;\n}\n\nfunction unwrapCommonFunctions(\n moduleExports: AvailableFirebaseFunctions,\n unwrap: InstrumentationBase<FirebaseInstrumentationConfig>['_unwrap'],\n): AvailableFirebaseFunctions {\n const methods: (keyof AvailableFirebaseFunctions)[] = [\n 'onSchedule',\n 'onRequest',\n 'onCall',\n 'onObjectFinalized',\n 'onObjectArchived',\n 'onObjectDeleted',\n 'onObjectMetadataUpdated',\n 'onDocumentCreated',\n 'onDocumentUpdated',\n 'onDocumentDeleted',\n 'onDocumentWritten',\n 'onDocumentCreatedWithAuthContext',\n 'onDocumentUpdatedWithAuthContext',\n 'onDocumentDeletedWithAuthContext',\n 'onDocumentWrittenWithAuthContext',\n ];\n\n for (const method of methods) {\n if (isWrapped(moduleExports[method])) {\n unwrap(moduleExports, method);\n }\n }\n return moduleExports;\n}\n"],"names":["safeExecuteInTheMiddle","diag","InstrumentationNodeModuleDefinition","InstrumentationNodeModuleFile","SpanKind","context","trace","isWrapped"],"mappings":";;;;;AAoBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,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MAAA,IAAA,CAAA,aAAA,EAAA,kBAAA,EAAA,gBAAA,CAAA,MAAA,EAAA,eAAA,EAAA,yBAAA,CAAA,CAAA;AACA,MAAA,IAAA,CAAA,aAAA,EAAA,iBAAA,EAAA,gBAAA,CAAA,MAAA,EAAA,eAAA,EAAA,wBAAA,CAAA,CAAA;AACA,MAAA,IAAA;AACA,QAAA,aAAA;AACA,QAAA,yBAAA;AACA,QAAA,gBAAA,CAAA,MAAA,EAAA,eAAA,EAAA,gCAAA,CAAA;AACA,OAAA;AACA,MAAA;AACA;;AAEA,EAAA,OAAA,aAAA;AACA;;AAEA,SAAA,qBAAA;AACA,EAAA,aAAA;AACA,EAAA,MAAA;AACA,EAAA;AACA,EAAA,MAAA,OAAA,GAAA;AACA,IAAA,YAAA;AACA,IAAA,WAAA;AACA,IAAA,QAAA;AACA,IAAA,mBAAA;AACA,IAAA,kBAAA;AACA,IAAA,iBAAA;AACA,IAAA,yBAAA;AACA,IAAA,mBAAA;AACA,IAAA,mBAAA;AACA,IAAA,mBAAA;AACA,IAAA,mBAAA;AACA,IAAA,kCAAA;AACA,IAAA,kCAAA;AACA,IAAA,kCAAA;AACA,IAAA,kCAAA;AACA,GAAA;;AAEA,EAAA,KAAA,MAAA,MAAA,IAAA,OAAA,EAAA;AACA,IAAA,IAAAE,yBAAA,CAAA,aAAA,CAAA,MAAA,CAAA,CAAA,EAAA;AACA,MAAA,MAAA,CAAA,aAAA,EAAA,MAAA,CAAA;AACA,IAAA;AACA,EAAA;AACA,EAAA,OAAA,aAAA;AACA;;;;;"}
|
|
1
|
+
{"version":3,"file":"functions.js","sources":["../../../../../../../src/integrations/tracing/firebase/otel/patches/functions.ts"],"sourcesContent":["import type { Span, Tracer } from '@opentelemetry/api';\nimport { context, diag, SpanKind, trace } from '@opentelemetry/api';\nimport type { InstrumentationBase } from '@opentelemetry/instrumentation';\nimport {\n InstrumentationNodeModuleDefinition,\n InstrumentationNodeModuleFile,\n isWrapped,\n safeExecuteInTheMiddle,\n} from '@opentelemetry/instrumentation';\nimport type { SpanAttributes } from '@sentry/core';\nimport type { FirebaseInstrumentation } from '../firebaseInstrumentation';\nimport type {\n AvailableFirebaseFunctions,\n FirebaseFunctions,\n FirebaseInstrumentationConfig,\n OverloadedParameters,\n RequestHook,\n ResponseHook,\n} from '../types';\n\n/**\n * Patches Firebase Functions v2 to add OpenTelemetry instrumentation\n * @param tracer - Opentelemetry Tracer\n * @param functionsSupportedVersions - supported versions of firebase-functions\n * @param wrap - reference to native instrumentation wrap function\n * @param unwrap - reference to native instrumentation unwrap function\n * @param config - Firebase instrumentation config\n */\nexport function patchFunctions(\n tracer: Tracer,\n functionsSupportedVersions: string[],\n wrap: InstrumentationBase['_wrap'],\n unwrap: InstrumentationBase['_unwrap'],\n config: FirebaseInstrumentationConfig,\n): InstrumentationNodeModuleDefinition {\n let requestHook: RequestHook = () => {};\n let responseHook: ResponseHook = () => {};\n const errorHook = config.functions?.errorHook;\n const configRequestHook = config.functions?.requestHook;\n const configResponseHook = config.functions?.responseHook;\n\n if (typeof configResponseHook === 'function') {\n responseHook = (span: Span, err: unknown) => {\n safeExecuteInTheMiddle(\n () => configResponseHook(span, err),\n error => {\n if (!error) {\n return;\n }\n diag.error(error?.message);\n },\n true,\n );\n };\n }\n if (typeof configRequestHook === 'function') {\n requestHook = (span: Span) => {\n safeExecuteInTheMiddle(\n () => configRequestHook(span),\n error => {\n if (!error) {\n return;\n }\n diag.error(error?.message);\n },\n true,\n );\n };\n }\n\n const moduleFunctionsCJS = new InstrumentationNodeModuleDefinition('firebase-functions', functionsSupportedVersions);\n const modulesToInstrument = [\n { name: 'firebase-functions/lib/v2/providers/https.js', triggerType: 'function' },\n { name: 'firebase-functions/lib/v2/providers/firestore.js', triggerType: 'firestore' },\n { name: 'firebase-functions/lib/v2/providers/scheduler.js', triggerType: 'scheduler' },\n { name: 'firebase-functions/lib/v2/storage.js', triggerType: 'storage' },\n ] as const;\n\n modulesToInstrument.forEach(({ name, triggerType }) => {\n moduleFunctionsCJS.files.push(\n new InstrumentationNodeModuleFile(\n name,\n functionsSupportedVersions,\n moduleExports =>\n wrapCommonFunctions(\n moduleExports,\n wrap,\n unwrap,\n tracer,\n { requestHook, responseHook, errorHook },\n triggerType,\n ),\n moduleExports => unwrapCommonFunctions(moduleExports, unwrap),\n ),\n );\n });\n\n return moduleFunctionsCJS;\n}\n\n/**\n * Patches Cloud Functions for Firebase (v2) to add OpenTelemetry instrumentation\n *\n * @param tracer - Opentelemetry Tracer\n * @param functionsConfig - Firebase instrumentation config\n * @param triggerType - Type of trigger\n * @returns A function that patches the function\n */\nexport function patchV2Functions<T extends FirebaseFunctions = FirebaseFunctions>(\n tracer: Tracer,\n functionsConfig: FirebaseInstrumentationConfig['functions'],\n triggerType: string,\n): (original: T) => (...args: OverloadedParameters<T>) => ReturnType<T> {\n return function v2FunctionsWrapper(original: T): (...args: OverloadedParameters<T>) => ReturnType<T> {\n return function (this: FirebaseInstrumentation, ...args: OverloadedParameters<T>): ReturnType<T> {\n const handler = typeof args[0] === 'function' ? args[0] : args[1];\n const documentOrOptions = typeof args[0] === 'function' ? undefined : args[0];\n\n if (!handler) {\n return original.call(this, ...args);\n }\n\n const wrappedHandler = async function (this: unknown, ...handlerArgs: unknown[]): Promise<unknown> {\n const functionName = process.env.FUNCTION_TARGET || process.env.K_SERVICE || 'unknown';\n const span = tracer.startSpan(`firebase.function.${triggerType}`, {\n kind: SpanKind.SERVER,\n });\n\n const attributes: SpanAttributes = {\n 'faas.name': functionName,\n 'faas.trigger': triggerType,\n 'faas.provider': 'firebase',\n };\n\n if (process.env.GCLOUD_PROJECT) {\n attributes['cloud.project_id'] = process.env.GCLOUD_PROJECT;\n }\n\n if (process.env.EVENTARC_CLOUD_EVENT_SOURCE) {\n attributes['cloud.event_source'] = process.env.EVENTARC_CLOUD_EVENT_SOURCE;\n }\n\n span.setAttributes(attributes);\n functionsConfig?.requestHook?.(span);\n\n // Can be changed to safeExecuteInTheMiddleAsync once following is merged and released\n // https://github.com/open-telemetry/opentelemetry-js/pull/6032\n return context.with(trace.setSpan(context.active(), span), async () => {\n let error: Error | undefined;\n let result: T | undefined;\n\n try {\n result = await handler.apply(this, handlerArgs);\n } catch (e) {\n error = e as Error;\n }\n\n functionsConfig?.responseHook?.(span, error);\n\n if (error) {\n span.recordException(error);\n }\n\n span.end();\n\n if (error) {\n await functionsConfig?.errorHook?.(span, error);\n throw error;\n }\n\n return result;\n });\n };\n\n if (documentOrOptions) {\n return original.call(this, documentOrOptions, wrappedHandler);\n } else {\n return original.call(this, wrappedHandler);\n }\n };\n };\n}\n\nfunction wrapCommonFunctions(\n moduleExports: AvailableFirebaseFunctions,\n wrap: InstrumentationBase<FirebaseInstrumentationConfig>['_wrap'],\n unwrap: InstrumentationBase<FirebaseInstrumentationConfig>['_unwrap'],\n tracer: Tracer,\n functionsConfig: FirebaseInstrumentationConfig['functions'],\n triggerType: 'function' | 'firestore' | 'scheduler' | 'storage',\n): AvailableFirebaseFunctions {\n unwrapCommonFunctions(moduleExports, unwrap);\n\n switch (triggerType) {\n case 'function':\n wrap(moduleExports, 'onRequest', patchV2Functions(tracer, functionsConfig, 'http.request'));\n wrap(moduleExports, 'onCall', patchV2Functions(tracer, functionsConfig, 'http.call'));\n break;\n\n case 'firestore':\n wrap(moduleExports, 'onDocumentCreated', patchV2Functions(tracer, functionsConfig, 'firestore.document.created'));\n wrap(moduleExports, 'onDocumentUpdated', patchV2Functions(tracer, functionsConfig, 'firestore.document.updated'));\n wrap(moduleExports, 'onDocumentDeleted', patchV2Functions(tracer, functionsConfig, 'firestore.document.deleted'));\n wrap(moduleExports, 'onDocumentWritten', patchV2Functions(tracer, functionsConfig, 'firestore.document.written'));\n wrap(\n moduleExports,\n 'onDocumentCreatedWithAuthContext',\n patchV2Functions(tracer, functionsConfig, 'firestore.document.created'),\n );\n wrap(\n moduleExports,\n 'onDocumentUpdatedWithAuthContext',\n patchV2Functions(tracer, functionsConfig, 'firestore.document.updated'),\n );\n\n wrap(\n moduleExports,\n 'onDocumentDeletedWithAuthContext',\n patchV2Functions(tracer, functionsConfig, 'firestore.document.deleted'),\n );\n\n wrap(\n moduleExports,\n 'onDocumentWrittenWithAuthContext',\n patchV2Functions(tracer, functionsConfig, 'firestore.document.written'),\n );\n break;\n\n case 'scheduler':\n wrap(moduleExports, 'onSchedule', patchV2Functions(tracer, functionsConfig, 'scheduler.scheduled'));\n break;\n\n case 'storage':\n wrap(moduleExports, 'onObjectFinalized', patchV2Functions(tracer, functionsConfig, 'storage.object.finalized'));\n wrap(moduleExports, 'onObjectArchived', patchV2Functions(tracer, functionsConfig, 'storage.object.archived'));\n wrap(moduleExports, 'onObjectDeleted', patchV2Functions(tracer, functionsConfig, 'storage.object.deleted'));\n wrap(\n moduleExports,\n 'onObjectMetadataUpdated',\n patchV2Functions(tracer, functionsConfig, 'storage.object.metadataUpdated'),\n );\n break;\n }\n\n return moduleExports;\n}\n\nfunction unwrapCommonFunctions(\n moduleExports: AvailableFirebaseFunctions,\n unwrap: InstrumentationBase<FirebaseInstrumentationConfig>['_unwrap'],\n): AvailableFirebaseFunctions {\n const methods: (keyof AvailableFirebaseFunctions)[] = [\n 'onSchedule',\n 'onRequest',\n 'onCall',\n 'onObjectFinalized',\n 'onObjectArchived',\n 'onObjectDeleted',\n 'onObjectMetadataUpdated',\n 'onDocumentCreated',\n 'onDocumentUpdated',\n 'onDocumentDeleted',\n 'onDocumentWritten',\n 'onDocumentCreatedWithAuthContext',\n 'onDocumentUpdatedWithAuthContext',\n 'onDocumentDeletedWithAuthContext',\n 'onDocumentWrittenWithAuthContext',\n ];\n\n for (const method of methods) {\n if (isWrapped(moduleExports[method])) {\n unwrap(moduleExports, method);\n }\n }\n return moduleExports;\n}\n"],"names":["safeExecuteInTheMiddle","diag","InstrumentationNodeModuleDefinition","InstrumentationNodeModuleFile","SpanKind","context","trace","isWrapped"],"mappings":";;;;;AA4BO,SAAS,cAAA,CACd,MAAA,EACA,0BAAA,EACA,IAAA,EACA,Q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AA;AACT;AAEA,SAAS,qBAAA,CACP,eACA,MAAA,EAC4B;AAC5B,EAAA,MAAM,OAAA,GAAgD;AAAA,IACpD,YAAA;AAAA,IACA,WAAA;AAAA,IACA,QAAA;AAAA,IACA,mBAAA;AAAA,IACA,kBAAA;AAAA,IACA,iBAAA;AAAA,IACA,yBAAA;AAAA,IACA,mBAAA;AAAA,IACA,mBAAA;AAAA,IACA,mBAAA;AAAA,IACA,mBAAA;AAAA,IACA,kCAAA;AAAA,IACA,kCAAA;AAAA,IACA,kCAAA;AAAA,IACA;AAAA,GACF;AAEA,EAAA,KAAA,MAAW,UAAU,OAAA,EAAS;AAC5B,IAAA,IAAIE,yBAAA,CAAU,aAAA,CAAc,MAAM,CAAC,CAAA,EAAG;AACpC,MAAA,MAAA,CAAO,eAAe,MAAM,CAAA;AAAA,IAC9B;AAAA,EACF;AACA,EAAA,OAAO,aAAA;AACT;;;;;"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const instrumentation = require('./vendored/instrumentation.js');
|
|
4
|
+
const core = require('@sentry/core');
|
|
5
|
+
const nodeCore = require('@sentry/node-core');
|
|
6
|
+
|
|
7
|
+
const INTEGRATION_NAME = "GenericPool";
|
|
8
|
+
const instrumentGenericPool = nodeCore.generateInstrumentOnce(INTEGRATION_NAME, () => new instrumentation.GenericPoolInstrumentation({}));
|
|
9
|
+
const _genericPoolIntegration = (() => {
|
|
10
|
+
let instrumentationWrappedCallback;
|
|
11
|
+
return {
|
|
12
|
+
name: INTEGRATION_NAME,
|
|
13
|
+
setupOnce() {
|
|
14
|
+
const instrumentation = instrumentGenericPool();
|
|
15
|
+
instrumentationWrappedCallback = nodeCore.instrumentWhenWrapped(instrumentation);
|
|
16
|
+
},
|
|
17
|
+
setup(client) {
|
|
18
|
+
instrumentationWrappedCallback?.(
|
|
19
|
+
() => client.on("spanStart", (span) => {
|
|
20
|
+
const spanJSON = core.spanToJSON(span);
|
|
21
|
+
const spanDescription = spanJSON.description;
|
|
22
|
+
const isGenericPoolSpan = spanDescription === "generic-pool.aquire" || spanDescription === "generic-pool.acquire";
|
|
23
|
+
if (isGenericPoolSpan) {
|
|
24
|
+
span.setAttribute(core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, "auto.db.otel.generic_pool");
|
|
25
|
+
}
|
|
26
|
+
})
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
});
|
|
31
|
+
const genericPoolIntegration = core.defineIntegration(_genericPoolIntegration);
|
|
32
|
+
|
|
33
|
+
exports.genericPoolIntegration = genericPoolIntegration;
|
|
34
|
+
exports.instrumentGenericPool = instrumentGenericPool;
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/genericPool/index.ts"],"sourcesContent":["import { GenericPoolInstrumentation } from './vendored/instrumentation';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, spanToJSON } from '@sentry/core';\nimport { generateInstrumentOnce, instrumentWhenWrapped } from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'GenericPool';\n\nexport const instrumentGenericPool = generateInstrumentOnce(INTEGRATION_NAME, () => new GenericPoolInstrumentation({}));\n\nconst _genericPoolIntegration = (() => {\n let instrumentationWrappedCallback: undefined | ((callback: () => void) => void);\n\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n const instrumentation = instrumentGenericPool();\n instrumentationWrappedCallback = instrumentWhenWrapped(instrumentation);\n },\n\n setup(client) {\n instrumentationWrappedCallback?.(() =>\n client.on('spanStart', span => {\n const spanJSON = spanToJSON(span);\n\n const spanDescription = spanJSON.description;\n\n // typo in emitted span for version <= 0.38.0 of @opentelemetry/instrumentation-generic-pool\n const isGenericPoolSpan =\n spanDescription === 'generic-pool.aquire' || spanDescription === 'generic-pool.acquire';\n\n if (isGenericPoolSpan) {\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.db.otel.generic_pool');\n }\n }),\n );\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [generic-pool](https://www.npmjs.com/package/generic-pool) library.\n *\n * For more information, see the [`genericPoolIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/genericpool/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.genericPoolIntegration()],\n * });\n * ```\n */\nexport const genericPoolIntegration = defineIntegration(_genericPoolIntegration);\n"],"names":["generateInstrumentOnce","GenericPoolInstrumentation","instrumentWhenWrapped","spanToJSON","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,gBAAA,GAAmB,aAAA;AAElB,MAAM,qBAAA,GAAwBA,gCAAuB,gBAAA,EAAkB,MAAM,IAAIC,0CAAA,CAA2B,EAAE,CAAC;AAEtH,MAAM,2BAA2B,MAAM;AACrC,EAAA,IAAI,8BAAA;AAEJ,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,MAAM,kBAAkB,qBAAA,EAAsB;AAC9C,MAAA,8BAAA,GAAiCC,+BAAsB,eAAe,CAAA;AAAA,IACxE,CAAA;AAAA,IAEA,MAAM,MAAA,EAAQ;AACZ,MAAA,8BAAA;AAAA,QAAiC,MAC/B,MAAA,CAAO,EAAA,CAAG,WAAA,EAAa,CAAA,IAAA,KAAQ;AAC7B,UAAA,MAAM,QAAA,GAAWC,gBAAW,IAAI,CAAA;AAEhC,UAAA,MAAM,kBAAkB,QAAA,CAAS,WAAA;AAGjC,UAAA,MAAM,iBAAA,GACJ,eAAA,KAAoB,qBAAA,IAAyB,eAAA,KAAoB,sBAAA;AAEnE,UAAA,IAAI,iBAAA,EAAmB;AACrB,YAAA,IAAA,CAAK,YAAA,CAAaC,uCAAkC,2BAA2B,CAAA;AAAA,UACjF;AAAA,QACF,CAAC;AAAA,OACH;AAAA,IACF;AAAA,GACF;AACF,CAAA,CAAA;AAgBO,MAAM,sBAAA,GAAyBC,uBAAkB,uBAAuB;;;;;"}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const api = require('@opentelemetry/api');
|
|
4
|
+
const instrumentation = require('@opentelemetry/instrumentation');
|
|
5
|
+
const core = require('@sentry/core');
|
|
6
|
+
|
|
7
|
+
const MODULE_NAME = "generic-pool";
|
|
8
|
+
const PACKAGE_NAME = "@sentry/instrumentation-generic-pool";
|
|
9
|
+
class GenericPoolInstrumentation extends instrumentation.InstrumentationBase {
|
|
10
|
+
constructor(config = {}) {
|
|
11
|
+
super(PACKAGE_NAME, core.SDK_VERSION, config);
|
|
12
|
+
// only used for v2 - v2.3)
|
|
13
|
+
this._isDisabled = false;
|
|
14
|
+
}
|
|
15
|
+
init() {
|
|
16
|
+
return [
|
|
17
|
+
new instrumentation.InstrumentationNodeModuleDefinition(
|
|
18
|
+
MODULE_NAME,
|
|
19
|
+
[">=3.0.0 <4"],
|
|
20
|
+
(moduleExports) => {
|
|
21
|
+
const Pool = moduleExports.Pool;
|
|
22
|
+
if (instrumentation.isWrapped(Pool.prototype.acquire)) {
|
|
23
|
+
this._unwrap(Pool.prototype, "acquire");
|
|
24
|
+
}
|
|
25
|
+
this._wrap(Pool.prototype, "acquire", this._acquirePatcher.bind(this));
|
|
26
|
+
return moduleExports;
|
|
27
|
+
},
|
|
28
|
+
(moduleExports) => {
|
|
29
|
+
const Pool = moduleExports.Pool;
|
|
30
|
+
this._unwrap(Pool.prototype, "acquire");
|
|
31
|
+
return moduleExports;
|
|
32
|
+
}
|
|
33
|
+
),
|
|
34
|
+
new instrumentation.InstrumentationNodeModuleDefinition(
|
|
35
|
+
MODULE_NAME,
|
|
36
|
+
[">=2.4.0 <3"],
|
|
37
|
+
(moduleExports) => {
|
|
38
|
+
const Pool = moduleExports.Pool;
|
|
39
|
+
if (instrumentation.isWrapped(Pool.prototype.acquire)) {
|
|
40
|
+
this._unwrap(Pool.prototype, "acquire");
|
|
41
|
+
}
|
|
42
|
+
this._wrap(Pool.prototype, "acquire", this._acquireWithCallbacksPatcher.bind(this));
|
|
43
|
+
return moduleExports;
|
|
44
|
+
},
|
|
45
|
+
(moduleExports) => {
|
|
46
|
+
const Pool = moduleExports.Pool;
|
|
47
|
+
this._unwrap(Pool.prototype, "acquire");
|
|
48
|
+
return moduleExports;
|
|
49
|
+
}
|
|
50
|
+
),
|
|
51
|
+
new instrumentation.InstrumentationNodeModuleDefinition(
|
|
52
|
+
MODULE_NAME,
|
|
53
|
+
[">=2.0.0 <2.4"],
|
|
54
|
+
(moduleExports) => {
|
|
55
|
+
this._isDisabled = false;
|
|
56
|
+
if (instrumentation.isWrapped(moduleExports.Pool)) {
|
|
57
|
+
this._unwrap(moduleExports, "Pool");
|
|
58
|
+
}
|
|
59
|
+
this._wrap(moduleExports, "Pool", this._poolWrapper.bind(this));
|
|
60
|
+
return moduleExports;
|
|
61
|
+
},
|
|
62
|
+
(moduleExports) => {
|
|
63
|
+
this._isDisabled = true;
|
|
64
|
+
return moduleExports;
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
];
|
|
68
|
+
}
|
|
69
|
+
_acquirePatcher(original) {
|
|
70
|
+
const instrumentation = this;
|
|
71
|
+
return function wrapped_acquire(...args) {
|
|
72
|
+
const parent = api.context.active();
|
|
73
|
+
const span = instrumentation.tracer.startSpan("generic-pool.acquire", {}, parent);
|
|
74
|
+
return api.context.with(api.trace.setSpan(parent, span), () => {
|
|
75
|
+
return original.call(this, ...args).then(
|
|
76
|
+
(value) => {
|
|
77
|
+
span.end();
|
|
78
|
+
return value;
|
|
79
|
+
},
|
|
80
|
+
(err) => {
|
|
81
|
+
span.recordException(err);
|
|
82
|
+
span.end();
|
|
83
|
+
throw err;
|
|
84
|
+
}
|
|
85
|
+
);
|
|
86
|
+
});
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
_poolWrapper(original) {
|
|
90
|
+
const instrumentation = this;
|
|
91
|
+
return function wrapped_pool() {
|
|
92
|
+
const pool = original.apply(this, arguments);
|
|
93
|
+
instrumentation._wrap(pool, "acquire", instrumentation._acquireWithCallbacksPatcher.bind(instrumentation));
|
|
94
|
+
return pool;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
_acquireWithCallbacksPatcher(original) {
|
|
98
|
+
const instrumentation = this;
|
|
99
|
+
return function wrapped_acquire(cb, priority) {
|
|
100
|
+
if (instrumentation._isDisabled) {
|
|
101
|
+
return original.call(this, cb, priority);
|
|
102
|
+
}
|
|
103
|
+
const parent = api.context.active();
|
|
104
|
+
const span = instrumentation.tracer.startSpan("generic-pool.acquire", {}, parent);
|
|
105
|
+
return api.context.with(api.trace.setSpan(parent, span), () => {
|
|
106
|
+
original.call(
|
|
107
|
+
this,
|
|
108
|
+
(err, client) => {
|
|
109
|
+
span.end();
|
|
110
|
+
if (cb) {
|
|
111
|
+
return cb(err, client);
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
priority
|
|
115
|
+
);
|
|
116
|
+
});
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
exports.GenericPoolInstrumentation = GenericPoolInstrumentation;
|
|
122
|
+
//# sourceMappingURL=instrumentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentation.js","sources":["../../../../../../src/integrations/tracing/genericPool/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-generic-pool\n * - Upstream version: @opentelemetry/instrumentation-generic-pool@0.61.0\n * - Minor TypeScript strictness adjustments for this repository's compiler settings\n */\n/* eslint-disable */\n\nimport * as api from '@opentelemetry/api';\nimport {\n InstrumentationBase,\n InstrumentationConfig,\n InstrumentationNodeModuleDefinition,\n isWrapped,\n} from '@opentelemetry/instrumentation';\n\nimport type * as genericPool from './generic-pool-types';\n\nimport { SDK_VERSION } from '@sentry/core';\n\nconst MODULE_NAME = 'generic-pool';\nconst PACKAGE_NAME = '@sentry/instrumentation-generic-pool';\n\nexport class GenericPoolInstrumentation extends InstrumentationBase {\n // only used for v2 - v2.3)\n private _isDisabled = false;\n\n constructor(config: InstrumentationConfig = {}) {\n super(PACKAGE_NAME, SDK_VERSION, config);\n }\n\n init() {\n return [\n new InstrumentationNodeModuleDefinition(\n MODULE_NAME,\n ['>=3.0.0 <4'],\n moduleExports => {\n const Pool: any = moduleExports.Pool;\n if (isWrapped(Pool.prototype.acquire)) {\n this._unwrap(Pool.prototype, 'acquire');\n }\n this._wrap(Pool.prototype, 'acquire', this._acquirePatcher.bind(this));\n return moduleExports;\n },\n moduleExports => {\n const Pool: any = moduleExports.Pool;\n this._unwrap(Pool.prototype, 'acquire');\n return moduleExports;\n },\n ),\n new InstrumentationNodeModuleDefinition(\n MODULE_NAME,\n ['>=2.4.0 <3'],\n moduleExports => {\n const Pool: any = moduleExports.Pool;\n if (isWrapped(Pool.prototype.acquire)) {\n this._unwrap(Pool.prototype, 'acquire');\n }\n this._wrap(Pool.prototype, 'acquire', this._acquireWithCallbacksPatcher.bind(this));\n return moduleExports;\n },\n moduleExports => {\n const Pool: any = moduleExports.Pool;\n this._unwrap(Pool.prototype, 'acquire');\n return moduleExports;\n },\n ),\n new InstrumentationNodeModuleDefinition(\n MODULE_NAME,\n ['>=2.0.0 <2.4'],\n moduleExports => {\n this._isDisabled = false;\n if (isWrapped(moduleExports.Pool)) {\n this._unwrap(moduleExports, 'Pool');\n }\n this._wrap(moduleExports, 'Pool', this._poolWrapper.bind(this));\n return moduleExports;\n },\n moduleExports => {\n // since the object is created on the fly every time, we need to use\n // a boolean switch here to disable the instrumentation\n this._isDisabled = true;\n return moduleExports;\n },\n ),\n ];\n }\n\n private _acquirePatcher(original: genericPool.Pool<unknown>['acquire']) {\n const instrumentation = this;\n return function wrapped_acquire(this: genericPool.Pool<unknown>, ...args: any[]) {\n const parent = api.context.active();\n const span = instrumentation.tracer.startSpan('generic-pool.acquire', {}, parent);\n\n return api.context.with(api.trace.setSpan(parent, span), () => {\n return original.call(this, ...args).then(\n (value: unknown) => {\n span.end();\n return value;\n },\n (err: unknown) => {\n span.recordException(err as Error);\n span.end();\n throw err;\n },\n );\n });\n };\n }\n\n private _poolWrapper(original: any) {\n const instrumentation = this;\n return function wrapped_pool(this: any) {\n const pool = original.apply(this, arguments);\n instrumentation._wrap(pool, 'acquire', instrumentation._acquireWithCallbacksPatcher.bind(instrumentation));\n return pool;\n };\n }\n\n private _acquireWithCallbacksPatcher(original: any) {\n const instrumentation = this;\n return function wrapped_acquire(this: genericPool.Pool<unknown>, cb: Function, priority: number) {\n // only used for v2 - v2.3\n if (instrumentation._isDisabled) {\n return original.call(this, cb, priority);\n }\n const parent = api.context.active();\n const span = instrumentation.tracer.startSpan('generic-pool.acquire', {}, parent);\n\n return api.context.with(api.trace.setSpan(parent, span), () => {\n original.call(\n this,\n (err: unknown, client: unknown) => {\n span.end();\n // Not checking whether cb is a function because\n // the original code doesn't do that either.\n if (cb) {\n return cb(err, client);\n }\n },\n priority,\n );\n });\n };\n }\n}\n"],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