@sentry/node 10.53.0 → 10.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/debug-build.js +0 -5
- package/build/cjs/debug-build.js.map +1 -1
- package/build/cjs/index.js +68 -68
- package/build/cjs/init.js +0 -6
- package/build/cjs/init.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/growthbook.js +0 -4
- package/build/cjs/integrations/featureFlagShims/growthbook.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/launchDarkly.js +6 -18
- package/build/cjs/integrations/featureFlagShims/launchDarkly.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/openFeature.js +6 -21
- package/build/cjs/integrations/featureFlagShims/openFeature.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/statsig.js +2 -8
- package/build/cjs/integrations/featureFlagShims/statsig.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/unleash.js +2 -8
- package/build/cjs/integrations/featureFlagShims/unleash.js.map +1 -1
- package/build/cjs/integrations/fs/index.js +107 -0
- package/build/cjs/integrations/fs/index.js.map +1 -0
- package/build/cjs/integrations/fs/vendored/constants.js +138 -0
- package/build/cjs/integrations/fs/vendored/constants.js.map +1 -0
- package/build/cjs/integrations/fs/vendored/instrumentation.js +311 -0
- package/build/cjs/integrations/fs/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/fs/vendored/utils.js +31 -0
- package/build/cjs/integrations/fs/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/http.js +11 -37
- package/build/cjs/integrations/http.js.map +1 -1
- package/build/cjs/integrations/node-fetch/index.js +19 -46
- package/build/cjs/integrations/node-fetch/index.js.map +1 -1
- package/build/cjs/integrations/node-fetch/vendored/undici.js +71 -215
- package/build/cjs/integrations/node-fetch/vendored/undici.js.map +1 -1
- package/build/cjs/integrations/tracing/amqplib/index.js +29 -0
- package/build/cjs/integrations/tracing/amqplib/index.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/amqplib.js +452 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/amqplib.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv-obsolete.js +24 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js +12 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/types.js +23 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/types.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/utils.js +137 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/anthropic-ai/index.js +3 -58
- package/build/cjs/integrations/tracing/anthropic-ai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js +16 -39
- package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/connect/index.js +56 -0
- package/build/cjs/integrations/tracing/connect/index.js.map +1 -0
- package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js +22 -0
- package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js +148 -0
- package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/connect/vendored/internal-types.js +8 -0
- package/build/cjs/integrations/tracing/connect/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/connect/vendored/utils.js +35 -0
- package/build/cjs/integrations/tracing/connect/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/dataloader/index.js +41 -0
- package/build/cjs/integrations/tracing/dataloader/index.js.map +1 -0
- package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js +245 -0
- package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/express.js +15 -23
- package/build/cjs/integrations/tracing/express.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/index.js +46 -165
- package/build/cjs/integrations/tracing/fastify/index.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/v3/constants.js +1 -18
- package/build/cjs/integrations/tracing/fastify/v3/constants.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js +20 -33
- package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js +68 -150
- package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/v3/utils.js +8 -79
- package/build/cjs/integrations/tracing/fastify/v3/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/vendored/instrumentation.js +388 -0
- package/build/cjs/integrations/tracing/fastify/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/firebase/firebase.js +15 -21
- package/build/cjs/integrations/tracing/firebase/firebase.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js +6 -14
- package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js +57 -161
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js +81 -147
- package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
- package/build/cjs/integrations/tracing/genericPool/index.js +35 -0
- package/build/cjs/integrations/tracing/genericPool/index.js.map +1 -0
- package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js +122 -0
- package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/google-genai/index.js +3 -58
- package/build/cjs/integrations/tracing/google-genai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/google-genai/instrumentation.js +18 -39
- package/build/cjs/integrations/tracing/google-genai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/graphql/index.js +83 -0
- package/build/cjs/integrations/tracing/graphql/index.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/enum.js +47 -0
- package/build/cjs/integrations/tracing/graphql/vendored/enum.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js +17 -0
- package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js +318 -0
- package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js +6 -0
- package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/symbols.js +8 -0
- package/build/cjs/integrations/tracing/graphql/vendored/symbols.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/utils.js +300 -0
- package/build/cjs/integrations/tracing/graphql/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/hapi/index.js +20 -78
- package/build/cjs/integrations/tracing/hapi/index.js.map +1 -1
- package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js +11 -0
- package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js +275 -0
- package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js +24 -0
- package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/hapi/vendored/semconv.js +6 -0
- package/build/cjs/integrations/tracing/hapi/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/hapi/vendored/utils.js +91 -0
- package/build/cjs/integrations/tracing/hapi/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/hono/constants.js +6 -7
- package/build/cjs/integrations/tracing/hono/constants.js.map +1 -1
- package/build/cjs/integrations/tracing/hono/index.js +19 -70
- package/build/cjs/integrations/tracing/hono/index.js.map +1 -1
- package/build/cjs/integrations/tracing/hono/instrumentation.js +47 -82
- package/build/cjs/integrations/tracing/hono/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/index.js +74 -82
- package/build/cjs/integrations/tracing/index.js.map +1 -1
- package/build/cjs/integrations/tracing/kafka/index.js +31 -0
- package/build/cjs/integrations/tracing/kafka/index.js.map +1 -0
- package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js +438 -0
- package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/kafka/vendored/internal-types.js +6 -0
- package/build/cjs/integrations/tracing/kafka/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/kafka/vendored/propagator.js +22 -0
- package/build/cjs/integrations/tracing/kafka/vendored/propagator.js.map +1 -0
- package/build/cjs/integrations/tracing/kafka/vendored/semconv.js +38 -0
- package/build/cjs/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/index.js +36 -0
- package/build/cjs/integrations/tracing/knex/index.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/vendored/constants.js +16 -0
- package/build/cjs/integrations/tracing/knex/vendored/constants.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js +162 -0
- package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/vendored/semconv.js +24 -0
- package/build/cjs/integrations/tracing/knex/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/vendored/utils.js +97 -0
- package/build/cjs/integrations/tracing/knex/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/index.js +69 -0
- package/build/cjs/integrations/tracing/koa/index.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js +10 -0
- package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js +140 -0
- package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/vendored/internal-types.js +6 -0
- package/build/cjs/integrations/tracing/koa/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/vendored/types.js +10 -0
- package/build/cjs/integrations/tracing/koa/vendored/types.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/vendored/utils.js +33 -0
- package/build/cjs/integrations/tracing/koa/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/langchain/index.js +3 -97
- package/build/cjs/integrations/tracing/langchain/index.js.map +1 -1
- package/build/cjs/integrations/tracing/langchain/instrumentation.js +51 -146
- package/build/cjs/integrations/tracing/langchain/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/langgraph/index.js +3 -73
- package/build/cjs/integrations/tracing/langgraph/index.js.map +1 -1
- package/build/cjs/integrations/tracing/langgraph/instrumentation.js +27 -38
- package/build/cjs/integrations/tracing/langgraph/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/lrumemoizer/index.js +21 -0
- package/build/cjs/integrations/tracing/lrumemoizer/index.js.map +1 -0
- package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js +39 -0
- package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/index.js +62 -0
- package/build/cjs/integrations/tracing/mongo/index.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js +678 -0
- package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/vendored/internal-types.js +14 -0
- package/build/cjs/integrations/tracing/mongo/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/vendored/semconv.js +26 -0
- package/build/cjs/integrations/tracing/mongo/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose/index.js +28 -0
- package/build/cjs/integrations/tracing/mongoose/index.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js +375 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/semconv.js +22 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/utils.js +87 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql/index.js +21 -0
- package/build/cjs/integrations/tracing/mysql/index.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql/vendored/AttributeNames.js +9 -0
- package/build/cjs/integrations/tracing/mysql/vendored/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js +278 -0
- package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql/vendored/semconv.js +22 -0
- package/build/cjs/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql/vendored/utils.js +63 -0
- package/build/cjs/integrations/tracing/mysql/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/index.js +28 -0
- package/build/cjs/integrations/tracing/mysql2/index.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js +173 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js +20 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/utils.js +97 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/openai/index.js +3 -58
- package/build/cjs/integrations/tracing/openai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/openai/instrumentation.js +17 -41
- package/build/cjs/integrations/tracing/openai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/postgres/index.js +31 -0
- package/build/cjs/integrations/tracing/postgres/index.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js +12 -0
- package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js +11 -0
- package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js +436 -0
- package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/internal-types.js +6 -0
- package/build/cjs/integrations/tracing/postgres/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/semconv.js +32 -0
- package/build/cjs/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/utils.js +275 -0
- package/build/cjs/integrations/tracing/postgres/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/postgresjs.js +66 -181
- package/build/cjs/integrations/tracing/postgresjs.js.map +1 -1
- package/build/cjs/integrations/tracing/prisma/index.js +123 -0
- package/build/cjs/integrations/tracing/prisma/index.js.map +1 -0
- package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js +119 -0
- package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -0
- package/build/cjs/integrations/tracing/prisma/vendored/constants.js +14 -0
- package/build/cjs/integrations/tracing/prisma/vendored/constants.js.map +1 -0
- package/build/cjs/integrations/tracing/prisma/vendored/global.js +28 -0
- package/build/cjs/integrations/tracing/prisma/vendored/global.js.map +1 -0
- package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js +38 -0
- package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/redis/index.js +15 -72
- package/build/cjs/integrations/tracing/redis/index.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/redis-dc-subscriber.js +42 -77
- package/build/cjs/integrations/tracing/redis/redis-dc-subscriber.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js +53 -98
- package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/vendored/redis-common.js +9 -49
- package/build/cjs/integrations/tracing/redis/vendored/redis-common.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js +175 -282
- package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/vendored/semconv.js +7 -36
- package/build/cjs/integrations/tracing/redis/vendored/semconv.js.map +1 -1
- package/build/cjs/integrations/tracing/tedious/index.js +45 -0
- package/build/cjs/integrations/tracing/tedious/index.js.map +1 -0
- package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js +205 -0
- package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/tedious/vendored/semconv.js +20 -0
- package/build/cjs/integrations/tracing/tedious/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/tedious/vendored/utils.js +29 -0
- package/build/cjs/integrations/tracing/tedious/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/utils/sql-common.js +43 -0
- package/build/cjs/integrations/tracing/utils/sql-common.js.map +1 -0
- package/build/cjs/integrations/tracing/vercelai/constants.js +1 -1
- package/build/cjs/integrations/tracing/vercelai/index.js +3 -50
- package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/vercelai/instrumentation.js +58 -157
- package/build/cjs/integrations/tracing/vercelai/instrumentation.js.map +1 -1
- package/build/cjs/preload.js +1 -14
- package/build/cjs/preload.js.map +1 -1
- package/build/cjs/sdk/index.js +6 -34
- package/build/cjs/sdk/index.js.map +1 -1
- package/build/cjs/sdk/initOtel.js +13 -51
- package/build/cjs/sdk/initOtel.js.map +1 -1
- package/build/cjs/utils/redisCache.js +24 -52
- package/build/cjs/utils/redisCache.js.map +1 -1
- package/build/esm/debug-build.js +0 -5
- package/build/esm/debug-build.js.map +1 -1
- package/build/esm/index.js +17 -17
- package/build/esm/init.js +0 -6
- package/build/esm/init.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/growthbook.js +0 -4
- package/build/esm/integrations/featureFlagShims/growthbook.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/launchDarkly.js +6 -18
- package/build/esm/integrations/featureFlagShims/launchDarkly.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/openFeature.js +6 -21
- package/build/esm/integrations/featureFlagShims/openFeature.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/statsig.js +2 -8
- package/build/esm/integrations/featureFlagShims/statsig.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/unleash.js +2 -8
- package/build/esm/integrations/featureFlagShims/unleash.js.map +1 -1
- package/build/esm/integrations/fs/index.js +105 -0
- package/build/esm/integrations/fs/index.js.map +1 -0
- package/build/esm/integrations/fs/vendored/constants.js +134 -0
- package/build/esm/integrations/fs/vendored/constants.js.map +1 -0
- package/build/esm/integrations/fs/vendored/instrumentation.js +309 -0
- package/build/esm/integrations/fs/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/fs/vendored/utils.js +28 -0
- package/build/esm/integrations/fs/vendored/utils.js.map +1 -0
- package/build/esm/integrations/http.js +11 -37
- package/build/esm/integrations/http.js.map +1 -1
- package/build/esm/integrations/node-fetch/index.js +19 -46
- package/build/esm/integrations/node-fetch/index.js.map +1 -1
- package/build/esm/integrations/node-fetch/vendored/undici.js +71 -215
- package/build/esm/integrations/node-fetch/vendored/undici.js.map +1 -1
- package/build/esm/integrations/tracing/amqplib/index.js +26 -0
- package/build/esm/integrations/tracing/amqplib/index.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/amqplib.js +450 -0
- package/build/esm/integrations/tracing/amqplib/vendored/amqplib.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/semconv-obsolete.js +13 -0
- package/build/esm/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/semconv.js +7 -0
- package/build/esm/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/types.js +20 -0
- package/build/esm/integrations/tracing/amqplib/vendored/types.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/utils.js +126 -0
- package/build/esm/integrations/tracing/amqplib/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/anthropic-ai/index.js +3 -58
- package/build/esm/integrations/tracing/anthropic-ai/index.js.map +1 -1
- package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js +16 -39
- package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/connect/index.js +52 -0
- package/build/esm/integrations/tracing/connect/index.js.map +1 -0
- package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js +18 -0
- package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/connect/vendored/instrumentation.js +145 -0
- package/build/esm/integrations/tracing/connect/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/connect/vendored/internal-types.js +6 -0
- package/build/esm/integrations/tracing/connect/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/connect/vendored/utils.js +31 -0
- package/build/esm/integrations/tracing/connect/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/dataloader/index.js +38 -0
- package/build/esm/integrations/tracing/dataloader/index.js.map +1 -0
- package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js +243 -0
- package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/express.js +15 -23
- package/build/esm/integrations/tracing/express.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/index.js +45 -164
- package/build/esm/integrations/tracing/fastify/index.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/v3/constants.js +1 -18
- package/build/esm/integrations/tracing/fastify/v3/constants.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js +17 -34
- package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/v3/instrumentation.js +68 -150
- package/build/esm/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/v3/utils.js +8 -79
- package/build/esm/integrations/tracing/fastify/v3/utils.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/vendored/instrumentation.js +386 -0
- package/build/esm/integrations/tracing/fastify/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/firebase/firebase.js +15 -21
- package/build/esm/integrations/tracing/firebase/firebase.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js +6 -14
- package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js +57 -161
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/patches/functions.js +81 -147
- package/build/esm/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
- package/build/esm/integrations/tracing/genericPool/index.js +32 -0
- package/build/esm/integrations/tracing/genericPool/index.js.map +1 -0
- package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js +120 -0
- package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/google-genai/index.js +3 -58
- package/build/esm/integrations/tracing/google-genai/index.js.map +1 -1
- package/build/esm/integrations/tracing/google-genai/instrumentation.js +18 -39
- package/build/esm/integrations/tracing/google-genai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/graphql/index.js +80 -0
- package/build/esm/integrations/tracing/graphql/index.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/enum.js +43 -0
- package/build/esm/integrations/tracing/graphql/vendored/enum.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js +15 -0
- package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js +316 -0
- package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/internal-types.js +4 -0
- package/build/esm/integrations/tracing/graphql/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/symbols.js +5 -0
- package/build/esm/integrations/tracing/graphql/vendored/symbols.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/utils.js +291 -0
- package/build/esm/integrations/tracing/graphql/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/hapi/index.js +19 -77
- package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
- package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js +9 -0
- package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js +273 -0
- package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/hapi/vendored/internal-types.js +19 -0
- package/build/esm/integrations/tracing/hapi/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/hapi/vendored/semconv.js +4 -0
- package/build/esm/integrations/tracing/hapi/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/hapi/vendored/utils.js +82 -0
- package/build/esm/integrations/tracing/hapi/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/hono/constants.js +6 -7
- package/build/esm/integrations/tracing/hono/constants.js.map +1 -1
- package/build/esm/integrations/tracing/hono/index.js +19 -70
- package/build/esm/integrations/tracing/hono/index.js.map +1 -1
- package/build/esm/integrations/tracing/hono/instrumentation.js +47 -82
- package/build/esm/integrations/tracing/hono/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/index.js +16 -24
- package/build/esm/integrations/tracing/index.js.map +1 -1
- package/build/esm/integrations/tracing/kafka/index.js +28 -0
- package/build/esm/integrations/tracing/kafka/index.js.map +1 -0
- package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js +436 -0
- package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/kafka/vendored/internal-types.js +4 -0
- package/build/esm/integrations/tracing/kafka/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/kafka/vendored/propagator.js +20 -0
- package/build/esm/integrations/tracing/kafka/vendored/propagator.js.map +1 -0
- package/build/esm/integrations/tracing/kafka/vendored/semconv.js +20 -0
- package/build/esm/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/knex/index.js +33 -0
- package/build/esm/integrations/tracing/knex/index.js.map +1 -0
- package/build/esm/integrations/tracing/knex/vendored/constants.js +13 -0
- package/build/esm/integrations/tracing/knex/vendored/constants.js.map +1 -0
- package/build/esm/integrations/tracing/knex/vendored/instrumentation.js +160 -0
- package/build/esm/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/knex/vendored/semconv.js +13 -0
- package/build/esm/integrations/tracing/knex/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/knex/vendored/utils.js +87 -0
- package/build/esm/integrations/tracing/knex/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/koa/index.js +65 -0
- package/build/esm/integrations/tracing/koa/index.js.map +1 -0
- package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js +8 -0
- package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/koa/vendored/instrumentation.js +138 -0
- package/build/esm/integrations/tracing/koa/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/koa/vendored/internal-types.js +4 -0
- package/build/esm/integrations/tracing/koa/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/koa/vendored/types.js +8 -0
- package/build/esm/integrations/tracing/koa/vendored/types.js.map +1 -0
- package/build/esm/integrations/tracing/koa/vendored/utils.js +30 -0
- package/build/esm/integrations/tracing/koa/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/langchain/index.js +3 -97
- package/build/esm/integrations/tracing/langchain/index.js.map +1 -1
- package/build/esm/integrations/tracing/langchain/instrumentation.js +52 -147
- package/build/esm/integrations/tracing/langchain/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/langgraph/index.js +3 -73
- package/build/esm/integrations/tracing/langgraph/index.js.map +1 -1
- package/build/esm/integrations/tracing/langgraph/instrumentation.js +27 -38
- package/build/esm/integrations/tracing/langgraph/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/lrumemoizer/index.js +18 -0
- package/build/esm/integrations/tracing/lrumemoizer/index.js.map +1 -0
- package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js +37 -0
- package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/index.js +58 -0
- package/build/esm/integrations/tracing/mongo/index.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js +676 -0
- package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/vendored/internal-types.js +12 -0
- package/build/esm/integrations/tracing/mongo/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/vendored/semconv.js +14 -0
- package/build/esm/integrations/tracing/mongo/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose/index.js +25 -0
- package/build/esm/integrations/tracing/mongoose/index.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js +371 -0
- package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose/vendored/semconv.js +12 -0
- package/build/esm/integrations/tracing/mongoose/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose/vendored/utils.js +83 -0
- package/build/esm/integrations/tracing/mongoose/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/mysql/index.js +18 -0
- package/build/esm/integrations/tracing/mysql/index.js.map +1 -0
- package/build/esm/integrations/tracing/mysql/vendored/AttributeNames.js +7 -0
- package/build/esm/integrations/tracing/mysql/vendored/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js +276 -0
- package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mysql/vendored/semconv.js +12 -0
- package/build/esm/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/mysql/vendored/utils.js +55 -0
- package/build/esm/integrations/tracing/mysql/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/index.js +25 -0
- package/build/esm/integrations/tracing/mysql2/index.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js +171 -0
- package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/vendored/semconv.js +11 -0
- package/build/esm/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/vendored/utils.js +91 -0
- package/build/esm/integrations/tracing/mysql2/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/openai/index.js +3 -58
- package/build/esm/integrations/tracing/openai/index.js.map +1 -1
- package/build/esm/integrations/tracing/openai/instrumentation.js +17 -41
- package/build/esm/integrations/tracing/openai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/postgres/index.js +28 -0
- package/build/esm/integrations/tracing/postgres/index.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js +10 -0
- package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js +9 -0
- package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js +434 -0
- package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/internal-types.js +4 -0
- package/build/esm/integrations/tracing/postgres/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/semconv.js +17 -0
- package/build/esm/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/utils.js +257 -0
- package/build/esm/integrations/tracing/postgres/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/postgresjs.js +66 -181
- package/build/esm/integrations/tracing/postgresjs.js.map +1 -1
- package/build/esm/integrations/tracing/prisma/index.js +120 -0
- package/build/esm/integrations/tracing/prisma/index.js.map +1 -0
- package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js +117 -0
- package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -0
- package/build/esm/integrations/tracing/prisma/vendored/constants.js +9 -0
- package/build/esm/integrations/tracing/prisma/vendored/constants.js.map +1 -0
- package/build/esm/integrations/tracing/prisma/vendored/global.js +24 -0
- package/build/esm/integrations/tracing/prisma/vendored/global.js.map +1 -0
- package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js +36 -0
- package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/redis/index.js +15 -72
- package/build/esm/integrations/tracing/redis/index.js.map +1 -1
- package/build/esm/integrations/tracing/redis/redis-dc-subscriber.js +42 -77
- package/build/esm/integrations/tracing/redis/redis-dc-subscriber.js.map +1 -1
- package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js +53 -98
- package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/redis/vendored/redis-common.js +9 -49
- package/build/esm/integrations/tracing/redis/vendored/redis-common.js.map +1 -1
- package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js +175 -282
- package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/redis/vendored/semconv.js +7 -36
- package/build/esm/integrations/tracing/redis/vendored/semconv.js.map +1 -1
- package/build/esm/integrations/tracing/tedious/index.js +42 -0
- package/build/esm/integrations/tracing/tedious/index.js.map +1 -0
- package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js +202 -0
- package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/tedious/vendored/semconv.js +11 -0
- package/build/esm/integrations/tracing/tedious/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/tedious/vendored/utils.js +26 -0
- package/build/esm/integrations/tracing/tedious/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/utils/sql-common.js +41 -0
- package/build/esm/integrations/tracing/utils/sql-common.js.map +1 -0
- package/build/esm/integrations/tracing/vercelai/constants.js +1 -1
- package/build/esm/integrations/tracing/vercelai/index.js +3 -50
- package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/esm/integrations/tracing/vercelai/instrumentation.js +58 -157
- package/build/esm/integrations/tracing/vercelai/instrumentation.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/preload.js +1 -14
- package/build/esm/preload.js.map +1 -1
- package/build/esm/sdk/index.js +6 -34
- package/build/esm/sdk/index.js.map +1 -1
- package/build/esm/sdk/initOtel.js +13 -51
- package/build/esm/sdk/initOtel.js.map +1 -1
- package/build/esm/utils/redisCache.js +24 -52
- package/build/esm/utils/redisCache.js.map +1 -1
- package/build/types/integrations/{fs.d.ts → fs/index.d.ts} +1 -1
- package/build/types/integrations/fs/index.d.ts.map +1 -0
- package/build/types/integrations/fs/vendored/constants.d.ts +5 -0
- package/build/types/integrations/fs/vendored/constants.d.ts.map +1 -0
- package/build/types/integrations/fs/vendored/instrumentation.d.ts +15 -0
- package/build/types/integrations/fs/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/fs/vendored/types.d.ts +29 -0
- package/build/types/integrations/fs/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/fs/vendored/utils.d.ts +10 -0
- package/build/types/integrations/fs/vendored/utils.d.ts.map +1 -0
- package/build/{types-ts3.8/integrations/tracing/amqplib.d.ts → types/integrations/tracing/amqplib/index.d.ts} +20 -20
- package/build/types/integrations/tracing/amqplib/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +44 -0
- package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/amqplib.d.ts +26 -0
- package/build/types/integrations/tracing/amqplib/vendored/amqplib.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts +63 -0
- package/build/types/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts +41 -0
- package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/types.d.ts +130 -0
- package/build/types/integrations/tracing/amqplib/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts +35 -0
- package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{connect.d.ts → connect/index.d.ts} +2 -2
- package/build/types/integrations/tracing/connect/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +13 -0
- package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts +18 -0
- package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts +31 -0
- package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/connect/vendored/utils.d.ts +5 -0
- package/build/types/integrations/tracing/connect/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{dataloader.d.ts → dataloader/index.d.ts} +2 -2
- package/build/types/integrations/tracing/dataloader/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/dataloader/vendored/dataloader-types.d.ts +14 -0
- package/build/types/integrations/tracing/dataloader/vendored/dataloader-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts +21 -0
- package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/dataloader/vendored/types.d.ts +10 -0
- package/build/types/integrations/tracing/dataloader/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/fastify/vendored/instrumentation.d.ts +27 -0
- package/build/types/integrations/tracing/fastify/vendored/instrumentation.d.ts.map +1 -0
- package/build/{types-ts3.8/integrations/tracing/genericPool.d.ts → types/integrations/tracing/genericPool/index.d.ts} +20 -20
- package/build/types/integrations/tracing/genericPool/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +5 -0
- package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts +10 -0
- package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +2 -2
- package/build/types/integrations/tracing/graphql/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/enum.d.ts +38 -0
- package/build/types/integrations/tracing/graphql/vendored/enum.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +12 -0
- package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts +136 -0
- package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts +20 -0
- package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts +63 -0
- package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts +3 -0
- package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/types.d.ts +71 -0
- package/build/types/integrations/tracing/graphql/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/utils.d.ts +17 -0
- package/build/types/integrations/tracing/graphql/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/index.d.ts +1 -1
- package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +6 -0
- package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts +70 -0
- package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts +72 -0
- package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts +32 -0
- package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/vendored/semconv.d.ts +13 -0
- package/build/types/integrations/tracing/hapi/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/vendored/utils.d.ts +19 -0
- package/build/types/integrations/tracing/hapi/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +2 -2
- package/build/types/integrations/tracing/kafka/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts +25 -0
- package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/internal-types.d.ts +9 -0
- package/build/types/integrations/tracing/kafka/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +111 -0
- package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/propagator.d.ts +3 -0
- package/build/types/integrations/tracing/kafka/vendored/propagator.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts +131 -0
- package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/types.d.ts +26 -0
- package/build/types/integrations/tracing/kafka/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/{knex.d.ts → knex/index.d.ts} +2 -2
- package/build/types/integrations/tracing/knex/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/constants.d.ts +3 -0
- package/build/types/integrations/tracing/knex/vendored/constants.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts +14 -0
- package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/semconv.d.ts +38 -0
- package/build/types/integrations/tracing/knex/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/types.d.ts +8 -0
- package/build/types/integrations/tracing/knex/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/utils.d.ts +15 -0
- package/build/types/integrations/tracing/knex/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{koa.d.ts → koa/index.d.ts} +2 -2
- package/build/types/integrations/tracing/koa/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +5 -0
- package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts +32 -0
- package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts +34 -0
- package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/koa/vendored/types.d.ts +50 -0
- package/build/types/integrations/tracing/koa/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/koa/vendored/utils.d.ts +15 -0
- package/build/types/integrations/tracing/koa/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/langchain/instrumentation.d.ts.map +1 -1
- package/build/{types-ts3.8/integrations/tracing/lrumemoizer.d.ts → types/integrations/tracing/lrumemoizer/index.d.ts} +19 -19
- package/build/types/integrations/tracing/lrumemoizer/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
- package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/{mongo.d.ts → mongo/index.d.ts} +2 -2
- package/build/types/integrations/tracing/mongo/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts +79 -0
- package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts +121 -0
- package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongo/vendored/semconv.d.ts +107 -0
- package/build/types/integrations/tracing/mongo/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongo/vendored/types.d.ts +51 -0
- package/build/types/integrations/tracing/mongo/vendored/types.d.ts.map +1 -0
- package/build/{types-ts3.8/integrations/tracing/mongoose.d.ts → types/integrations/tracing/mongoose/index.d.ts} +20 -20
- package/build/types/integrations/tracing/mongoose/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +30 -0
- package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts +24 -0
- package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/vendored/semconv.d.ts +71 -0
- package/build/types/integrations/tracing/mongoose/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/vendored/types.d.ts +36 -0
- package/build/types/integrations/tracing/mongoose/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts +8 -0
- package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +2 -2
- package/build/types/integrations/tracing/mysql/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/AttributeNames.d.ts +4 -0
- package/build/types/integrations/tracing/mysql/vendored/AttributeNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts +28 -0
- package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts +78 -0
- package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts +88 -0
- package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/types.d.ts +9 -0
- package/build/types/integrations/tracing/mysql/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/utils.d.ts +25 -0
- package/build/types/integrations/tracing/mysql/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +2 -2
- package/build/types/integrations/tracing/mysql2/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts +12 -0
- package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +39 -0
- package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts +9 -0
- package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2/vendored/types.d.ts +18 -0
- package/build/types/integrations/tracing/mysql2/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts +27 -0
- package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +2 -2
- package/build/types/integrations/tracing/postgres/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +7 -0
- package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +6 -0
- package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts +20 -0
- package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts +35 -0
- package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +20 -0
- package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts +54 -0
- package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts +112 -0
- package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/types.d.ts +65 -0
- package/build/types/integrations/tracing/postgres/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/utils.d.ts +69 -0
- package/build/types/integrations/tracing/postgres/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{prisma.d.ts → prisma/index.d.ts} +2 -2
- package/build/types/integrations/tracing/prisma/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts +18 -0
- package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/constants.d.ts +5 -0
- package/build/types/integrations/tracing/prisma/vendored/constants.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/global.d.ts +5 -0
- package/build/types/integrations/tracing/prisma/vendored/global.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts +17 -0
- package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/types.d.ts +52 -0
- package/build/types/integrations/tracing/prisma/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/v5-tracing-helper.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/v6-tracing-helper.d.ts.map +1 -0
- package/build/types/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +2 -2
- package/build/types/integrations/tracing/tedious/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts +22 -0
- package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts +80 -0
- package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts +21 -0
- package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/tedious/vendored/types.d.ts +10 -0
- package/build/types/integrations/tracing/tedious/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/tedious/vendored/utils.d.ts +9 -0
- package/build/types/integrations/tracing/tedious/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/utils/sql-common.d.ts +3 -0
- package/build/types/integrations/tracing/utils/sql-common.d.ts.map +1 -0
- package/build/types-ts3.8/integrations/{fs.d.ts → fs/index.d.ts} +1 -1
- package/build/types-ts3.8/integrations/fs/vendored/constants.d.ts +5 -0
- package/build/types-ts3.8/integrations/fs/vendored/instrumentation.d.ts +15 -0
- package/build/types-ts3.8/integrations/fs/vendored/types.d.ts +29 -0
- package/build/types-ts3.8/integrations/fs/vendored/utils.d.ts +15 -0
- package/build/{types/integrations/tracing/amqplib.d.ts → types-ts3.8/integrations/tracing/amqplib/index.d.ts} +20 -20
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +44 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib.d.ts +26 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts +63 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv.d.ts +41 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/types.d.ts +130 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/utils.d.ts +35 -0
- package/build/types-ts3.8/integrations/tracing/{connect.d.ts → connect/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +13 -0
- package/build/types-ts3.8/integrations/tracing/connect/vendored/instrumentation.d.ts +18 -0
- package/build/types-ts3.8/integrations/tracing/connect/vendored/internal-types.d.ts +36 -0
- package/build/types-ts3.8/integrations/tracing/connect/vendored/utils.d.ts +5 -0
- package/build/types-ts3.8/integrations/tracing/{dataloader.d.ts → dataloader/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/dataloader/vendored/dataloader-types.d.ts +14 -0
- package/build/types-ts3.8/integrations/tracing/dataloader/vendored/instrumentation.d.ts +21 -0
- package/build/types-ts3.8/integrations/tracing/dataloader/vendored/types.d.ts +10 -0
- package/build/types-ts3.8/integrations/tracing/fastify/vendored/instrumentation.d.ts +27 -0
- package/build/{types/integrations/tracing/genericPool.d.ts → types-ts3.8/integrations/tracing/genericPool/index.d.ts} +20 -20
- package/build/types-ts3.8/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +5 -0
- package/build/types-ts3.8/integrations/tracing/genericPool/vendored/instrumentation.d.ts +10 -0
- package/build/types-ts3.8/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/enum.d.ts +38 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +12 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/graphql-types.d.ts +136 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/instrumentation.d.ts +20 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/internal-types.d.ts +63 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/symbols.d.ts +3 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/types.d.ts +71 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/utils.d.ts +17 -0
- package/build/types-ts3.8/integrations/tracing/hapi/index.d.ts +1 -1
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +6 -0
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/hapi-types.d.ts +70 -0
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/instrumentation.d.ts +72 -0
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/internal-types.d.ts +32 -0
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/semconv.d.ts +13 -0
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/utils.d.ts +19 -0
- package/build/types-ts3.8/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/instrumentation.d.ts +25 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/internal-types.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +111 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/propagator.d.ts +3 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/semconv.d.ts +131 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/types.d.ts +26 -0
- package/build/types-ts3.8/integrations/tracing/{knex.d.ts → knex/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/knex/vendored/constants.d.ts +3 -0
- package/build/types-ts3.8/integrations/tracing/knex/vendored/instrumentation.d.ts +14 -0
- package/build/types-ts3.8/integrations/tracing/knex/vendored/semconv.d.ts +38 -0
- package/build/types-ts3.8/integrations/tracing/knex/vendored/types.d.ts +8 -0
- package/build/types-ts3.8/integrations/tracing/knex/vendored/utils.d.ts +15 -0
- package/build/types-ts3.8/integrations/tracing/{koa.d.ts → koa/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +5 -0
- package/build/types-ts3.8/integrations/tracing/koa/vendored/instrumentation.d.ts +32 -0
- package/build/types-ts3.8/integrations/tracing/koa/vendored/internal-types.d.ts +34 -0
- package/build/types-ts3.8/integrations/tracing/koa/vendored/types.d.ts +50 -0
- package/build/types-ts3.8/integrations/tracing/koa/vendored/utils.d.ts +15 -0
- package/build/{types/integrations/tracing/lrumemoizer.d.ts → types-ts3.8/integrations/tracing/lrumemoizer/index.d.ts} +19 -19
- package/build/types-ts3.8/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
- package/build/types-ts3.8/integrations/tracing/{mongo.d.ts → mongo/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/instrumentation.d.ts +79 -0
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/internal-types.d.ts +121 -0
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/semconv.d.ts +107 -0
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/types.d.ts +51 -0
- package/build/{types/integrations/tracing/mongoose.d.ts → types-ts3.8/integrations/tracing/mongoose/index.d.ts} +20 -20
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +30 -0
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose.d.ts +24 -0
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/semconv.d.ts +71 -0
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/types.d.ts +36 -0
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/utils.d.ts +8 -0
- package/build/types-ts3.8/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/AttributeNames.d.ts +4 -0
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/instrumentation.d.ts +28 -0
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/mysql-types.d.ts +78 -0
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/semconv.d.ts +88 -0
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/types.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/utils.d.ts +25 -0
- package/build/types-ts3.8/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/instrumentation.d.ts +12 -0
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +39 -0
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/semconv.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/types.d.ts +18 -0
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/utils.d.ts +27 -0
- package/build/types-ts3.8/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +7 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +6 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/instrumentation.d.ts +20 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/internal-types.d.ts +35 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +20 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-types.d.ts +54 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/semconv.d.ts +112 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/types.d.ts +65 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/utils.d.ts +69 -0
- package/build/types-ts3.8/integrations/tracing/{prisma.d.ts → prisma/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts +18 -0
- package/build/types-ts3.8/integrations/tracing/prisma/vendored/constants.d.ts +5 -0
- package/build/types-ts3.8/integrations/tracing/prisma/vendored/global.d.ts +5 -0
- package/build/types-ts3.8/integrations/tracing/prisma/vendored/instrumentation.d.ts +17 -0
- package/build/types-ts3.8/integrations/tracing/prisma/vendored/types.d.ts +55 -0
- package/build/types-ts3.8/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/instrumentation.d.ts +22 -0
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/semconv.d.ts +80 -0
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/tedious-types.d.ts +21 -0
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/types.d.ts +10 -0
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/utils.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing/utils/sql-common.d.ts +3 -0
- package/package.json +4 -24
- package/build/cjs/integrations/fs.js +0 -142
- package/build/cjs/integrations/fs.js.map +0 -1
- package/build/cjs/integrations/tracing/amqplib.js +0 -47
- package/build/cjs/integrations/tracing/amqplib.js.map +0 -1
- package/build/cjs/integrations/tracing/connect.js +0 -110
- package/build/cjs/integrations/tracing/connect.js.map +0 -1
- package/build/cjs/integrations/tracing/dataloader.js +0 -72
- package/build/cjs/integrations/tracing/dataloader.js.map +0 -1
- package/build/cjs/integrations/tracing/genericPool.js +0 -59
- package/build/cjs/integrations/tracing/genericPool.js.map +0 -1
- package/build/cjs/integrations/tracing/graphql.js +0 -127
- package/build/cjs/integrations/tracing/graphql.js.map +0 -1
- package/build/cjs/integrations/tracing/kafka.js +0 -48
- package/build/cjs/integrations/tracing/kafka.js.map +0 -1
- package/build/cjs/integrations/tracing/knex.js +0 -57
- package/build/cjs/integrations/tracing/knex.js.map +0 -1
- package/build/cjs/integrations/tracing/koa.js +0 -138
- package/build/cjs/integrations/tracing/koa.js.map +0 -1
- package/build/cjs/integrations/tracing/lrumemoizer.js +0 -37
- package/build/cjs/integrations/tracing/lrumemoizer.js.map +0 -1
- package/build/cjs/integrations/tracing/mongo.js +0 -93
- package/build/cjs/integrations/tracing/mongo.js.map +0 -1
- package/build/cjs/integrations/tracing/mongoose.js +0 -46
- package/build/cjs/integrations/tracing/mongoose.js.map +0 -1
- package/build/cjs/integrations/tracing/mysql.js +0 -38
- package/build/cjs/integrations/tracing/mysql.js.map +0 -1
- package/build/cjs/integrations/tracing/mysql2.js +0 -46
- package/build/cjs/integrations/tracing/mysql2.js.map +0 -1
- package/build/cjs/integrations/tracing/postgres.js +0 -48
- package/build/cjs/integrations/tracing/postgres.js.map +0 -1
- package/build/cjs/integrations/tracing/prisma.js +0 -207
- package/build/cjs/integrations/tracing/prisma.js.map +0 -1
- package/build/cjs/integrations/tracing/tedious.js +0 -67
- package/build/cjs/integrations/tracing/tedious.js.map +0 -1
- package/build/esm/integrations/fs.js +0 -140
- package/build/esm/integrations/fs.js.map +0 -1
- package/build/esm/integrations/tracing/amqplib.js +0 -44
- package/build/esm/integrations/tracing/amqplib.js.map +0 -1
- package/build/esm/integrations/tracing/connect.js +0 -106
- package/build/esm/integrations/tracing/connect.js.map +0 -1
- package/build/esm/integrations/tracing/dataloader.js +0 -69
- package/build/esm/integrations/tracing/dataloader.js.map +0 -1
- package/build/esm/integrations/tracing/genericPool.js +0 -56
- package/build/esm/integrations/tracing/genericPool.js.map +0 -1
- package/build/esm/integrations/tracing/graphql.js +0 -124
- package/build/esm/integrations/tracing/graphql.js.map +0 -1
- package/build/esm/integrations/tracing/kafka.js +0 -45
- package/build/esm/integrations/tracing/kafka.js.map +0 -1
- package/build/esm/integrations/tracing/knex.js +0 -54
- package/build/esm/integrations/tracing/knex.js.map +0 -1
- package/build/esm/integrations/tracing/koa.js +0 -134
- package/build/esm/integrations/tracing/koa.js.map +0 -1
- package/build/esm/integrations/tracing/lrumemoizer.js +0 -34
- package/build/esm/integrations/tracing/lrumemoizer.js.map +0 -1
- package/build/esm/integrations/tracing/mongo.js +0 -89
- package/build/esm/integrations/tracing/mongo.js.map +0 -1
- package/build/esm/integrations/tracing/mongoose.js +0 -43
- package/build/esm/integrations/tracing/mongoose.js.map +0 -1
- package/build/esm/integrations/tracing/mysql.js +0 -35
- package/build/esm/integrations/tracing/mysql.js.map +0 -1
- package/build/esm/integrations/tracing/mysql2.js +0 -43
- package/build/esm/integrations/tracing/mysql2.js.map +0 -1
- package/build/esm/integrations/tracing/postgres.js +0 -45
- package/build/esm/integrations/tracing/postgres.js.map +0 -1
- package/build/esm/integrations/tracing/prisma.js +0 -204
- package/build/esm/integrations/tracing/prisma.js.map +0 -1
- package/build/esm/integrations/tracing/tedious.js +0 -64
- package/build/esm/integrations/tracing/tedious.js.map +0 -1
- package/build/types/integrations/fs.d.ts.map +0 -1
- package/build/types/integrations/tracing/amqplib.d.ts.map +0 -1
- package/build/types/integrations/tracing/connect.d.ts.map +0 -1
- package/build/types/integrations/tracing/dataloader.d.ts.map +0 -1
- package/build/types/integrations/tracing/genericPool.d.ts.map +0 -1
- package/build/types/integrations/tracing/graphql.d.ts.map +0 -1
- package/build/types/integrations/tracing/kafka.d.ts.map +0 -1
- package/build/types/integrations/tracing/knex.d.ts.map +0 -1
- package/build/types/integrations/tracing/koa.d.ts.map +0 -1
- package/build/types/integrations/tracing/lrumemoizer.d.ts.map +0 -1
- package/build/types/integrations/tracing/mongo.d.ts.map +0 -1
- package/build/types/integrations/tracing/mongoose.d.ts.map +0 -1
- package/build/types/integrations/tracing/mysql.d.ts.map +0 -1
- package/build/types/integrations/tracing/mysql2.d.ts.map +0 -1
- package/build/types/integrations/tracing/postgres.d.ts.map +0 -1
- package/build/types/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts.map +0 -1
- package/build/types/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts.map +0 -1
- package/build/types/integrations/tracing/prisma.d.ts.map +0 -1
- package/build/types/integrations/tracing/tedious.d.ts.map +0 -1
- /package/build/types/integrations/tracing/prisma/{vendor → vendored}/v5-tracing-helper.d.ts +0 -0
- /package/build/types/integrations/tracing/prisma/{vendor → vendored}/v6-tracing-helper.d.ts +0 -0
- /package/build/types-ts3.8/integrations/tracing/prisma/{vendor → vendored}/v5-tracing-helper.d.ts +0 -0
- /package/build/types-ts3.8/integrations/tracing/prisma/{vendor → vendored}/v6-tracing-helper.d.ts +0 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const instrumentation = require('./vendored/instrumentation.js');
|
|
4
|
+
const core = require('@sentry/core');
|
|
5
|
+
const nodeCore = require('@sentry/node-core');
|
|
6
|
+
|
|
7
|
+
const INTEGRATION_NAME = "Knex";
|
|
8
|
+
const instrumentKnex = nodeCore.generateInstrumentOnce(
|
|
9
|
+
INTEGRATION_NAME,
|
|
10
|
+
() => new instrumentation.KnexInstrumentation({ requireParentSpan: true })
|
|
11
|
+
);
|
|
12
|
+
const _knexIntegration = (() => {
|
|
13
|
+
let instrumentationWrappedCallback;
|
|
14
|
+
return {
|
|
15
|
+
name: INTEGRATION_NAME,
|
|
16
|
+
setupOnce() {
|
|
17
|
+
const instrumentation = instrumentKnex();
|
|
18
|
+
instrumentationWrappedCallback = nodeCore.instrumentWhenWrapped(instrumentation);
|
|
19
|
+
},
|
|
20
|
+
setup(client) {
|
|
21
|
+
instrumentationWrappedCallback?.(
|
|
22
|
+
() => client.on("spanStart", (span) => {
|
|
23
|
+
const { data } = core.spanToJSON(span);
|
|
24
|
+
if ("knex.version" in data) {
|
|
25
|
+
span.setAttribute(core.SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, "auto.db.otel.knex");
|
|
26
|
+
}
|
|
27
|
+
})
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
});
|
|
32
|
+
const knexIntegration = core.defineIntegration(_knexIntegration);
|
|
33
|
+
|
|
34
|
+
exports.instrumentKnex = instrumentKnex;
|
|
35
|
+
exports.knexIntegration = knexIntegration;
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/knex/index.ts"],"sourcesContent":["import { KnexInstrumentation } from './vendored/instrumentation';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, spanToJSON } from '@sentry/core';\nimport { generateInstrumentOnce, instrumentWhenWrapped } from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'Knex';\n\nexport const instrumentKnex = generateInstrumentOnce(\n INTEGRATION_NAME,\n () => new KnexInstrumentation({ requireParentSpan: true }),\n);\n\nconst _knexIntegration = (() => {\n let instrumentationWrappedCallback: undefined | ((callback: () => void) => void);\n\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n const instrumentation = instrumentKnex();\n instrumentationWrappedCallback = instrumentWhenWrapped(instrumentation);\n },\n\n setup(client) {\n instrumentationWrappedCallback?.(() =>\n client.on('spanStart', span => {\n const { data } = spanToJSON(span);\n // knex.version is always set in the span data\n // https://github.com/open-telemetry/opentelemetry-js-contrib/blob/0309caeafc44ac9cb13a3345b790b01b76d0497d/plugins/node/opentelemetry-instrumentation-knex/src/instrumentation.ts#L138\n if ('knex.version' in data) {\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, 'auto.db.otel.knex');\n }\n }),\n );\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Knex integration\n *\n * Capture tracing data for [Knex](https://knexjs.org/).\n *\n * @example\n * ```javascript\n * import * as Sentry from '@sentry/node';\n *\n * Sentry.init({\n * integrations: [Sentry.knexIntegration()],\n * });\n * ```\n */\nexport const knexIntegration = defineIntegration(_knexIntegration);\n"],"names":["generateInstrumentOnce","KnexInstrumentation","instrumentWhenWrapped","spanToJSON","SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,gBAAA,GAAmB,MAAA;AAElB,MAAM,cAAA,GAAiBA,+BAAA;AAAA,EAC5B,gBAAA;AAAA,EACA,MAAM,IAAIC,mCAAA,CAAoB,EAAE,iBAAA,EAAmB,MAAM;AAC3D;AAEA,MAAM,oBAAoB,MAAM;AAC9B,EAAA,IAAI,8BAAA;AAEJ,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,MAAM,kBAAkB,cAAA,EAAe;AACvC,MAAA,8BAAA,GAAiCC,+BAAsB,eAAe,CAAA;AAAA,IACxE,CAAA;AAAA,IAEA,MAAM,MAAA,EAAQ;AACZ,MAAA,8BAAA;AAAA,QAAiC,MAC/B,MAAA,CAAO,EAAA,CAAG,WAAA,EAAa,CAAA,IAAA,KAAQ;AAC7B,UAAA,MAAM,EAAE,IAAA,EAAK,GAAIC,eAAA,CAAW,IAAI,CAAA;AAGhC,UAAA,IAAI,kBAAkB,IAAA,EAAM;AAC1B,YAAA,IAAA,CAAK,YAAA,CAAaC,uCAAkC,mBAAmB,CAAA;AAAA,UACzE;AAAA,QACF,CAAC;AAAA,OACH;AAAA,IACF;AAAA,GACF;AACF,CAAA,CAAA;AAgBO,MAAM,eAAA,GAAkBC,uBAAkB,gBAAgB;;;;;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const MODULE_NAME = "knex";
|
|
4
|
+
const SUPPORTED_VERSIONS = [
|
|
5
|
+
// use "lib/execution" for runner.js, "lib" for client.js as basepath, latest tested 0.95.6
|
|
6
|
+
">=0.22.0 <4",
|
|
7
|
+
// use "lib" as basepath
|
|
8
|
+
">=0.10.0 <0.18.0",
|
|
9
|
+
">=0.19.0 <0.22.0",
|
|
10
|
+
// use "src" as basepath
|
|
11
|
+
">=0.18.0 <0.19.0"
|
|
12
|
+
];
|
|
13
|
+
|
|
14
|
+
exports.MODULE_NAME = MODULE_NAME;
|
|
15
|
+
exports.SUPPORTED_VERSIONS = SUPPORTED_VERSIONS;
|
|
16
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../../../src/integrations/tracing/knex/vendored/constants.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-knex\n * - Upstream version: @opentelemetry/instrumentation-knex@0.62.0\n */\n/* eslint-disable */\n\nexport const MODULE_NAME = 'knex';\nexport const SUPPORTED_VERSIONS = [\n // use \"lib/execution\" for runner.js, \"lib\" for client.js as basepath, latest tested 0.95.6\n '>=0.22.0 <4',\n // use \"lib\" as basepath\n '>=0.10.0 <0.18.0',\n '>=0.19.0 <0.22.0',\n // use \"src\" as basepath\n '>=0.18.0 <0.19.0',\n];\n"],"names":[],"mappings":";;AAqBO,MAAM,WAAA,GAAc;AACpB,MAAM,kBAAA,GAAqB;AAAA;AAAA,EAEhC,aAAA;AAAA;AAAA,EAEA,kBAAA;AAAA,EACA,kBAAA;AAAA;AAAA,EAEA;AACF;;;;;"}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const api = require('@opentelemetry/api');
|
|
4
|
+
const core = require('@sentry/core');
|
|
5
|
+
const constants = require('./constants.js');
|
|
6
|
+
const instrumentation = require('@opentelemetry/instrumentation');
|
|
7
|
+
const utils = require('./utils.js');
|
|
8
|
+
const semanticConventions = require('@opentelemetry/semantic-conventions');
|
|
9
|
+
const semconv = require('./semconv.js');
|
|
10
|
+
|
|
11
|
+
const PACKAGE_NAME = "@sentry/instrumentation-knex";
|
|
12
|
+
const contextSymbol = /* @__PURE__ */ Symbol("opentelemetry.instrumentation-knex.context");
|
|
13
|
+
const DEFAULT_CONFIG = {
|
|
14
|
+
maxQueryLength: 1022,
|
|
15
|
+
requireParentSpan: false
|
|
16
|
+
};
|
|
17
|
+
class KnexInstrumentation extends instrumentation.InstrumentationBase {
|
|
18
|
+
constructor(config = {}) {
|
|
19
|
+
super(PACKAGE_NAME, core.SDK_VERSION, { ...DEFAULT_CONFIG, ...config });
|
|
20
|
+
this._semconvStability = instrumentation.semconvStabilityFromStr("database", process.env.OTEL_SEMCONV_STABILITY_OPT_IN);
|
|
21
|
+
}
|
|
22
|
+
setConfig(config = {}) {
|
|
23
|
+
super.setConfig({ ...DEFAULT_CONFIG, ...config });
|
|
24
|
+
}
|
|
25
|
+
init() {
|
|
26
|
+
const module = new instrumentation.InstrumentationNodeModuleDefinition(constants.MODULE_NAME, constants.SUPPORTED_VERSIONS);
|
|
27
|
+
module.files.push(
|
|
28
|
+
this.getClientNodeModuleFileInstrumentation("src"),
|
|
29
|
+
this.getClientNodeModuleFileInstrumentation("lib"),
|
|
30
|
+
this.getRunnerNodeModuleFileInstrumentation("src"),
|
|
31
|
+
this.getRunnerNodeModuleFileInstrumentation("lib"),
|
|
32
|
+
this.getRunnerNodeModuleFileInstrumentation("lib/execution")
|
|
33
|
+
);
|
|
34
|
+
return module;
|
|
35
|
+
}
|
|
36
|
+
getRunnerNodeModuleFileInstrumentation(basePath) {
|
|
37
|
+
return new instrumentation.InstrumentationNodeModuleFile(
|
|
38
|
+
`knex/${basePath}/runner.js`,
|
|
39
|
+
constants.SUPPORTED_VERSIONS,
|
|
40
|
+
(Runner, moduleVersion) => {
|
|
41
|
+
this.ensureWrapped(Runner.prototype, "query", this.createQueryWrapper(moduleVersion));
|
|
42
|
+
return Runner;
|
|
43
|
+
},
|
|
44
|
+
(Runner, _moduleVersion) => {
|
|
45
|
+
this._unwrap(Runner.prototype, "query");
|
|
46
|
+
return Runner;
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
getClientNodeModuleFileInstrumentation(basePath) {
|
|
51
|
+
return new instrumentation.InstrumentationNodeModuleFile(
|
|
52
|
+
`knex/${basePath}/client.js`,
|
|
53
|
+
constants.SUPPORTED_VERSIONS,
|
|
54
|
+
(Client) => {
|
|
55
|
+
this.ensureWrapped(Client.prototype, "queryBuilder", this.storeContext.bind(this));
|
|
56
|
+
this.ensureWrapped(Client.prototype, "schemaBuilder", this.storeContext.bind(this));
|
|
57
|
+
this.ensureWrapped(Client.prototype, "raw", this.storeContext.bind(this));
|
|
58
|
+
return Client;
|
|
59
|
+
},
|
|
60
|
+
(Client) => {
|
|
61
|
+
this._unwrap(Client.prototype, "queryBuilder");
|
|
62
|
+
this._unwrap(Client.prototype, "schemaBuilder");
|
|
63
|
+
this._unwrap(Client.prototype, "raw");
|
|
64
|
+
return Client;
|
|
65
|
+
}
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
createQueryWrapper(moduleVersion) {
|
|
69
|
+
const instrumentation$1 = this;
|
|
70
|
+
return function wrapQuery(original) {
|
|
71
|
+
return function wrapped_logging_method(query) {
|
|
72
|
+
const config = this.client.config;
|
|
73
|
+
const table = utils.extractTableName(this.builder);
|
|
74
|
+
const operation = query?.method;
|
|
75
|
+
const connectionString = config?.connection?.connectionString;
|
|
76
|
+
const name = config?.connection?.filename || config?.connection?.database || utils.extractDatabaseFromConnectionString(connectionString);
|
|
77
|
+
const { maxQueryLength } = instrumentation$1.getConfig();
|
|
78
|
+
const attributes = {
|
|
79
|
+
"knex.version": moduleVersion
|
|
80
|
+
};
|
|
81
|
+
const transport = config?.connection?.filename === ":memory:" ? "inproc" : void 0;
|
|
82
|
+
if (instrumentation$1._semconvStability & instrumentation.SemconvStability.OLD) {
|
|
83
|
+
Object.assign(attributes, {
|
|
84
|
+
[semconv.ATTR_DB_SYSTEM]: utils.mapSystem(this.client.driverName),
|
|
85
|
+
[semconv.ATTR_DB_SQL_TABLE]: table,
|
|
86
|
+
[semconv.ATTR_DB_OPERATION]: operation,
|
|
87
|
+
[semconv.ATTR_DB_USER]: config?.connection?.user,
|
|
88
|
+
[semconv.ATTR_DB_NAME]: name,
|
|
89
|
+
[semconv.ATTR_NET_PEER_NAME]: config?.connection?.host ?? utils.extractHostFromConnectionString(connectionString),
|
|
90
|
+
[semconv.ATTR_NET_PEER_PORT]: config?.connection?.port ?? utils.extractPortFromConnectionString(connectionString),
|
|
91
|
+
[semconv.ATTR_NET_TRANSPORT]: transport
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
if (instrumentation$1._semconvStability & instrumentation.SemconvStability.STABLE) {
|
|
95
|
+
Object.assign(attributes, {
|
|
96
|
+
[semanticConventions.ATTR_DB_SYSTEM_NAME]: utils.mapSystem(this.client.driverName),
|
|
97
|
+
[semanticConventions.ATTR_DB_COLLECTION_NAME]: table,
|
|
98
|
+
[semanticConventions.ATTR_DB_OPERATION_NAME]: operation,
|
|
99
|
+
[semanticConventions.ATTR_DB_NAMESPACE]: name,
|
|
100
|
+
[semanticConventions.ATTR_SERVER_ADDRESS]: config?.connection?.host ?? utils.extractHostFromConnectionString(connectionString),
|
|
101
|
+
[semanticConventions.ATTR_SERVER_PORT]: config?.connection?.port ?? utils.extractPortFromConnectionString(connectionString)
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
if (maxQueryLength) {
|
|
105
|
+
const queryText = utils.limitLength(query?.sql, maxQueryLength);
|
|
106
|
+
if (instrumentation$1._semconvStability & instrumentation.SemconvStability.STABLE) {
|
|
107
|
+
attributes[semanticConventions.ATTR_DB_QUERY_TEXT] = queryText;
|
|
108
|
+
}
|
|
109
|
+
if (instrumentation$1._semconvStability & instrumentation.SemconvStability.OLD) {
|
|
110
|
+
attributes[semconv.ATTR_DB_STATEMENT] = queryText;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
const parentContext = this.builder[contextSymbol] || api.context.active();
|
|
114
|
+
const parentSpan = api.trace.getSpan(parentContext);
|
|
115
|
+
const hasActiveParent = parentSpan && api.trace.isSpanContextValid(parentSpan.spanContext());
|
|
116
|
+
if (instrumentation$1._config.requireParentSpan && !hasActiveParent) {
|
|
117
|
+
return original.bind(this)(...arguments);
|
|
118
|
+
}
|
|
119
|
+
const span = instrumentation$1.tracer.startSpan(
|
|
120
|
+
utils.getName(name, operation, table),
|
|
121
|
+
{
|
|
122
|
+
kind: api.SpanKind.CLIENT,
|
|
123
|
+
attributes
|
|
124
|
+
},
|
|
125
|
+
parentContext
|
|
126
|
+
);
|
|
127
|
+
const spanContext = api.trace.setSpan(api.context.active(), span);
|
|
128
|
+
return api.context.with(spanContext, original, this, ...arguments).then((result) => {
|
|
129
|
+
span.end();
|
|
130
|
+
return result;
|
|
131
|
+
}).catch((err) => {
|
|
132
|
+
const formatter = utils.getFormatter(this);
|
|
133
|
+
const fullQuery = formatter(query.sql, query.bindings || []);
|
|
134
|
+
const message = err.message.replace(fullQuery + " - ", "");
|
|
135
|
+
const exc = utils.otelExceptionFromKnexError(err, message);
|
|
136
|
+
span.recordException(exc);
|
|
137
|
+
span.setStatus({ code: api.SpanStatusCode.ERROR, message });
|
|
138
|
+
span.end();
|
|
139
|
+
throw err;
|
|
140
|
+
});
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
storeContext(original) {
|
|
145
|
+
return function wrapped_logging_method() {
|
|
146
|
+
const builder = original.apply(this, arguments);
|
|
147
|
+
Object.defineProperty(builder, contextSymbol, {
|
|
148
|
+
value: api.context.active()
|
|
149
|
+
});
|
|
150
|
+
return builder;
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
ensureWrapped(obj, methodName, wrapper) {
|
|
154
|
+
if (instrumentation.isWrapped(obj[methodName])) {
|
|
155
|
+
this._unwrap(obj, methodName);
|
|
156
|
+
}
|
|
157
|
+
this._wrap(obj, methodName, wrapper);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
exports.KnexInstrumentation = KnexInstrumentation;
|
|
162
|
+
//# sourceMappingURL=instrumentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentation.js","sources":["../../../../../../src/integrations/tracing/knex/vendored/instrumentation.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-knex\n * - Upstream version: @opentelemetry/instrumentation-knex@0.62.0\n * - Minor TypeScript strictness adjustments for this repository's compiler settings\n */\n/* eslint-disable */\n\nimport * as api from '@opentelemetry/api';\nimport { SDK_VERSION } from '@sentry/core';\nimport * as constants from './constants';\nimport {\n InstrumentationBase,\n InstrumentationNodeModuleDefinition,\n InstrumentationNodeModuleFile,\n isWrapped,\n SemconvStability,\n semconvStabilityFromStr,\n} from '@opentelemetry/instrumentation';\nimport * as utils from './utils';\nimport { KnexInstrumentationConfig } from './types';\nimport {\n ATTR_DB_COLLECTION_NAME,\n ATTR_DB_NAMESPACE,\n ATTR_DB_OPERATION_NAME,\n ATTR_DB_QUERY_TEXT,\n ATTR_DB_SYSTEM_NAME,\n ATTR_SERVER_ADDRESS,\n ATTR_SERVER_PORT,\n} from '@opentelemetry/semantic-conventions';\nimport {\n ATTR_DB_NAME,\n ATTR_DB_OPERATION,\n ATTR_DB_SQL_TABLE,\n ATTR_DB_STATEMENT,\n ATTR_DB_SYSTEM,\n ATTR_DB_USER,\n ATTR_NET_PEER_NAME,\n ATTR_NET_PEER_PORT,\n ATTR_NET_TRANSPORT,\n} from './semconv';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-knex';\n\nconst contextSymbol = Symbol('opentelemetry.instrumentation-knex.context');\nconst DEFAULT_CONFIG: KnexInstrumentationConfig = {\n maxQueryLength: 1022,\n requireParentSpan: false,\n};\n\nexport class KnexInstrumentation extends InstrumentationBase<KnexInstrumentationConfig> {\n private _semconvStability: SemconvStability;\n\n constructor(config: KnexInstrumentationConfig = {}) {\n super(PACKAGE_NAME, SDK_VERSION, { ...DEFAULT_CONFIG, ...config });\n\n this._semconvStability = semconvStabilityFromStr('database', process.env.OTEL_SEMCONV_STABILITY_OPT_IN);\n }\n\n override setConfig(config: KnexInstrumentationConfig = {}) {\n super.setConfig({ ...DEFAULT_CONFIG, ...config });\n }\n\n init() {\n const module = new InstrumentationNodeModuleDefinition(constants.MODULE_NAME, constants.SUPPORTED_VERSIONS);\n\n module.files.push(\n this.getClientNodeModuleFileInstrumentation('src'),\n this.getClientNodeModuleFileInstrumentation('lib'),\n this.getRunnerNodeModuleFileInstrumentation('src'),\n this.getRunnerNodeModuleFileInstrumentation('lib'),\n this.getRunnerNodeModuleFileInstrumentation('lib/execution'),\n );\n\n return module;\n }\n\n private getRunnerNodeModuleFileInstrumentation(basePath: string) {\n return new InstrumentationNodeModuleFile(\n `knex/${basePath}/runner.js`,\n constants.SUPPORTED_VERSIONS,\n (Runner: any, moduleVersion?: string) => {\n this.ensureWrapped(Runner.prototype, 'query', this.createQueryWrapper(moduleVersion));\n return Runner;\n },\n (Runner: any, _moduleVersion?: string) => {\n this._unwrap(Runner.prototype, 'query');\n return Runner;\n },\n );\n }\n\n private getClientNodeModuleFileInstrumentation(basePath: string) {\n return new InstrumentationNodeModuleFile(\n `knex/${basePath}/client.js`,\n constants.SUPPORTED_VERSIONS,\n (Client: any) => {\n this.ensureWrapped(Client.prototype, 'queryBuilder', this.storeContext.bind(this));\n this.ensureWrapped(Client.prototype, 'schemaBuilder', this.storeContext.bind(this));\n this.ensureWrapped(Client.prototype, 'raw', this.storeContext.bind(this));\n return Client;\n },\n (Client: any) => {\n this._unwrap(Client.prototype, 'queryBuilder');\n this._unwrap(Client.prototype, 'schemaBuilder');\n this._unwrap(Client.prototype, 'raw');\n return Client;\n },\n );\n }\n\n private createQueryWrapper(moduleVersion?: string) {\n const instrumentation = this;\n\n return function wrapQuery(original: (...args: any[]) => any) {\n return function wrapped_logging_method(this: any, query: any) {\n const config = this.client.config;\n\n const table = utils.extractTableName(this.builder);\n const operation = query?.method;\n const connectionString = config?.connection?.connectionString;\n const name =\n config?.connection?.filename ||\n config?.connection?.database ||\n utils.extractDatabaseFromConnectionString(connectionString);\n const { maxQueryLength } = instrumentation.getConfig();\n\n const attributes: api.Attributes = {\n 'knex.version': moduleVersion,\n };\n const transport = config?.connection?.filename === ':memory:' ? 'inproc' : undefined;\n\n if (instrumentation._semconvStability & SemconvStability.OLD) {\n Object.assign(attributes, {\n [ATTR_DB_SYSTEM]: utils.mapSystem(this.client.driverName),\n [ATTR_DB_SQL_TABLE]: table,\n [ATTR_DB_OPERATION]: operation,\n [ATTR_DB_USER]: config?.connection?.user,\n [ATTR_DB_NAME]: name,\n [ATTR_NET_PEER_NAME]: config?.connection?.host ?? utils.extractHostFromConnectionString(connectionString),\n [ATTR_NET_PEER_PORT]: config?.connection?.port ?? utils.extractPortFromConnectionString(connectionString),\n [ATTR_NET_TRANSPORT]: transport,\n });\n }\n if (instrumentation._semconvStability & SemconvStability.STABLE) {\n Object.assign(attributes, {\n [ATTR_DB_SYSTEM_NAME]: utils.mapSystem(this.client.driverName),\n [ATTR_DB_COLLECTION_NAME]: table,\n [ATTR_DB_OPERATION_NAME]: operation,\n [ATTR_DB_NAMESPACE]: name,\n [ATTR_SERVER_ADDRESS]: config?.connection?.host ?? utils.extractHostFromConnectionString(connectionString),\n [ATTR_SERVER_PORT]: config?.connection?.port ?? utils.extractPortFromConnectionString(connectionString),\n });\n }\n if (maxQueryLength) {\n const queryText = utils.limitLength(query?.sql, maxQueryLength);\n if (instrumentation._semconvStability & SemconvStability.STABLE) {\n attributes[ATTR_DB_QUERY_TEXT] = queryText;\n }\n if (instrumentation._semconvStability & SemconvStability.OLD) {\n attributes[ATTR_DB_STATEMENT] = queryText;\n }\n }\n\n const parentContext = this.builder[contextSymbol] || api.context.active();\n const parentSpan = api.trace.getSpan(parentContext);\n const hasActiveParent = parentSpan && api.trace.isSpanContextValid(parentSpan.spanContext());\n if (instrumentation._config.requireParentSpan && !hasActiveParent) {\n return original.bind(this)(...arguments);\n }\n\n const span = instrumentation.tracer.startSpan(\n utils.getName(name, operation, table),\n {\n kind: api.SpanKind.CLIENT,\n attributes,\n },\n parentContext,\n );\n const spanContext = api.trace.setSpan(api.context.active(), span);\n\n return api.context\n .with(spanContext, original, this, ...arguments)\n .then((result: unknown) => {\n span.end();\n return result;\n })\n .catch((err: any) => {\n const formatter = utils.getFormatter(this);\n const fullQuery = formatter(query.sql, query.bindings || []);\n const message = err.message.replace(fullQuery + ' - ', '');\n const exc = utils.otelExceptionFromKnexError(err, message);\n span.recordException(exc);\n span.setStatus({ code: api.SpanStatusCode.ERROR, message });\n span.end();\n throw err;\n });\n };\n };\n }\n\n private storeContext(original: Function) {\n return function wrapped_logging_method(this: any) {\n const builder = original.apply(this, arguments);\n Object.defineProperty(builder, contextSymbol, {\n value: api.context.active(),\n });\n return builder;\n };\n }\n\n ensureWrapped(obj: any, methodName: string, wrapper: (original: any) => any) {\n if (isWrapped(obj[methodName])) {\n this._unwrap(obj, methodName);\n }\n this._wrap(obj, methodName, wrapper);\n }\n}\n"],"names":["InstrumentationBase","SDK_VERSION","semconvStabilityFromStr","InstrumentationNodeModuleDefinition","constants.MODULE_NAME","constants.SUPPORTED_VERSIONS","InstrumentationNodeModuleFile","instrumentation","utils.extractTableName","utils.extractDatabaseFromConnectionString","SemconvStability","ATTR_DB_SYSTEM","utils.mapSystem","ATTR_DB_SQL_TABLE","ATTR_DB_OPERATION","ATTR_DB_USER","ATTR_DB_NAME","ATTR_NET_PEER_NAME","utils.extractHostFromConnectionString","ATTR_NET_PEER_PORT","utils.extractPortFromConnectionString","ATTR_NET_TRANSPORT","ATTR_DB_SYSTEM_NAME","ATTR_DB_COLLECTION_NAME","ATTR_DB_OPERATION_NAME","ATTR_DB_NAMESPACE","ATTR_SERVER_ADDRESS","ATTR_SERVER_PORT","utils.limitLength","ATTR_DB_QUERY_TEXT","ATTR_DB_STATEMENT","utils.getName","utils.getFormatter","utils.otelExceptionFromKnexError","isWrapped"],"mappings":";;;;;;;;;;AAwDA,MAAM,YAAA,GAAe,8BAAA;AAErB,MAAM,aAAA,0BAAuB,4CAA4C,CAAA;AACzE,MAAM,cAAA,GAA4C;AAAA,EAChD,cAAA,EAAgB,IAAA;AAAA,EAChB,iBAAA,EAAmB;AACrB,CAAA;AAEO,MAAM,4BAA4BA,mCAAA,CAA+C;AAAA,EAGtF,WAAA,CAAY,MAAA,GAAoC,EAAC,EAAG;AAClD,IAAA,KAAA,CAAM,cAAcC,gBAAA,EAAa,EAAE,GAAG,cAAA,EAAgB,GAAG,QAAQ,CAAA;AAEjE,IAAA,IAAA,CAAK,iBAAA,GAAoBC,uCAAA,CAAwB,UAAA,EAAY,OAAA,CAAQ,IAAI,6BAA6B,CAAA;AAAA,EACxG;AAAA,EAES,SAAA,CAAU,MAAA,GAAoC,EAAC,EAAG;AACzD,IAAA,KAAA,CAAM,UAAU,EAAE,GAAG,cAAA,EAAgB,GAAG,QAAQ,CAAA;AAAA,EAClD;AAAA,EAEA,IAAA,GAAO;AACL,IAAA,MAAM,SAAS,IAAIC,mDAAA,CAAoCC,qBAAU,EAAaC,4BAA4B,CAAA;AAE1G,IAAA,MAAA,CAAO,KAAA,CAAM,IAAA;AAAA,MACX,IAAA,CAAK,uCAAuC,KAAK,CAAA;AAAA,MACjD,IAAA,CAAK,uCAAuC,KAAK,CAAA;AAAA,MACjD,IAAA,CAAK,uCAAuC,KAAK,CAAA;AAAA,MACjD,IAAA,CAAK,uCAAuC,KAAK,CAAA;AAAA,MACjD,IAAA,CAAK,uCAAuC,eAAe;AAAA,KAC7D;AAEA,IAAA,OAAO,MAAA;AAAA,EACT;AAAA,EA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AAK,OAAO,CAAA;AACzD,UAAA,IAAA,CAAK,gBAAgB,GAAG,CAAA;AACxB,UAAA,IAAA,CAAK,UAAU,EAAE,IAAA,EAAM,IAAI,cAAA,CAAe,KAAA,EAAO,SAAS,CAAA;AAC1D,UAAA,IAAA,CAAK,GAAA,EAAI;AACT,UAAA,MAAM,GAAA;AAAA,QACR,CAAC,CAAA;AAAA,MACL,CAAA;AAAA,IACF,CAAA;AAAA,EACF;AAAA,EAEQ,aAAa,QAAA,EAAoB;AACvC,IAAA,OAAO,SAAS,sBAAA,GAAkC;AAChD,MAAA,MAAM,OAAA,GAAU,QAAA,CAAS,KAAA,CAAM,IAAA,EAAM,SAAS,CAAA;AAC9C,MAAA,MAAA,CAAO,cAAA,CAAe,SAAS,aAAA,EAAe;AAAA,QAC5C,KAAA,EAAO,GAAA,CAAI,OAAA,CAAQ,MAAA;AAAO,OAC3B,CAAA;AACD,MAAA,OAAO,OAAA;AAAA,IACT,CAAA;AAAA,EACF;AAAA,EAEA,aAAA,CAAc,GAAA,EAAU,UAAA,EAAoB,OAAA,EAAiC;AAC3E,IAAA,IAAIC,yBAAA,CAAU,GAAA,CAAI,UAAU,CAAC,CAAA,EAAG;AAC9B,MAAA,IAAA,CAAK,OAAA,CAAQ,KAAK,UAAU,CAAA;AAAA,IAC9B;AACA,IAAA,IAAA,CAAK,KAAA,CAAM,GAAA,EAAK,UAAA,EAAY,OAAO,CAAA;AAAA,EACrC;AACF;;;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const ATTR_DB_NAME = "db.name";
|
|
4
|
+
const ATTR_DB_OPERATION = "db.operation";
|
|
5
|
+
const ATTR_DB_SQL_TABLE = "db.sql.table";
|
|
6
|
+
const ATTR_DB_STATEMENT = "db.statement";
|
|
7
|
+
const ATTR_DB_SYSTEM = "db.system";
|
|
8
|
+
const ATTR_DB_USER = "db.user";
|
|
9
|
+
const ATTR_NET_PEER_NAME = "net.peer.name";
|
|
10
|
+
const ATTR_NET_PEER_PORT = "net.peer.port";
|
|
11
|
+
const ATTR_NET_TRANSPORT = "net.transport";
|
|
12
|
+
const DB_SYSTEM_NAME_VALUE_SQLITE = "sqlite";
|
|
13
|
+
|
|
14
|
+
exports.ATTR_DB_NAME = ATTR_DB_NAME;
|
|
15
|
+
exports.ATTR_DB_OPERATION = ATTR_DB_OPERATION;
|
|
16
|
+
exports.ATTR_DB_SQL_TABLE = ATTR_DB_SQL_TABLE;
|
|
17
|
+
exports.ATTR_DB_STATEMENT = ATTR_DB_STATEMENT;
|
|
18
|
+
exports.ATTR_DB_SYSTEM = ATTR_DB_SYSTEM;
|
|
19
|
+
exports.ATTR_DB_USER = ATTR_DB_USER;
|
|
20
|
+
exports.ATTR_NET_PEER_NAME = ATTR_NET_PEER_NAME;
|
|
21
|
+
exports.ATTR_NET_PEER_PORT = ATTR_NET_PEER_PORT;
|
|
22
|
+
exports.ATTR_NET_TRANSPORT = ATTR_NET_TRANSPORT;
|
|
23
|
+
exports.DB_SYSTEM_NAME_VALUE_SQLITE = DB_SYSTEM_NAME_VALUE_SQLITE;
|
|
24
|
+
//# sourceMappingURL=semconv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semconv.js","sources":["../../../../../../src/integrations/tracing/knex/vendored/semconv.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-knex\n * - Upstream version: @opentelemetry/instrumentation-knex@0.62.0\n */\n/* eslint-disable */\n\n/**\n * @deprecated Replaced by `db.namespace`.\n */\nexport const ATTR_DB_NAME = 'db.name' as const;\n\n/**\n * @deprecated Replaced by `db.operation.name`.\n */\nexport const ATTR_DB_OPERATION = 'db.operation' as const;\n\n/**\n * @deprecated Replaced by `db.collection.name`.\n */\nexport const ATTR_DB_SQL_TABLE = 'db.sql.table' as const;\n\n/**\n * @deprecated Replaced by `db.query.text`.\n */\nexport const ATTR_DB_STATEMENT = 'db.statement' as const;\n\n/**\n * @deprecated Replaced by `db.system.name`.\n */\nexport const ATTR_DB_SYSTEM = 'db.system' as const;\n\n/**\n * @deprecated Removed, no replacement at this time.\n */\nexport const ATTR_DB_USER = 'db.user' as const;\n\n/**\n * @deprecated Replaced by `server.address` on client spans and `client.address` on server spans.\n */\nexport const ATTR_NET_PEER_NAME = 'net.peer.name' as const;\n\n/**\n * @deprecated Replaced by `server.port` on client spans and `client.port` on server spans.\n */\nexport const ATTR_NET_PEER_PORT = 'net.peer.port' as const;\n\n/**\n * @deprecated Replaced by `network.transport`.\n */\nexport const ATTR_NET_TRANSPORT = 'net.transport' as const;\n\nexport const DB_SYSTEM_NAME_VALUE_SQLITE = 'sqlite' as const;\n"],"names":[],"mappings":";;AAwBO,MAAM,YAAA,GAAe;AAKrB,MAAM,iBAAA,GAAoB;AAK1B,MAAM,iBAAA,GAAoB;AAK1B,MAAM,iBAAA,GAAoB;AAK1B,MAAM,cAAA,GAAiB;AAKvB,MAAM,YAAA,GAAe;AAKrB,MAAM,kBAAA,GAAqB;AAK3B,MAAM,kBAAA,GAAqB;AAK3B,MAAM,kBAAA,GAAqB;AAE3B,MAAM,2BAAA,GAA8B;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const semanticConventions = require('@opentelemetry/semantic-conventions');
|
|
4
|
+
const semconv = require('./semconv.js');
|
|
5
|
+
|
|
6
|
+
const getFormatter = (runner) => {
|
|
7
|
+
if (runner) {
|
|
8
|
+
if (runner.client) {
|
|
9
|
+
if (runner.client._formatQuery) {
|
|
10
|
+
return runner.client._formatQuery.bind(runner.client);
|
|
11
|
+
} else if (runner.client.SqlString) {
|
|
12
|
+
return runner.client.SqlString.format.bind(runner.client.SqlString);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
if (runner.builder) {
|
|
16
|
+
return runner.builder.toString.bind(runner.builder);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return () => "<noop formatter>";
|
|
20
|
+
};
|
|
21
|
+
function otelExceptionFromKnexError(err, message) {
|
|
22
|
+
if (!(err && err instanceof Error)) {
|
|
23
|
+
return err;
|
|
24
|
+
}
|
|
25
|
+
return {
|
|
26
|
+
message,
|
|
27
|
+
code: err.code,
|
|
28
|
+
stack: err.stack,
|
|
29
|
+
name: err.name
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
const systemMap = /* @__PURE__ */ new Map([
|
|
33
|
+
["sqlite3", semconv.DB_SYSTEM_NAME_VALUE_SQLITE],
|
|
34
|
+
["pg", semanticConventions.DB_SYSTEM_NAME_VALUE_POSTGRESQL]
|
|
35
|
+
]);
|
|
36
|
+
const mapSystem = (knexSystem) => {
|
|
37
|
+
return systemMap.get(knexSystem) || knexSystem;
|
|
38
|
+
};
|
|
39
|
+
const getName = (db, operation, table) => {
|
|
40
|
+
if (operation) {
|
|
41
|
+
if (table) {
|
|
42
|
+
return `${operation} ${db}.${table}`;
|
|
43
|
+
}
|
|
44
|
+
return `${operation} ${db}`;
|
|
45
|
+
}
|
|
46
|
+
return db;
|
|
47
|
+
};
|
|
48
|
+
const limitLength = (str, maxLength) => {
|
|
49
|
+
if (typeof str === "string" && typeof maxLength === "number" && 0 < maxLength && maxLength < str.length) {
|
|
50
|
+
return str.substring(0, maxLength) + "..";
|
|
51
|
+
}
|
|
52
|
+
return str;
|
|
53
|
+
};
|
|
54
|
+
const extractDatabaseFromConnectionString = (connectionString) => {
|
|
55
|
+
if (!connectionString) return void 0;
|
|
56
|
+
try {
|
|
57
|
+
const db = new URL(connectionString).pathname?.replace(/^\//, "");
|
|
58
|
+
return db || void 0;
|
|
59
|
+
} catch {
|
|
60
|
+
return void 0;
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const extractHostFromConnectionString = (connectionString) => {
|
|
64
|
+
if (!connectionString) return void 0;
|
|
65
|
+
try {
|
|
66
|
+
return new URL(connectionString).hostname || void 0;
|
|
67
|
+
} catch {
|
|
68
|
+
return void 0;
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
const extractPortFromConnectionString = (connectionString) => {
|
|
72
|
+
if (!connectionString) return void 0;
|
|
73
|
+
try {
|
|
74
|
+
const port = new URL(connectionString).port;
|
|
75
|
+
return port ? parseInt(port, 10) : void 0;
|
|
76
|
+
} catch {
|
|
77
|
+
return void 0;
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const extractTableName = (builder) => {
|
|
81
|
+
const table = builder?._single?.table;
|
|
82
|
+
if (typeof table === "object") {
|
|
83
|
+
return extractTableName(table);
|
|
84
|
+
}
|
|
85
|
+
return table;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
exports.extractDatabaseFromConnectionString = extractDatabaseFromConnectionString;
|
|
89
|
+
exports.extractHostFromConnectionString = extractHostFromConnectionString;
|
|
90
|
+
exports.extractPortFromConnectionString = extractPortFromConnectionString;
|
|
91
|
+
exports.extractTableName = extractTableName;
|
|
92
|
+
exports.getFormatter = getFormatter;
|
|
93
|
+
exports.getName = getName;
|
|
94
|
+
exports.limitLength = limitLength;
|
|
95
|
+
exports.mapSystem = mapSystem;
|
|
96
|
+
exports.otelExceptionFromKnexError = otelExceptionFromKnexError;
|
|
97
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../src/integrations/tracing/knex/vendored/utils.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-knex\n * - Upstream version: @opentelemetry/instrumentation-knex@0.62.0\n */\n/* eslint-disable */\n\nimport { Exception } from '@opentelemetry/api';\nimport { DB_SYSTEM_NAME_VALUE_POSTGRESQL } from '@opentelemetry/semantic-conventions';\nimport { DB_SYSTEM_NAME_VALUE_SQLITE } from './semconv';\n\ntype KnexError = Error & {\n code?: string;\n};\n\nexport const getFormatter = (runner: any) => {\n if (runner) {\n if (runner.client) {\n if (runner.client._formatQuery) {\n return runner.client._formatQuery.bind(runner.client);\n } else if (runner.client.SqlString) {\n return runner.client.SqlString.format.bind(runner.client.SqlString);\n }\n }\n if (runner.builder) {\n return runner.builder.toString.bind(runner.builder);\n }\n }\n return () => '<noop formatter>';\n};\n\nexport function otelExceptionFromKnexError(err: KnexError, message: string): Exception {\n if (!(err && err instanceof Error)) {\n return err;\n }\n\n return {\n message,\n code: err.code,\n stack: err.stack,\n name: err.name,\n };\n}\n\nconst systemMap = new Map([\n ['sqlite3', DB_SYSTEM_NAME_VALUE_SQLITE],\n ['pg', DB_SYSTEM_NAME_VALUE_POSTGRESQL],\n]);\n\nexport const mapSystem = (knexSystem: string) => {\n return systemMap.get(knexSystem) || knexSystem;\n};\n\nexport const getName = (db: string, operation?: string, table?: string) => {\n if (operation) {\n if (table) {\n return `${operation} ${db}.${table}`;\n }\n return `${operation} ${db}`;\n }\n return db;\n};\n\nexport const limitLength = (str: string, maxLength: number) => {\n if (typeof str === 'string' && typeof maxLength === 'number' && 0 < maxLength && maxLength < str.length) {\n return str.substring(0, maxLength) + '..';\n }\n return str;\n};\n\nexport const extractDatabaseFromConnectionString = (connectionString?: string): string | undefined => {\n if (!connectionString) return undefined;\n try {\n const db = new URL(connectionString).pathname?.replace(/^\\//, '');\n return db || undefined;\n } catch {\n return undefined;\n }\n};\n\nexport const extractHostFromConnectionString = (connectionString?: string): string | undefined => {\n if (!connectionString) return undefined;\n try {\n return new URL(connectionString).hostname || undefined;\n } catch {\n return undefined;\n }\n};\n\nexport const extractPortFromConnectionString = (connectionString?: string): number | undefined => {\n if (!connectionString) return undefined;\n try {\n const port = new URL(connectionString).port;\n return port ? parseInt(port, 10) : undefined;\n } catch {\n return undefined;\n }\n};\n\nexport const extractTableName = (builder: any): string => {\n const table = builder?._single?.table;\n if (typeof table === 'object') {\n return extractTableName(table);\n }\n return table;\n};\n"],"names":["DB_SYSTEM_NAME_VALUE_SQLITE","DB_SYSTEM_NAME_VALUE_POSTGRESQL"],"mappings":";;;;;AA6BO,MAAM,YAAA,GAAe,CAAC,MAAA,KAAgB;AAC3C,EAAA,IAAI,MAAA,EAAQ;AACV,IAAA,IAAI,OAAO,MAAA,EAAQ;AACjB,MAAA,IAAI,MAAA,CAAO,OAAO,YAAA,EAAc;AAC9B,QAAA,OAAO,MAAA,CAAO,MAAA,CAAO,YAAA,CAAa,IAAA,CAAK,OAAO,MAAM,CAAA;AAAA,MACtD,CAAA,MAAA,IAAW,MAAA,CAAO,MAAA,CAAO,SAAA,EAAW;AAClC,QAAA,OAAO,OAAO,MAAA,CAAO,SAAA,CAAU,OAAO,IAAA,CAAK,MAAA,CAAO,OAAO,SAAS,CAAA;AAAA,MACpE;AAAA,IACF;AACA,IAAA,IAAI,OAAO,OAAA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A,EAAA,OAAO,KAAA;AACT;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const instrumentation = require('./vendored/instrumentation.js');
|
|
4
|
+
const semanticConventions = require('@opentelemetry/semantic-conventions');
|
|
5
|
+
const core = require('@sentry/core');
|
|
6
|
+
const nodeCore = require('@sentry/node-core');
|
|
7
|
+
const debugBuild = require('../../../debug-build.js');
|
|
8
|
+
|
|
9
|
+
const INTEGRATION_NAME = "Koa";
|
|
10
|
+
const instrumentKoa = nodeCore.generateInstrumentOnce(
|
|
11
|
+
INTEGRATION_NAME,
|
|
12
|
+
instrumentation.KoaInstrumentation,
|
|
13
|
+
(options = {}) => {
|
|
14
|
+
return {
|
|
15
|
+
ignoreLayersType: options.ignoreLayersType,
|
|
16
|
+
requestHook(span, info) {
|
|
17
|
+
nodeCore.addOriginToSpan(span, "auto.http.otel.koa");
|
|
18
|
+
const attributes = core.spanToJSON(span).data;
|
|
19
|
+
const type = attributes["koa.type"];
|
|
20
|
+
if (type) {
|
|
21
|
+
span.setAttribute(core.SEMANTIC_ATTRIBUTE_SENTRY_OP, `${type}.koa`);
|
|
22
|
+
}
|
|
23
|
+
const name = attributes["koa.name"];
|
|
24
|
+
if (typeof name === "string") {
|
|
25
|
+
span.updateName(name || "< unknown >");
|
|
26
|
+
}
|
|
27
|
+
if (core.getIsolationScope() === core.getDefaultIsolationScope()) {
|
|
28
|
+
debugBuild.DEBUG_BUILD && core.debug.warn("Isolation scope is default isolation scope - skipping setting transactionName");
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
const route = attributes[semanticConventions.ATTR_HTTP_ROUTE];
|
|
32
|
+
const method = info.context?.request?.method?.toUpperCase() || "GET";
|
|
33
|
+
if (route) {
|
|
34
|
+
core.getIsolationScope().setTransactionName(`${method} ${route}`);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
const _koaIntegration = ((options = {}) => {
|
|
41
|
+
return {
|
|
42
|
+
name: INTEGRATION_NAME,
|
|
43
|
+
setupOnce() {
|
|
44
|
+
instrumentKoa(options);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
const koaIntegration = core.defineIntegration(_koaIntegration);
|
|
49
|
+
const setupKoaErrorHandler = (app) => {
|
|
50
|
+
app.use(async (ctx, next) => {
|
|
51
|
+
try {
|
|
52
|
+
await next();
|
|
53
|
+
} catch (error) {
|
|
54
|
+
core.captureException(error, {
|
|
55
|
+
mechanism: {
|
|
56
|
+
handled: false,
|
|
57
|
+
type: "auto.middleware.koa"
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
throw error;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
nodeCore.ensureIsWrapped(app.use, "koa");
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
exports.instrumentKoa = instrumentKoa;
|
|
67
|
+
exports.koaIntegration = koaIntegration;
|
|
68
|
+
exports.setupKoaErrorHandler = setupKoaErrorHandler;
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/koa/index.ts"],"sourcesContent":["import type { KoaInstrumentationConfig, KoaLayerType } from './vendored/types';\nimport { KoaInstrumentation } from './vendored/instrumentation';\nimport { ATTR_HTTP_ROUTE } from '@opentelemetry/semantic-conventions';\nimport type { IntegrationFn } from '@sentry/core';\nimport {\n captureException,\n debug,\n defineIntegration,\n getDefaultIsolationScope,\n getIsolationScope,\n SEMANTIC_ATTRIBUTE_SENTRY_OP,\n spanToJSON,\n} from '@sentry/core';\nimport { addOriginToSpan, ensureIsWrapped, generateInstrumentOnce } from '@sentry/node-core';\nimport { DEBUG_BUILD } from '../../../debug-build';\n\ninterface KoaOptions {\n /**\n * Ignore layers of specified types\n */\n ignoreLayersType?: Array<'middleware' | 'router'>;\n}\n\nconst INTEGRATION_NAME = 'Koa';\n\nexport const instrumentKoa = generateInstrumentOnce(\n INTEGRATION_NAME,\n KoaInstrumentation,\n (options: KoaOptions = {}) => {\n return {\n ignoreLayersType: options.ignoreLayersType as KoaLayerType[],\n requestHook(span, info) {\n addOriginToSpan(span, 'auto.http.otel.koa');\n\n const attributes = spanToJSON(span).data;\n\n // this is one of: middleware, router\n const type = attributes['koa.type'];\n if (type) {\n span.setAttribute(SEMANTIC_ATTRIBUTE_SENTRY_OP, `${type}.koa`);\n }\n\n // Also update the name\n const name = attributes['koa.name'];\n if (typeof name === 'string') {\n // Somehow, name is sometimes `''` for middleware spans\n // See: https://github.com/open-telemetry/opentelemetry-js-contrib/issues/2220\n span.updateName(name || '< unknown >');\n }\n\n if (getIsolationScope() === getDefaultIsolationScope()) {\n DEBUG_BUILD && debug.warn('Isolation scope is default isolation scope - skipping setting transactionName');\n return;\n }\n const route = attributes[ATTR_HTTP_ROUTE];\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const method = info.context?.request?.method?.toUpperCase() || 'GET';\n if (route) {\n getIsolationScope().setTransactionName(`${method} ${route}`);\n }\n },\n } satisfies KoaInstrumentationConfig;\n },\n);\n\nconst _koaIntegration = ((options: KoaOptions = {}) => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentKoa(options);\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for [Koa](https://koajs.com/).\n *\n * If you also want to capture errors, you need to call `setupKoaErrorHandler(app)` after you set up your Koa server.\n *\n * For more information, see the [koa documentation](https://docs.sentry.io/platforms/javascript/guides/koa/).\n *\n * @param {KoaOptions} options Configuration options for the Koa integration.\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.koaIntegration()],\n * })\n * ```\n *\n * @example\n * ```javascript\n * // To ignore middleware spans\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [\n * Sentry.koaIntegration({\n * ignoreLayersType: ['middleware']\n * })\n * ],\n * })\n * ```\n */\nexport const koaIntegration = defineIntegration(_koaIntegration);\n\n/**\n * Add an Koa error handler to capture errors to Sentry.\n *\n * The error handler must be before any other middleware and after all controllers.\n *\n * @param app The Express instances\n * @param options {ExpressHandlerOptions} Configuration options for the handler\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n * const Koa = require(\"koa\");\n *\n * const app = new Koa();\n *\n * Sentry.setupKoaErrorHandler(app);\n *\n * // Add your routes, etc.\n *\n * app.listen(3000);\n * ```\n */\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const setupKoaErrorHandler = (app: { use: (arg0: (ctx: any, next: any) => Promise<void>) => void }): void => {\n app.use(async (ctx, next) => {\n try {\n await next();\n } catch (error) {\n captureException(error, {\n mechanism: {\n handled: false,\n type: 'auto.middleware.koa',\n },\n });\n throw error;\n }\n });\n\n ensureIsWrapped(app.use, 'koa');\n};\n"],"names":["generateInstrumentOnce","KoaInstrumentation","addOriginToSpan","spanToJSON","SEMANTIC_ATTRIBUTE_SENTRY_OP","getIsolationScope","getDefaultIsolationScope","DEBUG_BUILD","debug","ATTR_HTTP_ROUTE","defineIntegration","captureException","ensureIsWrapped"],"mappings":";;;;;;;;AAuBA,MAAM,gBAAA,GAAmB,KAAA;AAElB,MAAM,aAAA,GAAgBA,+BAAA;AAAA,EAC3B,gBAAA;AAAA,EACAC,kCAAA;AAAA,EACA,CAAC,OAAA,GAAsB,EAAC,KAAM;AAC5B,IAAA,OAAO;AAAA,MACL,kBAAkB,OAAA,CAAQ,gBAAA;AAAA,MAC1B,WAAA,CAAY,MAAM,IAAA,EAAM;AACtB,QAAAC,wBAAA,CAAgB,MAAM,oBAAoB,CAAA;AAE1C,QAAA,MAAM,UAAA,GAAaC,eAAA,CAAW,IAAI,CAAA,CAAE,IAAA;AAGpC,QAAA,MAAM,IAAA,GAA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,qBAAA,CAAiB,KAAA,EAAO;AAAA,QACtB,SAAA,EAAW;AAAA,UACT,OAAA,EAAS,KAAA;AAAA,UACT,IAAA,EAAM;AAAA;AACR,OACD,CAAA;AACD,MAAA,MAAM,KAAA;AAAA,IACR;AAAA,EACF,CAAC,CAAA;AAED,EAAAC,wBAAA,CAAgB,GAAA,CAAI,KAAK,KAAK,CAAA;AAChC;;;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
var AttributeNames = /* @__PURE__ */ ((AttributeNames2) => {
|
|
4
|
+
AttributeNames2["KOA_TYPE"] = "koa.type";
|
|
5
|
+
AttributeNames2["KOA_NAME"] = "koa.name";
|
|
6
|
+
return AttributeNames2;
|
|
7
|
+
})(AttributeNames || {});
|
|
8
|
+
|
|
9
|
+
exports.AttributeNames = AttributeNames;
|
|
10
|
+
//# sourceMappingURL=AttributeNames.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AttributeNames.js","sources":["../../../../../../../src/integrations/tracing/koa/vendored/enums/AttributeNames.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-koa\n * - Upstream version: @opentelemetry/instrumentation-koa@0.66.0\n */\n/* eslint-disable */\n\nexport enum AttributeNames {\n KOA_TYPE = 'koa.type',\n KOA_NAME = 'koa.name',\n}\n"],"names":["AttributeNames"],"mappings":";;AAqBO,IAAK,cAAA,qBAAAA,eAAAA,KAAL;AACL,EAAAA,gBAAA,UAAA,CAAA,GAAW,UAAA;AACX,EAAAA,gBAAA,UAAA,CAAA,GAAW,UAAA;AAFD,EAAA,OAAAA,eAAAA;AAAA,CAAA,EAAA,cAAA,IAAA,EAAA;;;;"}
|