@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firebaseInstrumentation.js","sources":["../../../../../../src/integrations/tracing/firebase/otel/firebaseInstrumentation.ts"],"sourcesContent":["import { InstrumentationBase, type InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';\nimport { SDK_VERSION } from '@sentry/core';\nimport { patchFirestore } from './patches/firestore';\nimport { patchFunctions } from './patches/functions';\nimport type { FirebaseInstrumentationConfig } from './types';\n\nconst DefaultFirebaseInstrumentationConfig: FirebaseInstrumentationConfig = {};\nconst firestoreSupportedVersions = ['>=3.0.0 <5']; // firebase 9+\nconst functionsSupportedVersions = ['>=6.0.0 <7']; // firebase-functions v2\n\n/**\n * Instrumentation for Firebase services, specifically Firestore.\n */\nexport class FirebaseInstrumentation extends InstrumentationBase<FirebaseInstrumentationConfig> {\n public constructor(config: FirebaseInstrumentationConfig = DefaultFirebaseInstrumentationConfig) {\n super('@sentry/instrumentation-firebase', SDK_VERSION, config);\n }\n\n /**\n * sets config\n * @param config\n */\n public override setConfig(config: FirebaseInstrumentationConfig = {}): void {\n super.setConfig({ ...DefaultFirebaseInstrumentationConfig, ...config });\n }\n\n /**\n *\n * @protected\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n protected init(): InstrumentationNodeModuleDefinition | InstrumentationNodeModuleDefinition[] | void {\n const modules: InstrumentationNodeModuleDefinition[] = [];\n\n modules.push(patchFirestore(this.tracer, firestoreSupportedVersions, this._wrap, this._unwrap, this.getConfig()));\n modules.push(patchFunctions(this.tracer, functionsSupportedVersions, this._wrap, this._unwrap, this.getConfig()));\n\n return modules;\n }\n}\n"],"names":[],"mappings":";;;;;AAMA,MAAM,
|
|
1
|
+
{"version":3,"file":"firebaseInstrumentation.js","sources":["../../../../../../src/integrations/tracing/firebase/otel/firebaseInstrumentation.ts"],"sourcesContent":["import { InstrumentationBase, type InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';\nimport { SDK_VERSION } from '@sentry/core';\nimport { patchFirestore } from './patches/firestore';\nimport { patchFunctions } from './patches/functions';\nimport type { FirebaseInstrumentationConfig } from './types';\n\nconst DefaultFirebaseInstrumentationConfig: FirebaseInstrumentationConfig = {};\nconst firestoreSupportedVersions = ['>=3.0.0 <5']; // firebase 9+\nconst functionsSupportedVersions = ['>=6.0.0 <7']; // firebase-functions v2\n\n/**\n * Instrumentation for Firebase services, specifically Firestore.\n */\nexport class FirebaseInstrumentation extends InstrumentationBase<FirebaseInstrumentationConfig> {\n public constructor(config: FirebaseInstrumentationConfig = DefaultFirebaseInstrumentationConfig) {\n super('@sentry/instrumentation-firebase', SDK_VERSION, config);\n }\n\n /**\n * sets config\n * @param config\n */\n public override setConfig(config: FirebaseInstrumentationConfig = {}): void {\n super.setConfig({ ...DefaultFirebaseInstrumentationConfig, ...config });\n }\n\n /**\n *\n * @protected\n */\n // eslint-disable-next-line @typescript-eslint/naming-convention\n protected init(): InstrumentationNodeModuleDefinition | InstrumentationNodeModuleDefinition[] | void {\n const modules: InstrumentationNodeModuleDefinition[] = [];\n\n modules.push(patchFirestore(this.tracer, firestoreSupportedVersions, this._wrap, this._unwrap, this.getConfig()));\n modules.push(patchFunctions(this.tracer, functionsSupportedVersions, this._wrap, this._unwrap, this.getConfig()));\n\n return modules;\n }\n}\n"],"names":[],"mappings":";;;;;AAMA,MAAM,uCAAsE,EAAC;AAC7E,MAAM,0BAAA,GAA6B,CAAC,YAAY,CAAA;AAChD,MAAM,0BAAA,GAA6B,CAAC,YAAY,CAAA;AAKzC,MAAM,gCAAgC,mBAAA,CAAmD;AAAA,EACvF,WAAA,CAAY,SAAwC,oCAAA,EAAsC;AAC/F,IAAA,KAAA,CAAM,kCAAA,EAAoC,aAAa,MAAM,CAAA;AAAA,EAC/D;AAAA;AAAA;AAAA;AAAA;AAAA,EAMgB,SAAA,CAAU,MAAA,GAAwC,EAAC,EAAS;AAC1E,IAAA,KAAA,CAAM,UAAU,EAAE,GAAG,oCAAA,EAAsC,GAAG,QAAQ,CAAA;AAAA,EACxE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOU,IAAA,GAA2F;AACnG,IAAA,MAAM,UAAiD,EAAC;AAExD,IAAA,OAAA,CAAQ,IAAA,CAAK,cAAA,CAAe,IAAA,CAAK,MAAA,EAAQ,0BAAA,EAA4B,IAAA,CAAK,KAAA,EAAO,IAAA,CAAK,OAAA,EAAS,IAAA,CAAK,SAAA,EAAW,CAAC,CAAA;AAChH,IAAA,OAAA,CAAQ,IAAA,CAAK,cAAA,CAAe,IAAA,CAAK,MAAA,EAAQ,0BAAA,EAA4B,IAAA,CAAK,KAAA,EAAO,IAAA,CAAK,OAAA,EAAS,IAAA,CAAK,SAAA,EAAW,CAAC,CAAA;AAEhH,IAAA,OAAO,OAAA;AAAA,EACT;AACF;;;;"}
|
|
@@ -3,117 +3,69 @@ import { SpanKind, context, trace, diag } from '@opentelemetry/api';
|
|
|
3
3
|
import { InstrumentationNodeModuleDefinition, InstrumentationNodeModuleFile, isWrapped, safeExecuteInTheMiddle } from '@opentelemetry/instrumentation';
|
|
4
4
|
import { ATTR_DB_OPERATION_NAME, ATTR_DB_NAMESPACE, ATTR_DB_COLLECTION_NAME, ATTR_DB_SYSTEM_NAME, ATTR_SERVER_ADDRESS, ATTR_SERVER_PORT } from '@opentelemetry/semantic-conventions';
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
*
|
|
12
|
-
* @param tracer - Opentelemetry Tracer
|
|
13
|
-
* @param firestoreSupportedVersions - supported version of firebase/firestore
|
|
14
|
-
* @param wrap - reference to native instrumentation wrap function
|
|
15
|
-
* @param unwrap - reference to native instrumentation wrap function
|
|
16
|
-
*/
|
|
17
|
-
function patchFirestore(
|
|
18
|
-
tracer,
|
|
19
|
-
firestoreSupportedVersions,
|
|
20
|
-
wrap,
|
|
21
|
-
unwrap,
|
|
22
|
-
config,
|
|
23
|
-
) {
|
|
24
|
-
const defaultFirestoreSpanCreationHook = () => {};
|
|
25
|
-
|
|
6
|
+
function patchFirestore(tracer, firestoreSupportedVersions, wrap, unwrap, config) {
|
|
7
|
+
const defaultFirestoreSpanCreationHook = () => {
|
|
8
|
+
};
|
|
26
9
|
let firestoreSpanCreationHook = defaultFirestoreSpanCreationHook;
|
|
27
10
|
const configFirestoreSpanCreationHook = config.firestoreSpanCreationHook;
|
|
28
|
-
|
|
29
|
-
if (typeof configFirestoreSpanCreationHook === 'function') {
|
|
11
|
+
if (typeof configFirestoreSpanCreationHook === "function") {
|
|
30
12
|
firestoreSpanCreationHook = (span) => {
|
|
31
13
|
safeExecuteInTheMiddle(
|
|
32
14
|
() => configFirestoreSpanCreationHook(span),
|
|
33
|
-
error => {
|
|
15
|
+
(error) => {
|
|
34
16
|
if (!error) {
|
|
35
17
|
return;
|
|
36
18
|
}
|
|
37
19
|
diag.error(error?.message);
|
|
38
20
|
},
|
|
39
|
-
true
|
|
21
|
+
true
|
|
40
22
|
);
|
|
41
23
|
};
|
|
42
24
|
}
|
|
43
|
-
|
|
44
25
|
const moduleFirestoreCJS = new InstrumentationNodeModuleDefinition(
|
|
45
|
-
|
|
26
|
+
"@firebase/firestore",
|
|
46
27
|
firestoreSupportedVersions,
|
|
47
28
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
48
|
-
(moduleExports) => wrapMethods(moduleExports, wrap, unwrap, tracer, firestoreSpanCreationHook)
|
|
29
|
+
(moduleExports) => wrapMethods(moduleExports, wrap, unwrap, tracer, firestoreSpanCreationHook)
|
|
49
30
|
);
|
|
50
31
|
const files = [
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
32
|
+
"@firebase/firestore/dist/lite/index.node.cjs.js",
|
|
33
|
+
"@firebase/firestore/dist/lite/index.node.mjs.js",
|
|
34
|
+
"@firebase/firestore/dist/lite/index.rn.esm2017.js",
|
|
35
|
+
"@firebase/firestore/dist/lite/index.cjs.js"
|
|
55
36
|
];
|
|
56
|
-
|
|
57
37
|
for (const file of files) {
|
|
58
38
|
moduleFirestoreCJS.files.push(
|
|
59
39
|
new InstrumentationNodeModuleFile(
|
|
60
40
|
file,
|
|
61
41
|
firestoreSupportedVersions,
|
|
62
|
-
moduleExports => wrapMethods(moduleExports, wrap, unwrap, tracer, firestoreSpanCreationHook),
|
|
63
|
-
moduleExports => unwrapMethods(moduleExports, unwrap)
|
|
64
|
-
)
|
|
42
|
+
(moduleExports) => wrapMethods(moduleExports, wrap, unwrap, tracer, firestoreSpanCreationHook),
|
|
43
|
+
(moduleExports) => unwrapMethods(moduleExports, unwrap)
|
|
44
|
+
)
|
|
65
45
|
);
|
|
66
46
|
}
|
|
67
|
-
|
|
68
47
|
return moduleFirestoreCJS;
|
|
69
48
|
}
|
|
70
|
-
|
|
71
|
-
function wrapMethods(
|
|
72
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
73
|
-
moduleExports,
|
|
74
|
-
wrap,
|
|
75
|
-
unwrap,
|
|
76
|
-
tracer,
|
|
77
|
-
firestoreSpanCreationHook,
|
|
78
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
79
|
-
) {
|
|
49
|
+
function wrapMethods(moduleExports, wrap, unwrap, tracer, firestoreSpanCreationHook) {
|
|
80
50
|
unwrapMethods(moduleExports, unwrap);
|
|
81
|
-
|
|
82
|
-
wrap(moduleExports,
|
|
83
|
-
wrap(moduleExports,
|
|
84
|
-
wrap(moduleExports,
|
|
85
|
-
wrap(moduleExports, 'deleteDoc', patchDeleteDoc(tracer, firestoreSpanCreationHook));
|
|
86
|
-
|
|
51
|
+
wrap(moduleExports, "addDoc", patchAddDoc(tracer, firestoreSpanCreationHook));
|
|
52
|
+
wrap(moduleExports, "getDocs", patchGetDocs(tracer, firestoreSpanCreationHook));
|
|
53
|
+
wrap(moduleExports, "setDoc", patchSetDoc(tracer, firestoreSpanCreationHook));
|
|
54
|
+
wrap(moduleExports, "deleteDoc", patchDeleteDoc(tracer, firestoreSpanCreationHook));
|
|
87
55
|
return moduleExports;
|
|
88
56
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
92
|
-
moduleExports,
|
|
93
|
-
unwrap,
|
|
94
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
95
|
-
) {
|
|
96
|
-
for (const method of ['addDoc', 'getDocs', 'setDoc', 'deleteDoc']) {
|
|
97
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
57
|
+
function unwrapMethods(moduleExports, unwrap) {
|
|
58
|
+
for (const method of ["addDoc", "getDocs", "setDoc", "deleteDoc"]) {
|
|
98
59
|
if (isWrapped(moduleExports[method])) {
|
|
99
60
|
unwrap(moduleExports, method);
|
|
100
61
|
}
|
|
101
62
|
}
|
|
102
63
|
return moduleExports;
|
|
103
64
|
}
|
|
104
|
-
|
|
105
|
-
function patchAddDoc(
|
|
106
|
-
tracer,
|
|
107
|
-
firestoreSpanCreationHook,
|
|
108
|
-
)
|
|
109
|
-
|
|
110
|
-
{
|
|
65
|
+
function patchAddDoc(tracer, firestoreSpanCreationHook) {
|
|
111
66
|
return function addDoc(original) {
|
|
112
|
-
return function
|
|
113
|
-
reference
|
|
114
|
-
data,
|
|
115
|
-
) {
|
|
116
|
-
const span = startDBSpan(tracer, 'addDoc', reference);
|
|
67
|
+
return function(reference, data) {
|
|
68
|
+
const span = startDBSpan(tracer, "addDoc", reference);
|
|
117
69
|
firestoreSpanCreationHook(span);
|
|
118
70
|
return executeContextWithSpan(span, () => {
|
|
119
71
|
return original(reference, data);
|
|
@@ -121,16 +73,10 @@ function patchAddDoc(
|
|
|
121
73
|
};
|
|
122
74
|
};
|
|
123
75
|
}
|
|
124
|
-
|
|
125
|
-
function patchDeleteDoc(
|
|
126
|
-
tracer,
|
|
127
|
-
firestoreSpanCreationHook,
|
|
128
|
-
)
|
|
129
|
-
|
|
130
|
-
{
|
|
76
|
+
function patchDeleteDoc(tracer, firestoreSpanCreationHook) {
|
|
131
77
|
return function deleteDoc(original) {
|
|
132
|
-
return function
|
|
133
|
-
const span = startDBSpan(tracer,
|
|
78
|
+
return function(reference) {
|
|
79
|
+
const span = startDBSpan(tracer, "deleteDoc", reference.parent || reference);
|
|
134
80
|
firestoreSpanCreationHook(span);
|
|
135
81
|
return executeContextWithSpan(span, () => {
|
|
136
82
|
return original(reference);
|
|
@@ -138,18 +84,10 @@ function patchDeleteDoc(
|
|
|
138
84
|
};
|
|
139
85
|
};
|
|
140
86
|
}
|
|
141
|
-
|
|
142
|
-
function patchGetDocs(
|
|
143
|
-
tracer,
|
|
144
|
-
firestoreSpanCreationHook,
|
|
145
|
-
)
|
|
146
|
-
|
|
147
|
-
{
|
|
87
|
+
function patchGetDocs(tracer, firestoreSpanCreationHook) {
|
|
148
88
|
return function getDocs(original) {
|
|
149
|
-
return function
|
|
150
|
-
reference
|
|
151
|
-
) {
|
|
152
|
-
const span = startDBSpan(tracer, 'getDocs', reference);
|
|
89
|
+
return function(reference) {
|
|
90
|
+
const span = startDBSpan(tracer, "getDocs", reference);
|
|
153
91
|
firestoreSpanCreationHook(span);
|
|
154
92
|
return executeContextWithSpan(span, () => {
|
|
155
93
|
return original(reference);
|
|
@@ -157,92 +95,58 @@ function patchGetDocs(
|
|
|
157
95
|
};
|
|
158
96
|
};
|
|
159
97
|
}
|
|
160
|
-
|
|
161
|
-
function patchSetDoc(
|
|
162
|
-
tracer,
|
|
163
|
-
firestoreSpanCreationHook,
|
|
164
|
-
)
|
|
165
|
-
|
|
166
|
-
{
|
|
98
|
+
function patchSetDoc(tracer, firestoreSpanCreationHook) {
|
|
167
99
|
return function setDoc(original) {
|
|
168
|
-
return function
|
|
169
|
-
reference
|
|
170
|
-
data,
|
|
171
|
-
options,
|
|
172
|
-
) {
|
|
173
|
-
const span = startDBSpan(tracer, 'setDoc', reference.parent || reference);
|
|
100
|
+
return function(reference, data, options) {
|
|
101
|
+
const span = startDBSpan(tracer, "setDoc", reference.parent || reference);
|
|
174
102
|
firestoreSpanCreationHook(span);
|
|
175
|
-
|
|
176
103
|
return executeContextWithSpan(span, () => {
|
|
177
|
-
return typeof options !==
|
|
104
|
+
return typeof options !== "undefined" ? original(reference, data, options) : original(reference, data);
|
|
178
105
|
});
|
|
179
106
|
};
|
|
180
107
|
};
|
|
181
108
|
}
|
|
182
|
-
|
|
183
109
|
function executeContextWithSpan(span, callback) {
|
|
184
110
|
return context.with(trace.setSpan(context.active(), span), () => {
|
|
185
111
|
return safeExecuteInTheMiddle(
|
|
186
112
|
() => {
|
|
187
113
|
return callback();
|
|
188
114
|
},
|
|
189
|
-
err => {
|
|
115
|
+
(err) => {
|
|
190
116
|
if (err) {
|
|
191
117
|
span.recordException(err);
|
|
192
118
|
}
|
|
193
119
|
span.end();
|
|
194
120
|
},
|
|
195
|
-
true
|
|
121
|
+
true
|
|
196
122
|
);
|
|
197
123
|
});
|
|
198
124
|
}
|
|
199
|
-
|
|
200
|
-
function startDBSpan(
|
|
201
|
-
tracer,
|
|
202
|
-
spanName,
|
|
203
|
-
reference,
|
|
204
|
-
) {
|
|
125
|
+
function startDBSpan(tracer, spanName, reference) {
|
|
205
126
|
const span = tracer.startSpan(`${spanName} ${reference.path}`, { kind: SpanKind.CLIENT });
|
|
206
127
|
addAttributes(span, reference);
|
|
207
128
|
span.setAttribute(ATTR_DB_OPERATION_NAME, spanName);
|
|
208
129
|
return span;
|
|
209
130
|
}
|
|
210
|
-
|
|
211
|
-
/**
|
|
212
|
-
* Gets the server address and port attributes from the Firestore settings.
|
|
213
|
-
* It's best effort to extract the address and port from the settings, especially for IPv6.
|
|
214
|
-
* @param span - The span to set attributes on.
|
|
215
|
-
* @param settings - The Firestore settings containing host information.
|
|
216
|
-
*/
|
|
217
|
-
function getPortAndAddress(settings)
|
|
218
|
-
|
|
219
|
-
{
|
|
131
|
+
function getPortAndAddress(settings) {
|
|
220
132
|
let address;
|
|
221
133
|
let port;
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
if (settings.host.
|
|
227
|
-
|
|
228
|
-
address = settings.host.replace(/^\[|\]$/g, '');
|
|
229
|
-
} else if (settings.host.includes(']:')) {
|
|
230
|
-
// IPv6 with square brackets with port
|
|
231
|
-
const lastColonIndex = settings.host.lastIndexOf(':');
|
|
134
|
+
if (typeof settings.host === "string") {
|
|
135
|
+
if (settings.host.startsWith("[")) {
|
|
136
|
+
if (settings.host.endsWith("]")) {
|
|
137
|
+
address = settings.host.replace(/^\[|\]$/g, "");
|
|
138
|
+
} else if (settings.host.includes("]:")) {
|
|
139
|
+
const lastColonIndex = settings.host.lastIndexOf(":");
|
|
232
140
|
if (lastColonIndex !== -1) {
|
|
233
|
-
address = settings.host.slice(1, lastColonIndex).replace(/^\[|\]$/g,
|
|
141
|
+
address = settings.host.slice(1, lastColonIndex).replace(/^\[|\]$/g, "");
|
|
234
142
|
port = settings.host.slice(lastColonIndex + 1);
|
|
235
143
|
}
|
|
236
144
|
}
|
|
237
145
|
} else {
|
|
238
|
-
// IPv4 or IPv6 without square brackets
|
|
239
|
-
// If it's an IPv6 address without square brackets, we assume it does not have a port.
|
|
240
146
|
if (net.isIPv6(settings.host)) {
|
|
241
147
|
address = settings.host;
|
|
242
|
-
}
|
|
243
|
-
|
|
244
|
-
else {
|
|
245
|
-
const lastColonIndex = settings.host.lastIndexOf(':');
|
|
148
|
+
} else {
|
|
149
|
+
const lastColonIndex = settings.host.lastIndexOf(":");
|
|
246
150
|
if (lastColonIndex !== -1) {
|
|
247
151
|
address = settings.host.slice(0, lastColonIndex);
|
|
248
152
|
port = settings.host.slice(lastColonIndex + 1);
|
|
@@ -253,40 +157,32 @@ function getPortAndAddress(settings)
|
|
|
253
157
|
}
|
|
254
158
|
}
|
|
255
159
|
return {
|
|
256
|
-
address
|
|
257
|
-
port: port ? parseInt(port, 10) :
|
|
160
|
+
address,
|
|
161
|
+
port: port ? parseInt(port, 10) : void 0
|
|
258
162
|
};
|
|
259
163
|
}
|
|
260
|
-
|
|
261
|
-
function addAttributes(
|
|
262
|
-
span,
|
|
263
|
-
reference,
|
|
264
|
-
) {
|
|
164
|
+
function addAttributes(span, reference) {
|
|
265
165
|
const firestoreApp = reference.firestore.app;
|
|
266
166
|
const firestoreOptions = firestoreApp.options;
|
|
267
167
|
const json = reference.firestore.toJSON() || {};
|
|
268
168
|
const settings = json.settings || {};
|
|
269
|
-
|
|
270
169
|
const attributes = {
|
|
271
170
|
[ATTR_DB_COLLECTION_NAME]: reference.path,
|
|
272
171
|
[ATTR_DB_NAMESPACE]: firestoreApp.name,
|
|
273
|
-
[ATTR_DB_SYSTEM_NAME]:
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
172
|
+
[ATTR_DB_SYSTEM_NAME]: "firebase.firestore",
|
|
173
|
+
"firebase.firestore.type": reference.type,
|
|
174
|
+
"firebase.firestore.options.projectId": firestoreOptions.projectId,
|
|
175
|
+
"firebase.firestore.options.appId": firestoreOptions.appId,
|
|
176
|
+
"firebase.firestore.options.messagingSenderId": firestoreOptions.messagingSenderId,
|
|
177
|
+
"firebase.firestore.options.storageBucket": firestoreOptions.storageBucket
|
|
279
178
|
};
|
|
280
|
-
|
|
281
179
|
const { address, port } = getPortAndAddress(settings);
|
|
282
|
-
|
|
283
180
|
if (address) {
|
|
284
181
|
attributes[ATTR_SERVER_ADDRESS] = address;
|
|
285
182
|
}
|
|
286
183
|
if (port) {
|
|
287
184
|
attributes[ATTR_SERVER_PORT] = port;
|
|
288
185
|
}
|
|
289
|
-
|
|
290
186
|
span.setAttributes(attributes);
|
|
291
187
|
}
|
|
292
188
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"firestore.js","sources":["../../../../../../../src/integrations/tracing/firebase/otel/patches/firestore.ts"],"sourcesContent":["import * as net from 'node:net';\nimport type { Span, Tracer } from '@opentelemetry/api';\nimport { context, diag, SpanKind, trace } from '@opentelemetry/api';\nimport {\n InstrumentationNodeModuleDefinition,\n InstrumentationNodeModuleFile,\n isWrapped,\n safeExecuteInTheMiddle,\n} from '@opentelemetry/instrumentation';\nimport {\n ATTR_DB_COLLECTION_NAME,\n ATTR_DB_NAMESPACE,\n ATTR_DB_OPERATION_NAME,\n ATTR_DB_SYSTEM_NAME,\n ATTR_SERVER_ADDRESS,\n ATTR_SERVER_PORT,\n} from '@opentelemetry/semantic-conventions';\nimport type { SpanAttributes } from '@sentry/core';\nimport type { FirebaseInstrumentation } from '../firebaseInstrumentation';\nimport type {\n AddDocType,\n CollectionReference,\n DeleteDocType,\n DocumentData,\n DocumentReference,\n FirebaseApp,\n FirebaseInstrumentationConfig,\n FirebaseOptions,\n FirestoreSettings,\n FirestoreSpanCreationHook,\n GetDocsType,\n PartialWithFieldValue,\n QuerySnapshot,\n SetDocType,\n SetOptions,\n WithFieldValue,\n} from '../types';\n\n// Inline minimal types used from `shimmer` to avoid importing shimmer's types directly.\n// We only need the shape for `wrap` and `unwrap` used in this file.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ShimmerWrap = (target: any, name: string, wrapper: (...args: any[]) => any) => void;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ShimmerUnwrap = (target: any, name: string) => void;\n\n/**\n *\n * @param tracer - Opentelemetry Tracer\n * @param firestoreSupportedVersions - supported version of firebase/firestore\n * @param wrap - reference to native instrumentation wrap function\n * @param unwrap - reference to native instrumentation wrap function\n */\nexport function patchFirestore(\n tracer: Tracer,\n firestoreSupportedVersions: string[],\n wrap: ShimmerWrap,\n unwrap: ShimmerUnwrap,\n config: FirebaseInstrumentationConfig,\n): InstrumentationNodeModuleDefinition {\n const defaultFirestoreSpanCreationHook: FirestoreSpanCreationHook = () => {};\n\n let firestoreSpanCreationHook: FirestoreSpanCreationHook = defaultFirestoreSpanCreationHook;\n const configFirestoreSpanCreationHook = config.firestoreSpanCreationHook;\n\n if (typeof configFirestoreSpanCreationHook === 'function') {\n firestoreSpanCreationHook = (span: Span) => {\n safeExecuteInTheMiddle(\n () => configFirestoreSpanCreationHook(span),\n error => {\n if (!error) {\n return;\n }\n diag.error(error?.message);\n },\n true,\n );\n };\n }\n\n const moduleFirestoreCJS = new InstrumentationNodeModuleDefinition(\n '@firebase/firestore',\n firestoreSupportedVersions,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (moduleExports: any) => wrapMethods(moduleExports, wrap, unwrap, tracer, firestoreSpanCreationHook),\n );\n const files: string[] = [\n '@firebase/firestore/dist/lite/index.node.cjs.js',\n '@firebase/firestore/dist/lite/index.node.mjs.js',\n '@firebase/firestore/dist/lite/index.rn.esm2017.js',\n '@firebase/firestore/dist/lite/index.cjs.js',\n ];\n\n for (const file of files) {\n moduleFirestoreCJS.files.push(\n new InstrumentationNodeModuleFile(\n file,\n firestoreSupportedVersions,\n moduleExports => wrapMethods(moduleExports, wrap, unwrap, tracer, firestoreSpanCreationHook),\n moduleExports => unwrapMethods(moduleExports, unwrap),\n ),\n );\n }\n\n return moduleFirestoreCJS;\n}\n\nfunction wrapMethods(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n moduleExports: any,\n wrap: ShimmerWrap,\n unwrap: ShimmerUnwrap,\n tracer: Tracer,\n firestoreSpanCreationHook: FirestoreSpanCreationHook,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): any {\n unwrapMethods(moduleExports, unwrap);\n\n wrap(moduleExports, 'addDoc', patchAddDoc(tracer, firestoreSpanCreationHook));\n wrap(moduleExports, 'getDocs', patchGetDocs(tracer, firestoreSpanCreationHook));\n wrap(moduleExports, 'setDoc', patchSetDoc(tracer, firestoreSpanCreationHook));\n wrap(moduleExports, 'deleteDoc', patchDeleteDoc(tracer, firestoreSpanCreationHook));\n\n return moduleExports;\n}\n\nfunction unwrapMethods(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n moduleExports: any,\n unwrap: ShimmerUnwrap,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): any {\n for (const method of ['addDoc', 'getDocs', 'setDoc', 'deleteDoc']) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (isWrapped(moduleExports[method])) {\n unwrap(moduleExports, method);\n }\n }\n return moduleExports;\n}\n\nfunction patchAddDoc<AppModelType, DbModelType extends DocumentData>(\n tracer: Tracer,\n firestoreSpanCreationHook: FirestoreSpanCreationHook,\n): (\n original: AddDocType<AppModelType, DbModelType>,\n) => (\n this: FirebaseInstrumentation,\n reference: CollectionReference<AppModelType, DbModelType>,\n data: WithFieldValue<AppModelType>,\n) => Promise<DocumentReference<AppModelType, DbModelType>> {\n return function addDoc(original: AddDocType<AppModelType, DbModelType>) {\n return function (\n reference: CollectionReference<AppModelType, DbModelType>,\n data: WithFieldValue<AppModelType>,\n ): Promise<DocumentReference<AppModelType, DbModelType>> {\n const span = startDBSpan(tracer, 'addDoc', reference);\n firestoreSpanCreationHook(span);\n return executeContextWithSpan<Promise<DocumentReference<AppModelType, DbModelType>>>(span, () => {\n return original(reference, data);\n });\n };\n };\n}\n\nfunction patchDeleteDoc<AppModelType, DbModelType extends DocumentData>(\n tracer: Tracer,\n firestoreSpanCreationHook: FirestoreSpanCreationHook,\n): (\n original: DeleteDocType<AppModelType, DbModelType>,\n) => (this: FirebaseInstrumentation, reference: DocumentReference<AppModelType, DbModelType>) => Promise<void> {\n return function deleteDoc(original: DeleteDocType<AppModelType, DbModelType>) {\n return function (reference: DocumentReference<AppModelType, DbModelType>): Promise<void> {\n const span = startDBSpan(tracer, 'deleteDoc', reference.parent || reference);\n firestoreSpanCreationHook(span);\n return executeContextWithSpan<Promise<void>>(span, () => {\n return original(reference);\n });\n };\n };\n}\n\nfunction patchGetDocs<AppModelType, DbModelType extends DocumentData>(\n tracer: Tracer,\n firestoreSpanCreationHook: FirestoreSpanCreationHook,\n): (\n original: GetDocsType<AppModelType, DbModelType>,\n) => (\n this: FirebaseInstrumentation,\n reference: CollectionReference<AppModelType, DbModelType>,\n) => Promise<QuerySnapshot<AppModelType, DbModelType>> {\n return function getDocs(original: GetDocsType<AppModelType, DbModelType>) {\n return function (\n reference: CollectionReference<AppModelType, DbModelType>,\n ): Promise<QuerySnapshot<AppModelType, DbModelType>> {\n const span = startDBSpan(tracer, 'getDocs', reference);\n firestoreSpanCreationHook(span);\n return executeContextWithSpan<Promise<QuerySnapshot<AppModelType, DbModelType>>>(span, () => {\n return original(reference);\n });\n };\n };\n}\n\nfunction patchSetDoc<AppModelType, DbModelType extends DocumentData>(\n tracer: Tracer,\n firestoreSpanCreationHook: FirestoreSpanCreationHook,\n): (\n original: SetDocType<AppModelType, DbModelType>,\n) => (\n this: FirebaseInstrumentation,\n reference: DocumentReference<AppModelType, DbModelType>,\n data: WithFieldValue<AppModelType> & PartialWithFieldValue<AppModelType>,\n options?: SetOptions,\n) => Promise<void> {\n return function setDoc(original: SetDocType<AppModelType, DbModelType>) {\n return function (\n reference: DocumentReference<AppModelType, DbModelType>,\n data: WithFieldValue<AppModelType> & PartialWithFieldValue<AppModelType>,\n options?: SetOptions,\n ): Promise<void> {\n const span = startDBSpan(tracer, 'setDoc', reference.parent || reference);\n firestoreSpanCreationHook(span);\n\n return executeContextWithSpan<Promise<void>>(span, () => {\n return typeof options !== 'undefined' ? original(reference, data, options) : original(reference, data);\n });\n };\n };\n}\n\nfunction executeContextWithSpan<T>(span: Span, callback: () => T): T {\n return context.with(trace.setSpan(context.active(), span), () => {\n return safeExecuteInTheMiddle(\n (): T => {\n return callback();\n },\n err => {\n if (err) {\n span.recordException(err);\n }\n span.end();\n },\n true,\n );\n });\n}\n\nfunction startDBSpan<AppModelType, DbModelType extends DocumentData>(\n tracer: Tracer,\n spanName: string,\n reference: CollectionReference<AppModelType, DbModelType> | DocumentReference<AppModelType, DbModelType>,\n): Span {\n const span = tracer.startSpan(`${spanName} ${reference.path}`, { kind: SpanKind.CLIENT });\n addAttributes(span, reference);\n span.setAttribute(ATTR_DB_OPERATION_NAME, spanName);\n return span;\n}\n\n/**\n * Gets the server address and port attributes from the Firestore settings.\n * It's best effort to extract the address and port from the settings, especially for IPv6.\n * @param span - The span to set attributes on.\n * @param settings - The Firestore settings containing host information.\n */\nexport function getPortAndAddress(settings: FirestoreSettings): {\n address?: string;\n port?: number;\n} {\n let address: string | undefined;\n let port: string | undefined;\n\n if (typeof settings.host === 'string') {\n if (settings.host.startsWith('[')) {\n // IPv6 addresses can be enclosed in square brackets, e.g., [2001:db8::1]:8080\n if (settings.host.endsWith(']')) {\n // IPv6 with square brackets without port\n address = settings.host.replace(/^\\[|\\]$/g, '');\n } else if (settings.host.includes(']:')) {\n // IPv6 with square brackets with port\n const lastColonIndex = settings.host.lastIndexOf(':');\n if (lastColonIndex !== -1) {\n address = settings.host.slice(1, lastColonIndex).replace(/^\\[|\\]$/g, '');\n port = settings.host.slice(lastColonIndex + 1);\n }\n }\n } else {\n // IPv4 or IPv6 without square brackets\n // If it's an IPv6 address without square brackets, we assume it does not have a port.\n if (net.isIPv6(settings.host)) {\n address = settings.host;\n }\n // If it's an IPv4 address, we can extract the port if it exists.\n else {\n const lastColonIndex = settings.host.lastIndexOf(':');\n if (lastColonIndex !== -1) {\n address = settings.host.slice(0, lastColonIndex);\n port = settings.host.slice(lastColonIndex + 1);\n } else {\n address = settings.host;\n }\n }\n }\n }\n return {\n address: address,\n port: port ? parseInt(port, 10) : undefined,\n };\n}\n\nfunction addAttributes<AppModelType, DbModelType extends DocumentData>(\n span: Span,\n reference: CollectionReference<AppModelType, DbModelType> | DocumentReference<AppModelType, DbModelType>,\n): void {\n const firestoreApp: FirebaseApp = reference.firestore.app;\n const firestoreOptions: FirebaseOptions = firestoreApp.options;\n const json: { settings?: FirestoreSettings } = reference.firestore.toJSON() || {};\n const settings: FirestoreSettings = json.settings || {};\n\n const attributes: SpanAttributes = {\n [ATTR_DB_COLLECTION_NAME]: reference.path,\n [ATTR_DB_NAMESPACE]: firestoreApp.name,\n [ATTR_DB_SYSTEM_NAME]: 'firebase.firestore',\n 'firebase.firestore.type': reference.type,\n 'firebase.firestore.options.projectId': firestoreOptions.projectId,\n 'firebase.firestore.options.appId': firestoreOptions.appId,\n 'firebase.firestore.options.messagingSenderId': firestoreOptions.messagingSenderId,\n 'firebase.firestore.options.storageBucket': firestoreOptions.storageBucket,\n };\n\n const { address, port } = getPortAndAddress(settings);\n\n if (address) {\n attributes[ATTR_SERVER_ADDRESS] = address;\n }\n if (port) {\n attributes[ATTR_SERVER_PORT] = port;\n }\n\n span.setAttributes(attributes);\n}\n"],"names":[],"mappings":";;;;;AAsCA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAAS,cAAc;AAC9B,EAAE,MAAM;AACR,EAAE,0BAA0B;AAC5B,EAAE,IAAI;AACN,EAAE,MAAM;AACR,EAAE,MAAM;AACR,EAAuC;AACvC,EAAE,MAAM,gCAAgC,GAA8B,MAAM,CAAC,CAAC;;AAE9E,EAAE,IAAI,yBAAyB,GAA8B,gCAAgC;AAC7F,EAAE,MAAM,+BAAA,GAAkC,MAAM,CAAC,yBAAyB;;AAE1E,EAAE,IAAI,OAAO,+BAAA,KAAoC,UAAU,EAAE;AAC7D,IAAI,yBAAA,GAA4B,CAAC,IAAI,KAAW;AAChD,MAAM,sBAAsB;AAC5B,QAAQ,MAAM,+BAA+B,CAAC,IAAI,CAAC;AACnD,QAAQ,SAAS;AACjB,UAAU,IAAI,CAAC,KAAK,EAAE;AACtB,YAAY;AACZ,UAAU;AACV,UAAU,IAAI,CAAC,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC;AACpC,QAAQ,CAAC;AACT,QAAQ,IAAI;AACZ,OAAO;AACP,IAAI,CAAC;AACL,EAAE;;AAEF,EAAE,MAAM,kBAAA,GAAqB,IAAI,mCAAmC;AACpE,IAAI,qBAAqB;AACzB,IAAI,0BAA0B;AAC9B;AACA,IAAI,CAAC,aAAa,KAAU,WAAW,CAAC,aAAa,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,yBAAyB,CAAC;AACvG,GAAG;AACH,EAAE,MAAM,KAAK,GAAa;AAC1B,IAAI,iDAAiD;AACrD,IAAI,iDAAiD;AACrD,IAAI,mDAAmD;AACvD,IAAI,4CAA4C;AAChD,GAAG;;AA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AAA,iBAAA,GAAA,YAAA,CAAA,IAAA;AACA,IAAA,CAAA,mBAAA,GAAA,oBAAA;AACA,IAAA,yBAAA,EAAA,SAAA,CAAA,IAAA;AACA,IAAA,sCAAA,EAAA,gBAAA,CAAA,SAAA;AACA,IAAA,kCAAA,EAAA,gBAAA,CAAA,KAAA;AACA,IAAA,8CAAA,EAAA,gBAAA,CAAA,iBAAA;AACA,IAAA,0CAAA,EAAA,gBAAA,CAAA,aAAA;AACA,GAAA;;AAEA,EAAA,MAAA,EAAA,OAAA,EAAA,IAAA,EAAA,GAAA,iBAAA,CAAA,QAAA,CAAA;;AAEA,EAAA,IAAA,OAAA,EAAA;AACA,IAAA,UAAA,CAAA,mBAAA,CAAA,GAAA,OAAA;AACA,EAAA;AACA,EAAA,IAAA,IAAA,EAAA;AACA,IAAA,UAAA,CAAA,gBAAA,CAAA,GAAA,IAAA;AACA,EAAA;;AAEA,EAAA,IAAA,CAAA,aAAA,CAAA,UAAA,CAAA;AACA;;;;"}
|
|
1
|
+
{"version":3,"file":"firestore.js","sources":["../../../../../../../src/integrations/tracing/firebase/otel/patches/firestore.ts"],"sourcesContent":["import * as net from 'node:net';\nimport type { Span, Tracer } from '@opentelemetry/api';\nimport { context, diag, SpanKind, trace } from '@opentelemetry/api';\nimport {\n InstrumentationNodeModuleDefinition,\n InstrumentationNodeModuleFile,\n isWrapped,\n safeExecuteInTheMiddle,\n} from '@opentelemetry/instrumentation';\nimport {\n ATTR_DB_COLLECTION_NAME,\n ATTR_DB_NAMESPACE,\n ATTR_DB_OPERATION_NAME,\n ATTR_DB_SYSTEM_NAME,\n ATTR_SERVER_ADDRESS,\n ATTR_SERVER_PORT,\n} from '@opentelemetry/semantic-conventions';\nimport type { SpanAttributes } from '@sentry/core';\nimport type { FirebaseInstrumentation } from '../firebaseInstrumentation';\nimport type {\n AddDocType,\n CollectionReference,\n DeleteDocType,\n DocumentData,\n DocumentReference,\n FirebaseApp,\n FirebaseInstrumentationConfig,\n FirebaseOptions,\n FirestoreSettings,\n FirestoreSpanCreationHook,\n GetDocsType,\n PartialWithFieldValue,\n QuerySnapshot,\n SetDocType,\n SetOptions,\n WithFieldValue,\n} from '../types';\n\n// Inline minimal types used from `shimmer` to avoid importing shimmer's types directly.\n// We only need the shape for `wrap` and `unwrap` used in this file.\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ShimmerWrap = (target: any, name: string, wrapper: (...args: any[]) => any) => void;\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype ShimmerUnwrap = (target: any, name: string) => void;\n\n/**\n *\n * @param tracer - Opentelemetry Tracer\n * @param firestoreSupportedVersions - supported version of firebase/firestore\n * @param wrap - reference to native instrumentation wrap function\n * @param unwrap - reference to native instrumentation wrap function\n */\nexport function patchFirestore(\n tracer: Tracer,\n firestoreSupportedVersions: string[],\n wrap: ShimmerWrap,\n unwrap: ShimmerUnwrap,\n config: FirebaseInstrumentationConfig,\n): InstrumentationNodeModuleDefinition {\n const defaultFirestoreSpanCreationHook: FirestoreSpanCreationHook = () => {};\n\n let firestoreSpanCreationHook: FirestoreSpanCreationHook = defaultFirestoreSpanCreationHook;\n const configFirestoreSpanCreationHook = config.firestoreSpanCreationHook;\n\n if (typeof configFirestoreSpanCreationHook === 'function') {\n firestoreSpanCreationHook = (span: Span) => {\n safeExecuteInTheMiddle(\n () => configFirestoreSpanCreationHook(span),\n error => {\n if (!error) {\n return;\n }\n diag.error(error?.message);\n },\n true,\n );\n };\n }\n\n const moduleFirestoreCJS = new InstrumentationNodeModuleDefinition(\n '@firebase/firestore',\n firestoreSupportedVersions,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (moduleExports: any) => wrapMethods(moduleExports, wrap, unwrap, tracer, firestoreSpanCreationHook),\n );\n const files: string[] = [\n '@firebase/firestore/dist/lite/index.node.cjs.js',\n '@firebase/firestore/dist/lite/index.node.mjs.js',\n '@firebase/firestore/dist/lite/index.rn.esm2017.js',\n '@firebase/firestore/dist/lite/index.cjs.js',\n ];\n\n for (const file of files) {\n moduleFirestoreCJS.files.push(\n new InstrumentationNodeModuleFile(\n file,\n firestoreSupportedVersions,\n moduleExports => wrapMethods(moduleExports, wrap, unwrap, tracer, firestoreSpanCreationHook),\n moduleExports => unwrapMethods(moduleExports, unwrap),\n ),\n );\n }\n\n return moduleFirestoreCJS;\n}\n\nfunction wrapMethods(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n moduleExports: any,\n wrap: ShimmerWrap,\n unwrap: ShimmerUnwrap,\n tracer: Tracer,\n firestoreSpanCreationHook: FirestoreSpanCreationHook,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): any {\n unwrapMethods(moduleExports, unwrap);\n\n wrap(moduleExports, 'addDoc', patchAddDoc(tracer, firestoreSpanCreationHook));\n wrap(moduleExports, 'getDocs', patchGetDocs(tracer, firestoreSpanCreationHook));\n wrap(moduleExports, 'setDoc', patchSetDoc(tracer, firestoreSpanCreationHook));\n wrap(moduleExports, 'deleteDoc', patchDeleteDoc(tracer, firestoreSpanCreationHook));\n\n return moduleExports;\n}\n\nfunction unwrapMethods(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n moduleExports: any,\n unwrap: ShimmerUnwrap,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n): any {\n for (const method of ['addDoc', 'getDocs', 'setDoc', 'deleteDoc']) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (isWrapped(moduleExports[method])) {\n unwrap(moduleExports, method);\n }\n }\n return moduleExports;\n}\n\nfunction patchAddDoc<AppModelType, DbModelType extends DocumentData>(\n tracer: Tracer,\n firestoreSpanCreationHook: FirestoreSpanCreationHook,\n): (\n original: AddDocType<AppModelType, DbModelType>,\n) => (\n this: FirebaseInstrumentation,\n reference: CollectionReference<AppModelType, DbModelType>,\n data: WithFieldValue<AppModelType>,\n) => Promise<DocumentReference<AppModelType, DbModelType>> {\n return function addDoc(original: AddDocType<AppModelType, DbModelType>) {\n return function (\n reference: CollectionReference<AppModelType, DbModelType>,\n data: WithFieldValue<AppModelType>,\n ): Promise<DocumentReference<AppModelType, DbModelType>> {\n const span = startDBSpan(tracer, 'addDoc', reference);\n firestoreSpanCreationHook(span);\n return executeContextWithSpan<Promise<DocumentReference<AppModelType, DbModelType>>>(span, () => {\n return original(reference, data);\n });\n };\n };\n}\n\nfunction patchDeleteDoc<AppModelType, DbModelType extends DocumentData>(\n tracer: Tracer,\n firestoreSpanCreationHook: FirestoreSpanCreationHook,\n): (\n original: DeleteDocType<AppModelType, DbModelType>,\n) => (this: FirebaseInstrumentation, reference: DocumentReference<AppModelType, DbModelType>) => Promise<void> {\n return function deleteDoc(original: DeleteDocType<AppModelType, DbModelType>) {\n return function (reference: DocumentReference<AppModelType, DbModelType>): Promise<void> {\n const span = startDBSpan(tracer, 'deleteDoc', reference.parent || reference);\n firestoreSpanCreationHook(span);\n return executeContextWithSpan<Promise<void>>(span, () => {\n return original(reference);\n });\n };\n };\n}\n\nfunction patchGetDocs<AppModelType, DbModelType extends DocumentData>(\n tracer: Tracer,\n firestoreSpanCreationHook: FirestoreSpanCreationHook,\n): (\n original: GetDocsType<AppModelType, DbModelType>,\n) => (\n this: FirebaseInstrumentation,\n reference: CollectionReference<AppModelType, DbModelType>,\n) => Promise<QuerySnapshot<AppModelType, DbModelType>> {\n return function getDocs(original: GetDocsType<AppModelType, DbModelType>) {\n return function (\n reference: CollectionReference<AppModelType, DbModelType>,\n ): Promise<QuerySnapshot<AppModelType, DbModelType>> {\n const span = startDBSpan(tracer, 'getDocs', reference);\n firestoreSpanCreationHook(span);\n return executeContextWithSpan<Promise<QuerySnapshot<AppModelType, DbModelType>>>(span, () => {\n return original(reference);\n });\n };\n };\n}\n\nfunction patchSetDoc<AppModelType, DbModelType extends DocumentData>(\n tracer: Tracer,\n firestoreSpanCreationHook: FirestoreSpanCreationHook,\n): (\n original: SetDocType<AppModelType, DbModelType>,\n) => (\n this: FirebaseInstrumentation,\n reference: DocumentReference<AppModelType, DbModelType>,\n data: WithFieldValue<AppModelType> & PartialWithFieldValue<AppModelType>,\n options?: SetOptions,\n) => Promise<void> {\n return function setDoc(original: SetDocType<AppModelType, DbModelType>) {\n return function (\n reference: DocumentReference<AppModelType, DbModelType>,\n data: WithFieldValue<AppModelType> & PartialWithFieldValue<AppModelType>,\n options?: SetOptions,\n ): Promise<void> {\n const span = startDBSpan(tracer, 'setDoc', reference.parent || reference);\n firestoreSpanCreationHook(span);\n\n return executeContextWithSpan<Promise<void>>(span, () => {\n return typeof options !== 'undefined' ? original(reference, data, options) : original(reference, data);\n });\n };\n };\n}\n\nfunction executeContextWithSpan<T>(span: Span, callback: () => T): T {\n return context.with(trace.setSpan(context.active(), span), () => {\n return safeExecuteInTheMiddle(\n (): T => {\n return callback();\n },\n err => {\n if (err) {\n span.recordException(err);\n }\n span.end();\n },\n true,\n );\n });\n}\n\nfunction startDBSpan<AppModelType, DbModelType extends DocumentData>(\n tracer: Tracer,\n spanName: string,\n reference: CollectionReference<AppModelType, DbModelType> | DocumentReference<AppModelType, DbModelType>,\n): Span {\n const span = tracer.startSpan(`${spanName} ${reference.path}`, { kind: SpanKind.CLIENT });\n addAttributes(span, reference);\n span.setAttribute(ATTR_DB_OPERATION_NAME, spanName);\n return span;\n}\n\n/**\n * Gets the server address and port attributes from the Firestore settings.\n * It's best effort to extract the address and port from the settings, especially for IPv6.\n * @param span - The span to set attributes on.\n * @param settings - The Firestore settings containing host information.\n */\nexport function getPortAndAddress(settings: FirestoreSettings): {\n address?: string;\n port?: number;\n} {\n let address: string | undefined;\n let port: string | undefined;\n\n if (typeof settings.host === 'string') {\n if (settings.host.startsWith('[')) {\n // IPv6 addresses can be enclosed in square brackets, e.g., [2001:db8::1]:8080\n if (settings.host.endsWith(']')) {\n // IPv6 with square brackets without port\n address = settings.host.replace(/^\\[|\\]$/g, '');\n } else if (settings.host.includes(']:')) {\n // IPv6 with square brackets with port\n const lastColonIndex = settings.host.lastIndexOf(':');\n if (lastColonIndex !== -1) {\n address = settings.host.slice(1, lastColonIndex).replace(/^\\[|\\]$/g, '');\n port = settings.host.slice(lastColonIndex + 1);\n }\n }\n } else {\n // IPv4 or IPv6 without square brackets\n // If it's an IPv6 address without square brackets, we assume it does not have a port.\n if (net.isIPv6(settings.host)) {\n address = settings.host;\n }\n // If it's an IPv4 address, we can extract the port if it exists.\n else {\n const lastColonIndex = settings.host.lastIndexOf(':');\n if (lastColonIndex !== -1) {\n address = settings.host.slice(0, lastColonIndex);\n port = settings.host.slice(lastColonIndex + 1);\n } else {\n address = settings.host;\n }\n }\n }\n }\n return {\n address: address,\n port: port ? parseInt(port, 10) : undefined,\n };\n}\n\nfunction addAttributes<AppModelType, DbModelType extends DocumentData>(\n span: Span,\n reference: CollectionReference<AppModelType, DbModelType> | DocumentReference<AppModelType, DbModelType>,\n): void {\n const firestoreApp: FirebaseApp = reference.firestore.app;\n const firestoreOptions: FirebaseOptions = firestoreApp.options;\n const json: { settings?: FirestoreSettings } = reference.firestore.toJSON() || {};\n const settings: FirestoreSettings = json.settings || {};\n\n const attributes: SpanAttributes = {\n [ATTR_DB_COLLECTION_NAME]: reference.path,\n [ATTR_DB_NAMESPACE]: firestoreApp.name,\n [ATTR_DB_SYSTEM_NAME]: 'firebase.firestore',\n 'firebase.firestore.type': reference.type,\n 'firebase.firestore.options.projectId': firestoreOptions.projectId,\n 'firebase.firestore.options.appId': firestoreOptions.appId,\n 'firebase.firestore.options.messagingSenderId': firestoreOptions.messagingSenderId,\n 'firebase.firestore.options.storageBucket': firestoreOptions.storageBucket,\n };\n\n const { address, port } = getPortAndAddress(settings);\n\n if (address) {\n attributes[ATTR_SERVER_ADDRESS] = address;\n }\n if (port) {\n attributes[ATTR_SERVER_PORT] = port;\n }\n\n span.setAttributes(attributes);\n}\n"],"names":[],"mappings":";;;;;AAoDO,SAAS,cAAA,CACd,MAAA,EACA,0BAAA,EACA,IAAA,EACA,QACA,MAAA,EACqC;AACrC,EAAA,MAAM,mCAA8D,MAAM;AAAA,EAAC,C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