@sentry/node 10.53.0 → 10.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/cjs/debug-build.js +0 -5
- package/build/cjs/debug-build.js.map +1 -1
- package/build/cjs/index.js +68 -68
- package/build/cjs/init.js +0 -6
- package/build/cjs/init.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/growthbook.js +0 -4
- package/build/cjs/integrations/featureFlagShims/growthbook.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/launchDarkly.js +6 -18
- package/build/cjs/integrations/featureFlagShims/launchDarkly.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/openFeature.js +6 -21
- package/build/cjs/integrations/featureFlagShims/openFeature.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/statsig.js +2 -8
- package/build/cjs/integrations/featureFlagShims/statsig.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/unleash.js +2 -8
- package/build/cjs/integrations/featureFlagShims/unleash.js.map +1 -1
- package/build/cjs/integrations/fs/index.js +107 -0
- package/build/cjs/integrations/fs/index.js.map +1 -0
- package/build/cjs/integrations/fs/vendored/constants.js +138 -0
- package/build/cjs/integrations/fs/vendored/constants.js.map +1 -0
- package/build/cjs/integrations/fs/vendored/instrumentation.js +311 -0
- package/build/cjs/integrations/fs/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/fs/vendored/utils.js +31 -0
- package/build/cjs/integrations/fs/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/http.js +11 -37
- package/build/cjs/integrations/http.js.map +1 -1
- package/build/cjs/integrations/node-fetch/index.js +19 -46
- package/build/cjs/integrations/node-fetch/index.js.map +1 -1
- package/build/cjs/integrations/node-fetch/vendored/undici.js +71 -215
- package/build/cjs/integrations/node-fetch/vendored/undici.js.map +1 -1
- package/build/cjs/integrations/tracing/amqplib/index.js +29 -0
- package/build/cjs/integrations/tracing/amqplib/index.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/amqplib.js +452 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/amqplib.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv-obsolete.js +24 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js +12 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/types.js +23 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/types.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/utils.js +137 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/anthropic-ai/index.js +3 -58
- package/build/cjs/integrations/tracing/anthropic-ai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js +16 -39
- package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/connect/index.js +56 -0
- package/build/cjs/integrations/tracing/connect/index.js.map +1 -0
- package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js +22 -0
- package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js +148 -0
- package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/connect/vendored/internal-types.js +8 -0
- package/build/cjs/integrations/tracing/connect/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/connect/vendored/utils.js +35 -0
- package/build/cjs/integrations/tracing/connect/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/dataloader/index.js +41 -0
- package/build/cjs/integrations/tracing/dataloader/index.js.map +1 -0
- package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js +245 -0
- package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/express.js +15 -23
- package/build/cjs/integrations/tracing/express.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/index.js +46 -165
- package/build/cjs/integrations/tracing/fastify/index.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/v3/constants.js +1 -18
- package/build/cjs/integrations/tracing/fastify/v3/constants.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js +20 -33
- package/build/cjs/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js +68 -150
- package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/v3/utils.js +8 -79
- package/build/cjs/integrations/tracing/fastify/v3/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/vendored/instrumentation.js +388 -0
- package/build/cjs/integrations/tracing/fastify/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/firebase/firebase.js +15 -21
- package/build/cjs/integrations/tracing/firebase/firebase.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js +6 -14
- package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js +57 -161
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js +81 -147
- package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
- package/build/cjs/integrations/tracing/genericPool/index.js +35 -0
- package/build/cjs/integrations/tracing/genericPool/index.js.map +1 -0
- package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js +122 -0
- package/build/cjs/integrations/tracing/genericPool/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/google-genai/index.js +3 -58
- package/build/cjs/integrations/tracing/google-genai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/google-genai/instrumentation.js +18 -39
- package/build/cjs/integrations/tracing/google-genai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/graphql/index.js +83 -0
- package/build/cjs/integrations/tracing/graphql/index.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/enum.js +47 -0
- package/build/cjs/integrations/tracing/graphql/vendored/enum.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js +17 -0
- package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js +318 -0
- package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js +6 -0
- package/build/cjs/integrations/tracing/graphql/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/symbols.js +8 -0
- package/build/cjs/integrations/tracing/graphql/vendored/symbols.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/utils.js +300 -0
- package/build/cjs/integrations/tracing/graphql/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/hapi/index.js +20 -78
- package/build/cjs/integrations/tracing/hapi/index.js.map +1 -1
- package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js +11 -0
- package/build/cjs/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js +275 -0
- package/build/cjs/integrations/tracing/hapi/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js +24 -0
- package/build/cjs/integrations/tracing/hapi/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/hapi/vendored/semconv.js +6 -0
- package/build/cjs/integrations/tracing/hapi/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/hapi/vendored/utils.js +91 -0
- package/build/cjs/integrations/tracing/hapi/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/hono/constants.js +6 -7
- package/build/cjs/integrations/tracing/hono/constants.js.map +1 -1
- package/build/cjs/integrations/tracing/hono/index.js +19 -70
- package/build/cjs/integrations/tracing/hono/index.js.map +1 -1
- package/build/cjs/integrations/tracing/hono/instrumentation.js +47 -82
- package/build/cjs/integrations/tracing/hono/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/index.js +74 -82
- package/build/cjs/integrations/tracing/index.js.map +1 -1
- package/build/cjs/integrations/tracing/kafka/index.js +31 -0
- package/build/cjs/integrations/tracing/kafka/index.js.map +1 -0
- package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js +438 -0
- package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/kafka/vendored/internal-types.js +6 -0
- package/build/cjs/integrations/tracing/kafka/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/kafka/vendored/propagator.js +22 -0
- package/build/cjs/integrations/tracing/kafka/vendored/propagator.js.map +1 -0
- package/build/cjs/integrations/tracing/kafka/vendored/semconv.js +38 -0
- package/build/cjs/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/index.js +36 -0
- package/build/cjs/integrations/tracing/knex/index.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/vendored/constants.js +16 -0
- package/build/cjs/integrations/tracing/knex/vendored/constants.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js +162 -0
- package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/vendored/semconv.js +24 -0
- package/build/cjs/integrations/tracing/knex/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/vendored/utils.js +97 -0
- package/build/cjs/integrations/tracing/knex/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/index.js +69 -0
- package/build/cjs/integrations/tracing/koa/index.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js +10 -0
- package/build/cjs/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js +140 -0
- package/build/cjs/integrations/tracing/koa/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/vendored/internal-types.js +6 -0
- package/build/cjs/integrations/tracing/koa/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/vendored/types.js +10 -0
- package/build/cjs/integrations/tracing/koa/vendored/types.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/vendored/utils.js +33 -0
- package/build/cjs/integrations/tracing/koa/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/langchain/index.js +3 -97
- package/build/cjs/integrations/tracing/langchain/index.js.map +1 -1
- package/build/cjs/integrations/tracing/langchain/instrumentation.js +51 -146
- package/build/cjs/integrations/tracing/langchain/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/langgraph/index.js +3 -73
- package/build/cjs/integrations/tracing/langgraph/index.js.map +1 -1
- package/build/cjs/integrations/tracing/langgraph/instrumentation.js +27 -38
- package/build/cjs/integrations/tracing/langgraph/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/lrumemoizer/index.js +21 -0
- package/build/cjs/integrations/tracing/lrumemoizer/index.js.map +1 -0
- package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js +39 -0
- package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/index.js +62 -0
- package/build/cjs/integrations/tracing/mongo/index.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js +678 -0
- package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/vendored/internal-types.js +14 -0
- package/build/cjs/integrations/tracing/mongo/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/vendored/semconv.js +26 -0
- package/build/cjs/integrations/tracing/mongo/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose/index.js +28 -0
- package/build/cjs/integrations/tracing/mongoose/index.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js +375 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/semconv.js +22 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/utils.js +87 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql/index.js +21 -0
- package/build/cjs/integrations/tracing/mysql/index.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql/vendored/AttributeNames.js +9 -0
- package/build/cjs/integrations/tracing/mysql/vendored/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js +278 -0
- package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql/vendored/semconv.js +22 -0
- package/build/cjs/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql/vendored/utils.js +63 -0
- package/build/cjs/integrations/tracing/mysql/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/index.js +28 -0
- package/build/cjs/integrations/tracing/mysql2/index.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js +173 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js +20 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/utils.js +97 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/openai/index.js +3 -58
- package/build/cjs/integrations/tracing/openai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/openai/instrumentation.js +17 -41
- package/build/cjs/integrations/tracing/openai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/postgres/index.js +31 -0
- package/build/cjs/integrations/tracing/postgres/index.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js +12 -0
- package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js +11 -0
- package/build/cjs/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js +436 -0
- package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/internal-types.js +6 -0
- package/build/cjs/integrations/tracing/postgres/vendored/internal-types.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/semconv.js +32 -0
- package/build/cjs/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/utils.js +275 -0
- package/build/cjs/integrations/tracing/postgres/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/postgresjs.js +66 -181
- package/build/cjs/integrations/tracing/postgresjs.js.map +1 -1
- package/build/cjs/integrations/tracing/prisma/index.js +123 -0
- package/build/cjs/integrations/tracing/prisma/index.js.map +1 -0
- package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js +119 -0
- package/build/cjs/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -0
- package/build/cjs/integrations/tracing/prisma/vendored/constants.js +14 -0
- package/build/cjs/integrations/tracing/prisma/vendored/constants.js.map +1 -0
- package/build/cjs/integrations/tracing/prisma/vendored/global.js +28 -0
- package/build/cjs/integrations/tracing/prisma/vendored/global.js.map +1 -0
- package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js +38 -0
- package/build/cjs/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/redis/index.js +15 -72
- package/build/cjs/integrations/tracing/redis/index.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/redis-dc-subscriber.js +42 -77
- package/build/cjs/integrations/tracing/redis/redis-dc-subscriber.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js +53 -98
- package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/vendored/redis-common.js +9 -49
- package/build/cjs/integrations/tracing/redis/vendored/redis-common.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js +175 -282
- package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/vendored/semconv.js +7 -36
- package/build/cjs/integrations/tracing/redis/vendored/semconv.js.map +1 -1
- package/build/cjs/integrations/tracing/tedious/index.js +45 -0
- package/build/cjs/integrations/tracing/tedious/index.js.map +1 -0
- package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js +205 -0
- package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/tedious/vendored/semconv.js +20 -0
- package/build/cjs/integrations/tracing/tedious/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/tedious/vendored/utils.js +29 -0
- package/build/cjs/integrations/tracing/tedious/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/utils/sql-common.js +43 -0
- package/build/cjs/integrations/tracing/utils/sql-common.js.map +1 -0
- package/build/cjs/integrations/tracing/vercelai/constants.js +1 -1
- package/build/cjs/integrations/tracing/vercelai/index.js +3 -50
- package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/vercelai/instrumentation.js +58 -157
- package/build/cjs/integrations/tracing/vercelai/instrumentation.js.map +1 -1
- package/build/cjs/preload.js +1 -14
- package/build/cjs/preload.js.map +1 -1
- package/build/cjs/sdk/index.js +6 -34
- package/build/cjs/sdk/index.js.map +1 -1
- package/build/cjs/sdk/initOtel.js +13 -51
- package/build/cjs/sdk/initOtel.js.map +1 -1
- package/build/cjs/utils/redisCache.js +24 -52
- package/build/cjs/utils/redisCache.js.map +1 -1
- package/build/esm/debug-build.js +0 -5
- package/build/esm/debug-build.js.map +1 -1
- package/build/esm/index.js +17 -17
- package/build/esm/init.js +0 -6
- package/build/esm/init.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/growthbook.js +0 -4
- package/build/esm/integrations/featureFlagShims/growthbook.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/launchDarkly.js +6 -18
- package/build/esm/integrations/featureFlagShims/launchDarkly.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/openFeature.js +6 -21
- package/build/esm/integrations/featureFlagShims/openFeature.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/statsig.js +2 -8
- package/build/esm/integrations/featureFlagShims/statsig.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/unleash.js +2 -8
- package/build/esm/integrations/featureFlagShims/unleash.js.map +1 -1
- package/build/esm/integrations/fs/index.js +105 -0
- package/build/esm/integrations/fs/index.js.map +1 -0
- package/build/esm/integrations/fs/vendored/constants.js +134 -0
- package/build/esm/integrations/fs/vendored/constants.js.map +1 -0
- package/build/esm/integrations/fs/vendored/instrumentation.js +309 -0
- package/build/esm/integrations/fs/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/fs/vendored/utils.js +28 -0
- package/build/esm/integrations/fs/vendored/utils.js.map +1 -0
- package/build/esm/integrations/http.js +11 -37
- package/build/esm/integrations/http.js.map +1 -1
- package/build/esm/integrations/node-fetch/index.js +19 -46
- package/build/esm/integrations/node-fetch/index.js.map +1 -1
- package/build/esm/integrations/node-fetch/vendored/undici.js +71 -215
- package/build/esm/integrations/node-fetch/vendored/undici.js.map +1 -1
- package/build/esm/integrations/tracing/amqplib/index.js +26 -0
- package/build/esm/integrations/tracing/amqplib/index.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/amqplib.js +450 -0
- package/build/esm/integrations/tracing/amqplib/vendored/amqplib.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/semconv-obsolete.js +13 -0
- package/build/esm/integrations/tracing/amqplib/vendored/semconv-obsolete.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/semconv.js +7 -0
- package/build/esm/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/types.js +20 -0
- package/build/esm/integrations/tracing/amqplib/vendored/types.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/utils.js +126 -0
- package/build/esm/integrations/tracing/amqplib/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/anthropic-ai/index.js +3 -58
- package/build/esm/integrations/tracing/anthropic-ai/index.js.map +1 -1
- package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js +16 -39
- package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/connect/index.js +52 -0
- package/build/esm/integrations/tracing/connect/index.js.map +1 -0
- package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js +18 -0
- package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/connect/vendored/instrumentation.js +145 -0
- package/build/esm/integrations/tracing/connect/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/connect/vendored/internal-types.js +6 -0
- package/build/esm/integrations/tracing/connect/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/connect/vendored/utils.js +31 -0
- package/build/esm/integrations/tracing/connect/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/dataloader/index.js +38 -0
- package/build/esm/integrations/tracing/dataloader/index.js.map +1 -0
- package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js +243 -0
- package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/express.js +15 -23
- package/build/esm/integrations/tracing/express.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/index.js +45 -164
- package/build/esm/integrations/tracing/fastify/index.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/v3/constants.js +1 -18
- package/build/esm/integrations/tracing/fastify/v3/constants.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js +17 -34
- package/build/esm/integrations/tracing/fastify/v3/enums/AttributeNames.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/v3/instrumentation.js +68 -150
- package/build/esm/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/v3/utils.js +8 -79
- package/build/esm/integrations/tracing/fastify/v3/utils.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/vendored/instrumentation.js +386 -0
- package/build/esm/integrations/tracing/fastify/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/firebase/firebase.js +15 -21
- package/build/esm/integrations/tracing/firebase/firebase.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js +6 -14
- package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js +57 -161
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/patches/functions.js +81 -147
- package/build/esm/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
- package/build/esm/integrations/tracing/genericPool/index.js +32 -0
- package/build/esm/integrations/tracing/genericPool/index.js.map +1 -0
- package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js +120 -0
- package/build/esm/integrations/tracing/genericPool/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/google-genai/index.js +3 -58
- package/build/esm/integrations/tracing/google-genai/index.js.map +1 -1
- package/build/esm/integrations/tracing/google-genai/instrumentation.js +18 -39
- package/build/esm/integrations/tracing/google-genai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/graphql/index.js +80 -0
- package/build/esm/integrations/tracing/graphql/index.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/enum.js +43 -0
- package/build/esm/integrations/tracing/graphql/vendored/enum.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js +15 -0
- package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js +316 -0
- package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/internal-types.js +4 -0
- package/build/esm/integrations/tracing/graphql/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/symbols.js +5 -0
- package/build/esm/integrations/tracing/graphql/vendored/symbols.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/utils.js +291 -0
- package/build/esm/integrations/tracing/graphql/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/hapi/index.js +19 -77
- package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
- package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js +9 -0
- package/build/esm/integrations/tracing/hapi/vendored/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js +273 -0
- package/build/esm/integrations/tracing/hapi/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/hapi/vendored/internal-types.js +19 -0
- package/build/esm/integrations/tracing/hapi/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/hapi/vendored/semconv.js +4 -0
- package/build/esm/integrations/tracing/hapi/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/hapi/vendored/utils.js +82 -0
- package/build/esm/integrations/tracing/hapi/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/hono/constants.js +6 -7
- package/build/esm/integrations/tracing/hono/constants.js.map +1 -1
- package/build/esm/integrations/tracing/hono/index.js +19 -70
- package/build/esm/integrations/tracing/hono/index.js.map +1 -1
- package/build/esm/integrations/tracing/hono/instrumentation.js +47 -82
- package/build/esm/integrations/tracing/hono/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/index.js +16 -24
- package/build/esm/integrations/tracing/index.js.map +1 -1
- package/build/esm/integrations/tracing/kafka/index.js +28 -0
- package/build/esm/integrations/tracing/kafka/index.js.map +1 -0
- package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js +436 -0
- package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/kafka/vendored/internal-types.js +4 -0
- package/build/esm/integrations/tracing/kafka/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/kafka/vendored/propagator.js +20 -0
- package/build/esm/integrations/tracing/kafka/vendored/propagator.js.map +1 -0
- package/build/esm/integrations/tracing/kafka/vendored/semconv.js +20 -0
- package/build/esm/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/knex/index.js +33 -0
- package/build/esm/integrations/tracing/knex/index.js.map +1 -0
- package/build/esm/integrations/tracing/knex/vendored/constants.js +13 -0
- package/build/esm/integrations/tracing/knex/vendored/constants.js.map +1 -0
- package/build/esm/integrations/tracing/knex/vendored/instrumentation.js +160 -0
- package/build/esm/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/knex/vendored/semconv.js +13 -0
- package/build/esm/integrations/tracing/knex/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/knex/vendored/utils.js +87 -0
- package/build/esm/integrations/tracing/knex/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/koa/index.js +65 -0
- package/build/esm/integrations/tracing/koa/index.js.map +1 -0
- package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js +8 -0
- package/build/esm/integrations/tracing/koa/vendored/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/koa/vendored/instrumentation.js +138 -0
- package/build/esm/integrations/tracing/koa/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/koa/vendored/internal-types.js +4 -0
- package/build/esm/integrations/tracing/koa/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/koa/vendored/types.js +8 -0
- package/build/esm/integrations/tracing/koa/vendored/types.js.map +1 -0
- package/build/esm/integrations/tracing/koa/vendored/utils.js +30 -0
- package/build/esm/integrations/tracing/koa/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/langchain/index.js +3 -97
- package/build/esm/integrations/tracing/langchain/index.js.map +1 -1
- package/build/esm/integrations/tracing/langchain/instrumentation.js +52 -147
- package/build/esm/integrations/tracing/langchain/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/langgraph/index.js +3 -73
- package/build/esm/integrations/tracing/langgraph/index.js.map +1 -1
- package/build/esm/integrations/tracing/langgraph/instrumentation.js +27 -38
- package/build/esm/integrations/tracing/langgraph/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/lrumemoizer/index.js +18 -0
- package/build/esm/integrations/tracing/lrumemoizer/index.js.map +1 -0
- package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js +37 -0
- package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/index.js +58 -0
- package/build/esm/integrations/tracing/mongo/index.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js +676 -0
- package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/vendored/internal-types.js +12 -0
- package/build/esm/integrations/tracing/mongo/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/vendored/semconv.js +14 -0
- package/build/esm/integrations/tracing/mongo/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose/index.js +25 -0
- package/build/esm/integrations/tracing/mongoose/index.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js +371 -0
- package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose/vendored/semconv.js +12 -0
- package/build/esm/integrations/tracing/mongoose/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose/vendored/utils.js +83 -0
- package/build/esm/integrations/tracing/mongoose/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/mysql/index.js +18 -0
- package/build/esm/integrations/tracing/mysql/index.js.map +1 -0
- package/build/esm/integrations/tracing/mysql/vendored/AttributeNames.js +7 -0
- package/build/esm/integrations/tracing/mysql/vendored/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js +276 -0
- package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mysql/vendored/semconv.js +12 -0
- package/build/esm/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/mysql/vendored/utils.js +55 -0
- package/build/esm/integrations/tracing/mysql/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/index.js +25 -0
- package/build/esm/integrations/tracing/mysql2/index.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js +171 -0
- package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/vendored/semconv.js +11 -0
- package/build/esm/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/vendored/utils.js +91 -0
- package/build/esm/integrations/tracing/mysql2/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/openai/index.js +3 -58
- package/build/esm/integrations/tracing/openai/index.js.map +1 -1
- package/build/esm/integrations/tracing/openai/instrumentation.js +17 -41
- package/build/esm/integrations/tracing/openai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/postgres/index.js +28 -0
- package/build/esm/integrations/tracing/postgres/index.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js +10 -0
- package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js +9 -0
- package/build/esm/integrations/tracing/postgres/vendored/enums/SpanNames.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js +434 -0
- package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/internal-types.js +4 -0
- package/build/esm/integrations/tracing/postgres/vendored/internal-types.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/semconv.js +17 -0
- package/build/esm/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/utils.js +257 -0
- package/build/esm/integrations/tracing/postgres/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/postgresjs.js +66 -181
- package/build/esm/integrations/tracing/postgresjs.js.map +1 -1
- package/build/esm/integrations/tracing/prisma/index.js +120 -0
- package/build/esm/integrations/tracing/prisma/index.js.map +1 -0
- package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js +117 -0
- package/build/esm/integrations/tracing/prisma/vendored/active-tracing-helper.js.map +1 -0
- package/build/esm/integrations/tracing/prisma/vendored/constants.js +9 -0
- package/build/esm/integrations/tracing/prisma/vendored/constants.js.map +1 -0
- package/build/esm/integrations/tracing/prisma/vendored/global.js +24 -0
- package/build/esm/integrations/tracing/prisma/vendored/global.js.map +1 -0
- package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js +36 -0
- package/build/esm/integrations/tracing/prisma/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/redis/index.js +15 -72
- package/build/esm/integrations/tracing/redis/index.js.map +1 -1
- package/build/esm/integrations/tracing/redis/redis-dc-subscriber.js +42 -77
- package/build/esm/integrations/tracing/redis/redis-dc-subscriber.js.map +1 -1
- package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js +53 -98
- package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/redis/vendored/redis-common.js +9 -49
- package/build/esm/integrations/tracing/redis/vendored/redis-common.js.map +1 -1
- package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js +175 -282
- package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/redis/vendored/semconv.js +7 -36
- package/build/esm/integrations/tracing/redis/vendored/semconv.js.map +1 -1
- package/build/esm/integrations/tracing/tedious/index.js +42 -0
- package/build/esm/integrations/tracing/tedious/index.js.map +1 -0
- package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js +202 -0
- package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/tedious/vendored/semconv.js +11 -0
- package/build/esm/integrations/tracing/tedious/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/tedious/vendored/utils.js +26 -0
- package/build/esm/integrations/tracing/tedious/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/utils/sql-common.js +41 -0
- package/build/esm/integrations/tracing/utils/sql-common.js.map +1 -0
- package/build/esm/integrations/tracing/vercelai/constants.js +1 -1
- package/build/esm/integrations/tracing/vercelai/index.js +3 -50
- package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/esm/integrations/tracing/vercelai/instrumentation.js +58 -157
- package/build/esm/integrations/tracing/vercelai/instrumentation.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/preload.js +1 -14
- package/build/esm/preload.js.map +1 -1
- package/build/esm/sdk/index.js +6 -34
- package/build/esm/sdk/index.js.map +1 -1
- package/build/esm/sdk/initOtel.js +13 -51
- package/build/esm/sdk/initOtel.js.map +1 -1
- package/build/esm/utils/redisCache.js +24 -52
- package/build/esm/utils/redisCache.js.map +1 -1
- package/build/types/integrations/{fs.d.ts → fs/index.d.ts} +1 -1
- package/build/types/integrations/fs/index.d.ts.map +1 -0
- package/build/types/integrations/fs/vendored/constants.d.ts +5 -0
- package/build/types/integrations/fs/vendored/constants.d.ts.map +1 -0
- package/build/types/integrations/fs/vendored/instrumentation.d.ts +15 -0
- package/build/types/integrations/fs/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/fs/vendored/types.d.ts +29 -0
- package/build/types/integrations/fs/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/fs/vendored/utils.d.ts +10 -0
- package/build/types/integrations/fs/vendored/utils.d.ts.map +1 -0
- package/build/{types-ts3.8/integrations/tracing/amqplib.d.ts → types/integrations/tracing/amqplib/index.d.ts} +20 -20
- package/build/types/integrations/tracing/amqplib/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +44 -0
- package/build/types/integrations/tracing/amqplib/vendored/amqplib-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/amqplib.d.ts +26 -0
- package/build/types/integrations/tracing/amqplib/vendored/amqplib.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts +63 -0
- package/build/types/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts +41 -0
- package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/types.d.ts +130 -0
- package/build/types/integrations/tracing/amqplib/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts +35 -0
- package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{connect.d.ts → connect/index.d.ts} +2 -2
- package/build/types/integrations/tracing/connect/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +13 -0
- package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts +18 -0
- package/build/types/integrations/tracing/connect/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts +31 -0
- package/build/types/integrations/tracing/connect/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/connect/vendored/utils.d.ts +5 -0
- package/build/types/integrations/tracing/connect/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{dataloader.d.ts → dataloader/index.d.ts} +2 -2
- package/build/types/integrations/tracing/dataloader/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/dataloader/vendored/dataloader-types.d.ts +14 -0
- package/build/types/integrations/tracing/dataloader/vendored/dataloader-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts +21 -0
- package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/dataloader/vendored/types.d.ts +10 -0
- package/build/types/integrations/tracing/dataloader/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/fastify/vendored/instrumentation.d.ts +27 -0
- package/build/types/integrations/tracing/fastify/vendored/instrumentation.d.ts.map +1 -0
- package/build/{types-ts3.8/integrations/tracing/genericPool.d.ts → types/integrations/tracing/genericPool/index.d.ts} +20 -20
- package/build/types/integrations/tracing/genericPool/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +5 -0
- package/build/types/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts +10 -0
- package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +2 -2
- package/build/types/integrations/tracing/graphql/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/enum.d.ts +38 -0
- package/build/types/integrations/tracing/graphql/vendored/enum.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +12 -0
- package/build/types/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts +136 -0
- package/build/types/integrations/tracing/graphql/vendored/graphql-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts +20 -0
- package/build/types/integrations/tracing/graphql/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts +63 -0
- package/build/types/integrations/tracing/graphql/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts +3 -0
- package/build/types/integrations/tracing/graphql/vendored/symbols.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/types.d.ts +71 -0
- package/build/types/integrations/tracing/graphql/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/utils.d.ts +17 -0
- package/build/types/integrations/tracing/graphql/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/index.d.ts +1 -1
- package/build/types/integrations/tracing/hapi/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +6 -0
- package/build/types/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts +70 -0
- package/build/types/integrations/tracing/hapi/vendored/hapi-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts +72 -0
- package/build/types/integrations/tracing/hapi/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts +32 -0
- package/build/types/integrations/tracing/hapi/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/vendored/semconv.d.ts +13 -0
- package/build/types/integrations/tracing/hapi/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/vendored/utils.d.ts +19 -0
- package/build/types/integrations/tracing/hapi/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +2 -2
- package/build/types/integrations/tracing/kafka/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts +25 -0
- package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/internal-types.d.ts +9 -0
- package/build/types/integrations/tracing/kafka/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +111 -0
- package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/propagator.d.ts +3 -0
- package/build/types/integrations/tracing/kafka/vendored/propagator.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts +131 -0
- package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/types.d.ts +26 -0
- package/build/types/integrations/tracing/kafka/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/{knex.d.ts → knex/index.d.ts} +2 -2
- package/build/types/integrations/tracing/knex/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/constants.d.ts +3 -0
- package/build/types/integrations/tracing/knex/vendored/constants.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts +14 -0
- package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/semconv.d.ts +38 -0
- package/build/types/integrations/tracing/knex/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/types.d.ts +8 -0
- package/build/types/integrations/tracing/knex/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/utils.d.ts +15 -0
- package/build/types/integrations/tracing/knex/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{koa.d.ts → koa/index.d.ts} +2 -2
- package/build/types/integrations/tracing/koa/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +5 -0
- package/build/types/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts +32 -0
- package/build/types/integrations/tracing/koa/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts +34 -0
- package/build/types/integrations/tracing/koa/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/koa/vendored/types.d.ts +50 -0
- package/build/types/integrations/tracing/koa/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/koa/vendored/utils.d.ts +15 -0
- package/build/types/integrations/tracing/koa/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/langchain/instrumentation.d.ts.map +1 -1
- package/build/{types-ts3.8/integrations/tracing/lrumemoizer.d.ts → types/integrations/tracing/lrumemoizer/index.d.ts} +19 -19
- package/build/types/integrations/tracing/lrumemoizer/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
- package/build/types/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/{mongo.d.ts → mongo/index.d.ts} +2 -2
- package/build/types/integrations/tracing/mongo/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts +79 -0
- package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts +121 -0
- package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongo/vendored/semconv.d.ts +107 -0
- package/build/types/integrations/tracing/mongo/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongo/vendored/types.d.ts +51 -0
- package/build/types/integrations/tracing/mongo/vendored/types.d.ts.map +1 -0
- package/build/{types-ts3.8/integrations/tracing/mongoose.d.ts → types/integrations/tracing/mongoose/index.d.ts} +20 -20
- package/build/types/integrations/tracing/mongoose/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +30 -0
- package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts +24 -0
- package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/vendored/semconv.d.ts +71 -0
- package/build/types/integrations/tracing/mongoose/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/vendored/types.d.ts +36 -0
- package/build/types/integrations/tracing/mongoose/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts +8 -0
- package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +2 -2
- package/build/types/integrations/tracing/mysql/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/AttributeNames.d.ts +4 -0
- package/build/types/integrations/tracing/mysql/vendored/AttributeNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts +28 -0
- package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts +78 -0
- package/build/types/integrations/tracing/mysql/vendored/mysql-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts +88 -0
- package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/types.d.ts +9 -0
- package/build/types/integrations/tracing/mysql/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/utils.d.ts +25 -0
- package/build/types/integrations/tracing/mysql/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +2 -2
- package/build/types/integrations/tracing/mysql2/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts +12 -0
- package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +39 -0
- package/build/types/integrations/tracing/mysql2/vendored/mysql2-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts +9 -0
- package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2/vendored/types.d.ts +18 -0
- package/build/types/integrations/tracing/mysql2/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts +27 -0
- package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +2 -2
- package/build/types/integrations/tracing/postgres/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +7 -0
- package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +6 -0
- package/build/types/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts +20 -0
- package/build/types/integrations/tracing/postgres/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts +35 -0
- package/build/types/integrations/tracing/postgres/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +20 -0
- package/build/types/integrations/tracing/postgres/vendored/pg-pool-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts +54 -0
- package/build/types/integrations/tracing/postgres/vendored/pg-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts +112 -0
- package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/types.d.ts +65 -0
- package/build/types/integrations/tracing/postgres/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/utils.d.ts +69 -0
- package/build/types/integrations/tracing/postgres/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{prisma.d.ts → prisma/index.d.ts} +2 -2
- package/build/types/integrations/tracing/prisma/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts +18 -0
- package/build/types/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/constants.d.ts +5 -0
- package/build/types/integrations/tracing/prisma/vendored/constants.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/global.d.ts +5 -0
- package/build/types/integrations/tracing/prisma/vendored/global.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts +17 -0
- package/build/types/integrations/tracing/prisma/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/types.d.ts +52 -0
- package/build/types/integrations/tracing/prisma/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/v5-tracing-helper.d.ts.map +1 -0
- package/build/types/integrations/tracing/prisma/vendored/v6-tracing-helper.d.ts.map +1 -0
- package/build/types/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +2 -2
- package/build/types/integrations/tracing/tedious/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts +22 -0
- package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts +80 -0
- package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts +21 -0
- package/build/types/integrations/tracing/tedious/vendored/tedious-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/tedious/vendored/types.d.ts +10 -0
- package/build/types/integrations/tracing/tedious/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/tedious/vendored/utils.d.ts +9 -0
- package/build/types/integrations/tracing/tedious/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/utils/sql-common.d.ts +3 -0
- package/build/types/integrations/tracing/utils/sql-common.d.ts.map +1 -0
- package/build/types-ts3.8/integrations/{fs.d.ts → fs/index.d.ts} +1 -1
- package/build/types-ts3.8/integrations/fs/vendored/constants.d.ts +5 -0
- package/build/types-ts3.8/integrations/fs/vendored/instrumentation.d.ts +15 -0
- package/build/types-ts3.8/integrations/fs/vendored/types.d.ts +29 -0
- package/build/types-ts3.8/integrations/fs/vendored/utils.d.ts +15 -0
- package/build/{types/integrations/tracing/amqplib.d.ts → types-ts3.8/integrations/tracing/amqplib/index.d.ts} +20 -20
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +44 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib.d.ts +26 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv-obsolete.d.ts +63 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv.d.ts +41 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/types.d.ts +130 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/utils.d.ts +35 -0
- package/build/types-ts3.8/integrations/tracing/{connect.d.ts → connect/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +13 -0
- package/build/types-ts3.8/integrations/tracing/connect/vendored/instrumentation.d.ts +18 -0
- package/build/types-ts3.8/integrations/tracing/connect/vendored/internal-types.d.ts +36 -0
- package/build/types-ts3.8/integrations/tracing/connect/vendored/utils.d.ts +5 -0
- package/build/types-ts3.8/integrations/tracing/{dataloader.d.ts → dataloader/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/dataloader/vendored/dataloader-types.d.ts +14 -0
- package/build/types-ts3.8/integrations/tracing/dataloader/vendored/instrumentation.d.ts +21 -0
- package/build/types-ts3.8/integrations/tracing/dataloader/vendored/types.d.ts +10 -0
- package/build/types-ts3.8/integrations/tracing/fastify/vendored/instrumentation.d.ts +27 -0
- package/build/{types/integrations/tracing/genericPool.d.ts → types-ts3.8/integrations/tracing/genericPool/index.d.ts} +20 -20
- package/build/types-ts3.8/integrations/tracing/genericPool/vendored/generic-pool-types.d.ts +5 -0
- package/build/types-ts3.8/integrations/tracing/genericPool/vendored/instrumentation.d.ts +10 -0
- package/build/types-ts3.8/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/enum.d.ts +38 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/enums/AttributeNames.d.ts +12 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/graphql-types.d.ts +136 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/instrumentation.d.ts +20 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/internal-types.d.ts +63 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/symbols.d.ts +3 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/types.d.ts +71 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/utils.d.ts +17 -0
- package/build/types-ts3.8/integrations/tracing/hapi/index.d.ts +1 -1
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/enums/AttributeNames.d.ts +6 -0
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/hapi-types.d.ts +70 -0
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/instrumentation.d.ts +72 -0
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/internal-types.d.ts +32 -0
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/semconv.d.ts +13 -0
- package/build/types-ts3.8/integrations/tracing/hapi/vendored/utils.d.ts +19 -0
- package/build/types-ts3.8/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/instrumentation.d.ts +25 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/internal-types.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +111 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/propagator.d.ts +3 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/semconv.d.ts +131 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/types.d.ts +26 -0
- package/build/types-ts3.8/integrations/tracing/{knex.d.ts → knex/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/knex/vendored/constants.d.ts +3 -0
- package/build/types-ts3.8/integrations/tracing/knex/vendored/instrumentation.d.ts +14 -0
- package/build/types-ts3.8/integrations/tracing/knex/vendored/semconv.d.ts +38 -0
- package/build/types-ts3.8/integrations/tracing/knex/vendored/types.d.ts +8 -0
- package/build/types-ts3.8/integrations/tracing/knex/vendored/utils.d.ts +15 -0
- package/build/types-ts3.8/integrations/tracing/{koa.d.ts → koa/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/koa/vendored/enums/AttributeNames.d.ts +5 -0
- package/build/types-ts3.8/integrations/tracing/koa/vendored/instrumentation.d.ts +32 -0
- package/build/types-ts3.8/integrations/tracing/koa/vendored/internal-types.d.ts +34 -0
- package/build/types-ts3.8/integrations/tracing/koa/vendored/types.d.ts +50 -0
- package/build/types-ts3.8/integrations/tracing/koa/vendored/utils.d.ts +15 -0
- package/build/{types/integrations/tracing/lrumemoizer.d.ts → types-ts3.8/integrations/tracing/lrumemoizer/index.d.ts} +19 -19
- package/build/types-ts3.8/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
- package/build/types-ts3.8/integrations/tracing/{mongo.d.ts → mongo/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/instrumentation.d.ts +79 -0
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/internal-types.d.ts +121 -0
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/semconv.d.ts +107 -0
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/types.d.ts +51 -0
- package/build/{types/integrations/tracing/mongoose.d.ts → types-ts3.8/integrations/tracing/mongoose/index.d.ts} +20 -20
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +30 -0
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose.d.ts +24 -0
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/semconv.d.ts +71 -0
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/types.d.ts +36 -0
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/utils.d.ts +8 -0
- package/build/types-ts3.8/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/AttributeNames.d.ts +4 -0
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/instrumentation.d.ts +28 -0
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/mysql-types.d.ts +78 -0
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/semconv.d.ts +88 -0
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/types.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/utils.d.ts +25 -0
- package/build/types-ts3.8/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/instrumentation.d.ts +12 -0
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/mysql2-types.d.ts +39 -0
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/semconv.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/types.d.ts +18 -0
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/utils.d.ts +27 -0
- package/build/types-ts3.8/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +7 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/SpanNames.d.ts +6 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/instrumentation.d.ts +20 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/internal-types.d.ts +35 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-pool-types.d.ts +20 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/pg-types.d.ts +54 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/semconv.d.ts +112 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/types.d.ts +65 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/utils.d.ts +69 -0
- package/build/types-ts3.8/integrations/tracing/{prisma.d.ts → prisma/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/prisma/vendored/active-tracing-helper.d.ts +18 -0
- package/build/types-ts3.8/integrations/tracing/prisma/vendored/constants.d.ts +5 -0
- package/build/types-ts3.8/integrations/tracing/prisma/vendored/global.d.ts +5 -0
- package/build/types-ts3.8/integrations/tracing/prisma/vendored/instrumentation.d.ts +17 -0
- package/build/types-ts3.8/integrations/tracing/prisma/vendored/types.d.ts +55 -0
- package/build/types-ts3.8/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +2 -2
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/instrumentation.d.ts +22 -0
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/semconv.d.ts +80 -0
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/tedious-types.d.ts +21 -0
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/types.d.ts +10 -0
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/utils.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing/utils/sql-common.d.ts +3 -0
- package/package.json +4 -24
- package/build/cjs/integrations/fs.js +0 -142
- package/build/cjs/integrations/fs.js.map +0 -1
- package/build/cjs/integrations/tracing/amqplib.js +0 -47
- package/build/cjs/integrations/tracing/amqplib.js.map +0 -1
- package/build/cjs/integrations/tracing/connect.js +0 -110
- package/build/cjs/integrations/tracing/connect.js.map +0 -1
- package/build/cjs/integrations/tracing/dataloader.js +0 -72
- package/build/cjs/integrations/tracing/dataloader.js.map +0 -1
- package/build/cjs/integrations/tracing/genericPool.js +0 -59
- package/build/cjs/integrations/tracing/genericPool.js.map +0 -1
- package/build/cjs/integrations/tracing/graphql.js +0 -127
- package/build/cjs/integrations/tracing/graphql.js.map +0 -1
- package/build/cjs/integrations/tracing/kafka.js +0 -48
- package/build/cjs/integrations/tracing/kafka.js.map +0 -1
- package/build/cjs/integrations/tracing/knex.js +0 -57
- package/build/cjs/integrations/tracing/knex.js.map +0 -1
- package/build/cjs/integrations/tracing/koa.js +0 -138
- package/build/cjs/integrations/tracing/koa.js.map +0 -1
- package/build/cjs/integrations/tracing/lrumemoizer.js +0 -37
- package/build/cjs/integrations/tracing/lrumemoizer.js.map +0 -1
- package/build/cjs/integrations/tracing/mongo.js +0 -93
- package/build/cjs/integrations/tracing/mongo.js.map +0 -1
- package/build/cjs/integrations/tracing/mongoose.js +0 -46
- package/build/cjs/integrations/tracing/mongoose.js.map +0 -1
- package/build/cjs/integrations/tracing/mysql.js +0 -38
- package/build/cjs/integrations/tracing/mysql.js.map +0 -1
- package/build/cjs/integrations/tracing/mysql2.js +0 -46
- package/build/cjs/integrations/tracing/mysql2.js.map +0 -1
- package/build/cjs/integrations/tracing/postgres.js +0 -48
- package/build/cjs/integrations/tracing/postgres.js.map +0 -1
- package/build/cjs/integrations/tracing/prisma.js +0 -207
- package/build/cjs/integrations/tracing/prisma.js.map +0 -1
- package/build/cjs/integrations/tracing/tedious.js +0 -67
- package/build/cjs/integrations/tracing/tedious.js.map +0 -1
- package/build/esm/integrations/fs.js +0 -140
- package/build/esm/integrations/fs.js.map +0 -1
- package/build/esm/integrations/tracing/amqplib.js +0 -44
- package/build/esm/integrations/tracing/amqplib.js.map +0 -1
- package/build/esm/integrations/tracing/connect.js +0 -106
- package/build/esm/integrations/tracing/connect.js.map +0 -1
- package/build/esm/integrations/tracing/dataloader.js +0 -69
- package/build/esm/integrations/tracing/dataloader.js.map +0 -1
- package/build/esm/integrations/tracing/genericPool.js +0 -56
- package/build/esm/integrations/tracing/genericPool.js.map +0 -1
- package/build/esm/integrations/tracing/graphql.js +0 -124
- package/build/esm/integrations/tracing/graphql.js.map +0 -1
- package/build/esm/integrations/tracing/kafka.js +0 -45
- package/build/esm/integrations/tracing/kafka.js.map +0 -1
- package/build/esm/integrations/tracing/knex.js +0 -54
- package/build/esm/integrations/tracing/knex.js.map +0 -1
- package/build/esm/integrations/tracing/koa.js +0 -134
- package/build/esm/integrations/tracing/koa.js.map +0 -1
- package/build/esm/integrations/tracing/lrumemoizer.js +0 -34
- package/build/esm/integrations/tracing/lrumemoizer.js.map +0 -1
- package/build/esm/integrations/tracing/mongo.js +0 -89
- package/build/esm/integrations/tracing/mongo.js.map +0 -1
- package/build/esm/integrations/tracing/mongoose.js +0 -43
- package/build/esm/integrations/tracing/mongoose.js.map +0 -1
- package/build/esm/integrations/tracing/mysql.js +0 -35
- package/build/esm/integrations/tracing/mysql.js.map +0 -1
- package/build/esm/integrations/tracing/mysql2.js +0 -43
- package/build/esm/integrations/tracing/mysql2.js.map +0 -1
- package/build/esm/integrations/tracing/postgres.js +0 -45
- package/build/esm/integrations/tracing/postgres.js.map +0 -1
- package/build/esm/integrations/tracing/prisma.js +0 -204
- package/build/esm/integrations/tracing/prisma.js.map +0 -1
- package/build/esm/integrations/tracing/tedious.js +0 -64
- package/build/esm/integrations/tracing/tedious.js.map +0 -1
- package/build/types/integrations/fs.d.ts.map +0 -1
- package/build/types/integrations/tracing/amqplib.d.ts.map +0 -1
- package/build/types/integrations/tracing/connect.d.ts.map +0 -1
- package/build/types/integrations/tracing/dataloader.d.ts.map +0 -1
- package/build/types/integrations/tracing/genericPool.d.ts.map +0 -1
- package/build/types/integrations/tracing/graphql.d.ts.map +0 -1
- package/build/types/integrations/tracing/kafka.d.ts.map +0 -1
- package/build/types/integrations/tracing/knex.d.ts.map +0 -1
- package/build/types/integrations/tracing/koa.d.ts.map +0 -1
- package/build/types/integrations/tracing/lrumemoizer.d.ts.map +0 -1
- package/build/types/integrations/tracing/mongo.d.ts.map +0 -1
- package/build/types/integrations/tracing/mongoose.d.ts.map +0 -1
- package/build/types/integrations/tracing/mysql.d.ts.map +0 -1
- package/build/types/integrations/tracing/mysql2.d.ts.map +0 -1
- package/build/types/integrations/tracing/postgres.d.ts.map +0 -1
- package/build/types/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts.map +0 -1
- package/build/types/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts.map +0 -1
- package/build/types/integrations/tracing/prisma.d.ts.map +0 -1
- package/build/types/integrations/tracing/tedious.d.ts.map +0 -1
- /package/build/types/integrations/tracing/prisma/{vendor → vendored}/v5-tracing-helper.d.ts +0 -0
- /package/build/types/integrations/tracing/prisma/{vendor → vendored}/v6-tracing-helper.d.ts +0 -0
- /package/build/types-ts3.8/integrations/tracing/prisma/{vendor → vendored}/v5-tracing-helper.d.ts +0 -0
- /package/build/types-ts3.8/integrations/tracing/prisma/{vendor → vendored}/v6-tracing-helper.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semconv.js","sources":["../../../../../../src/integrations/tracing/mysql/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-mysql\n * - Upstream version: @opentelemetry/instrumentation-mysql@0.64.0\n */\n/* eslint-disable */\n\n/*\n * This file contains a copy of unstable semantic convention definitions\n * used by this package.\n * @see https://github.com/open-telemetry/opentelemetry-js/tree/main/semantic-conventions#unstable-semconv\n */\n\n/**\n * Deprecated, use `server.address`, `server.port` attributes instead.\n *\n * @example \"Server=(localdb)\\\\v11.0;Integrated Security=true;\"\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.address` and `server.port`.\n */\nexport const ATTR_DB_CONNECTION_STRING = 'db.connection_string' as const;\n\n/**\n * Deprecated, use `db.namespace` instead.\n *\n * @example customers\n * @example main\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.namespace`.\n */\nexport const ATTR_DB_NAME = 'db.name' as const;\n\n/**\n * The database statement being executed.\n *\n * @example SELECT * FROM wuser_table\n * @example SET mykey \"WuValue\"\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.query.text`.\n */\nexport const ATTR_DB_STATEMENT = 'db.statement' as const;\n\n/**\n * Deprecated, use `db.system.name` instead.\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.system.name`.\n */\nexport const ATTR_DB_SYSTEM = 'db.system' as const;\n\n/**\n * Deprecated, no replacement at this time.\n *\n * @example readonly_user\n * @example reporting_user\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Removed, no replacement at this time.\n */\nexport const ATTR_DB_USER = 'db.user' as const;\n\n/**\n * Deprecated, use `server.address` on client spans and `client.address` on server spans.\n *\n * @example example.com\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.address` on client spans and `client.address` on server spans.\n */\nexport const ATTR_NET_PEER_NAME = 'net.peer.name' as const;\n\n/**\n * Deprecated, use `server.port` on client spans and `client.port` on server spans.\n *\n * @example 8080\n *\n * @experimental This attribute is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `server.port` on client spans and `client.port` on server spans.\n */\nexport const ATTR_NET_PEER_PORT = 'net.peer.port' as const;\n\n/**\n * Enum value \"mysql\" for attribute {@link ATTR_DB_SYSTEM}.\n *\n * MySQL\n *\n * @experimental This enum value is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n */\nexport const DB_SYSTEM_VALUE_MYSQL = 'mysql' as const;\n\n/**\n * Deprecated, use `db.client.connection.count` instead.\n *\n * @experimental This metric is experimental and is subject to breaking changes in minor releases of `@opentelemetry/semantic-conventions`.\n *\n * @deprecated Replaced by `db.client.connection.count`.\n */\nexport const METRIC_DB_CLIENT_CONNECTIONS_USAGE = 'db.client.connections.usage' as const;\n"],"names":[],"mappings":";;AAoCO,MAAM,yBAAA,GAA4B;AAYlC,MAAM,YAAA,GAAe;AAYrB,MAAM,iBAAA,GAAoB;AAS1B,MAAM,cAAA,GAAiB;AAYvB,MAAM,YAAA,GAAe;AAWrB,MAAM,kBAAA,GAAqB;AAW3B,MAAM,kBAAA,GAAqB;AAS3B,MAAM,qBAAA,GAAwB;AAS9B,MAAM,kCAAA,GAAqC;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
function getConfig(config) {
|
|
4
|
+
const { host, port, database, user } = config && config.connectionConfig || config || {};
|
|
5
|
+
return { host, port, database, user };
|
|
6
|
+
}
|
|
7
|
+
function getJDBCString(host, port, database) {
|
|
8
|
+
let jdbcString = `jdbc:mysql://${host || "localhost"}`;
|
|
9
|
+
if (typeof port === "number") {
|
|
10
|
+
jdbcString += `:${port}`;
|
|
11
|
+
}
|
|
12
|
+
if (typeof database === "string") {
|
|
13
|
+
jdbcString += `/${database}`;
|
|
14
|
+
}
|
|
15
|
+
return jdbcString;
|
|
16
|
+
}
|
|
17
|
+
function getDbQueryText(query) {
|
|
18
|
+
if (typeof query === "string") {
|
|
19
|
+
return query;
|
|
20
|
+
} else {
|
|
21
|
+
return query.sql;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
function getDbValues(query, values) {
|
|
25
|
+
if (typeof query === "string") {
|
|
26
|
+
return arrayStringifyHelper(values);
|
|
27
|
+
} else {
|
|
28
|
+
return arrayStringifyHelper(values || query.values);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
function getSpanName(query) {
|
|
32
|
+
const rawQuery = typeof query === "object" ? query.sql : query;
|
|
33
|
+
const firstSpace = rawQuery?.indexOf(" ");
|
|
34
|
+
if (typeof firstSpace === "number" && firstSpace !== -1) {
|
|
35
|
+
return rawQuery?.substring(0, firstSpace);
|
|
36
|
+
}
|
|
37
|
+
return rawQuery;
|
|
38
|
+
}
|
|
39
|
+
function arrayStringifyHelper(arr) {
|
|
40
|
+
if (arr) return `[${arr.toString()}]`;
|
|
41
|
+
return "";
|
|
42
|
+
}
|
|
43
|
+
function getPoolNameOld(pool) {
|
|
44
|
+
const c = pool.config.connectionConfig;
|
|
45
|
+
let poolName = "";
|
|
46
|
+
poolName += c?.host ? `host: '${c.host}', ` : "";
|
|
47
|
+
poolName += c?.port ? `port: ${c.port}, ` : "";
|
|
48
|
+
poolName += c?.database ? `database: '${c.database}', ` : "";
|
|
49
|
+
poolName += c?.user ? `user: '${c.user}'` : "";
|
|
50
|
+
if (!c?.user) {
|
|
51
|
+
poolName = poolName.substring(0, poolName.length - 2);
|
|
52
|
+
}
|
|
53
|
+
return poolName.trim();
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
exports.arrayStringifyHelper = arrayStringifyHelper;
|
|
57
|
+
exports.getConfig = getConfig;
|
|
58
|
+
exports.getDbQueryText = getDbQueryText;
|
|
59
|
+
exports.getDbValues = getDbValues;
|
|
60
|
+
exports.getJDBCString = getJDBCString;
|
|
61
|
+
exports.getPoolNameOld = getPoolNameOld;
|
|
62
|
+
exports.getSpanName = getSpanName;
|
|
63
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../src/integrations/tracing/mysql/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-mysql\n * - Upstream version: @opentelemetry/instrumentation-mysql@0.64.0\n * - Types from the `mysql` package inlined as simplified interfaces\n */\n/* eslint-disable */\n\nimport type { Pool, Query, QueryOptions } from './mysql-types';\n\nexport function getConfig(config: any) {\n const { host, port, database, user } = (config && config.connectionConfig) || config || {};\n return { host, port, database, user };\n}\n\nexport function getJDBCString(host: string | undefined, port: number | undefined, database: string | undefined) {\n let jdbcString = `jdbc:mysql://${host || 'localhost'}`;\n\n if (typeof port === 'number') {\n jdbcString += `:${port}`;\n }\n\n if (typeof database === 'string') {\n jdbcString += `/${database}`;\n }\n\n return jdbcString;\n}\n\n/**\n * @returns the database query being executed.\n */\nexport function getDbQueryText(query: string | Query | QueryOptions): string {\n if (typeof query === 'string') {\n return query;\n } else {\n return query.sql;\n }\n}\n\nexport function getDbValues(query: string | Query | QueryOptions, values?: any[]): string {\n if (typeof query === 'string') {\n return arrayStringifyHelper(values);\n } else {\n // According to https://github.com/mysqljs/mysql#performing-queries\n // The values argument will override the values in the option object.\n return arrayStringifyHelper(values || query.values);\n }\n}\n\n/**\n * The span name SHOULD be set to a low cardinality value\n * representing the statement executed on the database.\n *\n * TODO: revisit span name based on https://github.com/open-telemetry/semantic-conventions/blob/v1.33.0/docs/database/database-spans.md#name\n *\n * @returns SQL statement without variable arguments or SQL verb\n */\nexport function getSpanName(query: string | Query | QueryOptions): string {\n const rawQuery = typeof query === 'object' ? query.sql : query;\n // Extract the SQL verb\n const firstSpace = rawQuery?.indexOf(' ');\n if (typeof firstSpace === 'number' && firstSpace !== -1) {\n return rawQuery?.substring(0, firstSpace);\n }\n return rawQuery;\n}\n\nexport function arrayStringifyHelper(arr: Array<unknown> | undefined): string {\n if (arr) return `[${arr.toString()}]`;\n return '';\n}\n\nexport function getPoolNameOld(pool: Pool): string {\n const c = pool.config.connectionConfig;\n let poolName = '';\n poolName += c?.host ? `host: '${c.host}', ` : '';\n poolName += c?.port ? `port: ${c.port}, ` : '';\n poolName += c?.database ? `database: '${c.database}', ` : '';\n poolName += c?.user ? `user: '${c.user}'` : '';\n if (!c?.user) {\n poolName = poolName.substring(0, poolName.length - 2); //omit last comma\n }\n return poolName.trim();\n}\n"],"names":[],"mappings":";;AAwBO,SAAS,UAAU,M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AAA,IAAY,UAAA,KAAe,EAAA,EAAI;AACvD,IAAA,OAAO,QAAA,EAAU,SAAA,CAAU,CAAA,EAAG,UAAU,CAAA;AAAA,EAC1C;AACA,EAAA,OAAO,QAAA;AACT;AAEO,SAAS,qBAAqB,GAAA,EAAyC;AAC5E,EAAA,IAAI,GAAA,EAAK,OAAO,CAAA,CAAA,EAAI,GAAA,CAAI,UAAU,CAAA,CAAA,CAAA;AAClC,EAAA,OAAO,EAAA;AACT;AAEO,SAAS,eAAe,IAAA,EAAoB;AACjD,EAAA,MAAM,CAAA,GAAI,KAAK,MAAA,CAAO,gBAAA;AACtB,EAAA,IAAI,QAAA,GAAW,EAAA;AACf,EAAA,QAAA,IAAY,CAAA,EAAG,IAAA,GAAO,CAAA,OAAA,EAAU,CAAA,CAAE,IAAI,CAAA,GAAA,CAAA,GAAQ,EAAA;AAC9C,EAAA,QAAA,IAAY,CAAA,EAAG,IAAA,GAAO,CAAA,MAAA,EAAS,CAAA,CAAE,IAAI,CAAA,EAAA,CAAA,GAAO,EAAA;AAC5C,EAAA,QAAA,IAAY,CAAA,EAAG,QAAA,GAAW,CAAA,WAAA,EAAc,CAAA,CAAE,QAAQ,CAAA,GAAA,CAAA,GAAQ,EAAA;AAC1D,EAAA,QAAA,IAAY,CAAA,EAAG,IAAA,GAAO,CAAA,OAAA,EAAU,CAAA,CAAE,IAAI,CAAA,CAAA,CAAA,GAAM,EAAA;AAC5C,EAAA,IAAI,CAAC,GAAG,IAAA,EAAM;AACZ,IAAA,QAAA,GAAW,QAAA,CAAS,SAAA,CAAU,CAAA,EAAG,QAAA,CAAS,SAAS,CAAC,CAAA;AAAA,EACtD;AACA,EAAA,OAAO,SAAS,IAAA,EAAK;AACvB;;;;;;;;;;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
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 = "Mysql2";
|
|
8
|
+
const instrumentMysql2 = nodeCore.generateInstrumentOnce(
|
|
9
|
+
INTEGRATION_NAME,
|
|
10
|
+
() => new instrumentation.MySQL2Instrumentation({
|
|
11
|
+
responseHook(span) {
|
|
12
|
+
nodeCore.addOriginToSpan(span, "auto.db.otel.mysql2");
|
|
13
|
+
}
|
|
14
|
+
})
|
|
15
|
+
);
|
|
16
|
+
const _mysql2Integration = (() => {
|
|
17
|
+
return {
|
|
18
|
+
name: INTEGRATION_NAME,
|
|
19
|
+
setupOnce() {
|
|
20
|
+
instrumentMysql2();
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
});
|
|
24
|
+
const mysql2Integration = core.defineIntegration(_mysql2Integration);
|
|
25
|
+
|
|
26
|
+
exports.instrumentMysql2 = instrumentMysql2;
|
|
27
|
+
exports.mysql2Integration = mysql2Integration;
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/mysql2/index.ts"],"sourcesContent":["import { MySQL2Instrumentation } from './vendored/instrumentation';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport { addOriginToSpan, generateInstrumentOnce } from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'Mysql2';\n\nexport const instrumentMysql2 = generateInstrumentOnce(\n INTEGRATION_NAME,\n () =>\n new MySQL2Instrumentation({\n responseHook(span) {\n addOriginToSpan(span, 'auto.db.otel.mysql2');\n },\n }),\n);\n\nconst _mysql2Integration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentMysql2();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [mysql2](https://www.npmjs.com/package/mysql2) library.\n *\n * For more information, see the [`mysql2Integration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mysql2/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.mysqlIntegration()],\n * });\n * ```\n */\nexport const mysql2Integration = defineIntegration(_mysql2Integration);\n"],"names":["generateInstrumentOnce","MySQL2Instrumentation","addOriginToSpan","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,gBAAA,GAAmB,QAAA;AAElB,MAAM,gBAAA,GAAmBA,+BAAA;AAAA,EAC9B,gBAAA;AAAA,EACA,MACE,IAAIC,qCAAA,CAAsB;AAAA,IACxB,aAAa,IAAA,EAAM;AACjB,MAAAC,wBAAA,CAAgB,MAAM,qBAAqB,CAAA;AAAA,IAC7C;AAAA,GACD;AACL;AAEA,MAAM,sBAAsB,MAAM;AAChC,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,gBAAA,EAAiB;AAAA,IACnB;AAAA,GACF;AACF,CAAA,CAAA;AAgBO,MAAM,iBAAA,GAAoBC,uBAAkB,kBAAkB;;;;;"}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const api = require('@opentelemetry/api');
|
|
4
|
+
const core = require('@sentry/core');
|
|
5
|
+
const instrumentation = require('@opentelemetry/instrumentation');
|
|
6
|
+
const semconv = require('./semconv.js');
|
|
7
|
+
const sqlCommon = require('../../utils/sql-common.js');
|
|
8
|
+
const utils = require('./utils.js');
|
|
9
|
+
const semanticConventions = require('@opentelemetry/semantic-conventions');
|
|
10
|
+
|
|
11
|
+
const PACKAGE_NAME = "@sentry/instrumentation-mysql2";
|
|
12
|
+
const supportedVersions = [">=1.4.2 <4"];
|
|
13
|
+
class MySQL2Instrumentation extends instrumentation.InstrumentationBase {
|
|
14
|
+
constructor(config = {}) {
|
|
15
|
+
super(PACKAGE_NAME, core.SDK_VERSION, config);
|
|
16
|
+
this._setSemconvStabilityFromEnv();
|
|
17
|
+
}
|
|
18
|
+
_setSemconvStabilityFromEnv() {
|
|
19
|
+
this._netSemconvStability = instrumentation.semconvStabilityFromStr("http", process.env.OTEL_SEMCONV_STABILITY_OPT_IN);
|
|
20
|
+
this._dbSemconvStability = instrumentation.semconvStabilityFromStr("database", process.env.OTEL_SEMCONV_STABILITY_OPT_IN);
|
|
21
|
+
}
|
|
22
|
+
init() {
|
|
23
|
+
let format;
|
|
24
|
+
function setFormatFunction(moduleExports) {
|
|
25
|
+
if (!format && moduleExports.format) {
|
|
26
|
+
format = moduleExports.format;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
const patch = (ConnectionPrototype) => {
|
|
30
|
+
if (instrumentation.isWrapped(ConnectionPrototype.query)) {
|
|
31
|
+
this._unwrap(ConnectionPrototype, "query");
|
|
32
|
+
}
|
|
33
|
+
this._wrap(ConnectionPrototype, "query", this._patchQuery(format, false));
|
|
34
|
+
if (instrumentation.isWrapped(ConnectionPrototype.execute)) {
|
|
35
|
+
this._unwrap(ConnectionPrototype, "execute");
|
|
36
|
+
}
|
|
37
|
+
this._wrap(ConnectionPrototype, "execute", this._patchQuery(format, true));
|
|
38
|
+
};
|
|
39
|
+
const unpatch = (ConnectionPrototype) => {
|
|
40
|
+
this._unwrap(ConnectionPrototype, "query");
|
|
41
|
+
this._unwrap(ConnectionPrototype, "execute");
|
|
42
|
+
};
|
|
43
|
+
return [
|
|
44
|
+
new instrumentation.InstrumentationNodeModuleDefinition(
|
|
45
|
+
"mysql2",
|
|
46
|
+
supportedVersions,
|
|
47
|
+
(moduleExports) => {
|
|
48
|
+
setFormatFunction(moduleExports);
|
|
49
|
+
return moduleExports;
|
|
50
|
+
},
|
|
51
|
+
() => {
|
|
52
|
+
},
|
|
53
|
+
[
|
|
54
|
+
new instrumentation.InstrumentationNodeModuleFile(
|
|
55
|
+
"mysql2/promise.js",
|
|
56
|
+
supportedVersions,
|
|
57
|
+
(moduleExports) => {
|
|
58
|
+
setFormatFunction(moduleExports);
|
|
59
|
+
return moduleExports;
|
|
60
|
+
},
|
|
61
|
+
() => {
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
new instrumentation.InstrumentationNodeModuleFile(
|
|
65
|
+
"mysql2/lib/connection.js",
|
|
66
|
+
supportedVersions,
|
|
67
|
+
(moduleExports) => {
|
|
68
|
+
const ConnectionPrototype = utils.getConnectionPrototypeToInstrument(moduleExports);
|
|
69
|
+
patch(ConnectionPrototype);
|
|
70
|
+
return moduleExports;
|
|
71
|
+
},
|
|
72
|
+
(moduleExports) => {
|
|
73
|
+
if (moduleExports === void 0) return;
|
|
74
|
+
const ConnectionPrototype = utils.getConnectionPrototypeToInstrument(moduleExports);
|
|
75
|
+
unpatch(ConnectionPrototype);
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
]
|
|
79
|
+
)
|
|
80
|
+
];
|
|
81
|
+
}
|
|
82
|
+
_patchQuery(format, isPrepared) {
|
|
83
|
+
return (originalQuery) => {
|
|
84
|
+
const thisPlugin = this;
|
|
85
|
+
return function query(query, _valuesOrCallback, _callback) {
|
|
86
|
+
let values;
|
|
87
|
+
if (Array.isArray(_valuesOrCallback)) {
|
|
88
|
+
values = _valuesOrCallback;
|
|
89
|
+
} else if (arguments[2]) {
|
|
90
|
+
values = [_valuesOrCallback];
|
|
91
|
+
}
|
|
92
|
+
const { maskStatement, maskStatementHook, responseHook } = thisPlugin.getConfig();
|
|
93
|
+
const attributes = utils.getConnectionAttributes(
|
|
94
|
+
this.config,
|
|
95
|
+
thisPlugin._dbSemconvStability,
|
|
96
|
+
thisPlugin._netSemconvStability
|
|
97
|
+
);
|
|
98
|
+
const dbQueryText = utils.getQueryText(query, format, values, maskStatement, maskStatementHook);
|
|
99
|
+
if (thisPlugin._dbSemconvStability & instrumentation.SemconvStability.OLD) {
|
|
100
|
+
attributes[semconv.ATTR_DB_SYSTEM] = semconv.DB_SYSTEM_VALUE_MYSQL;
|
|
101
|
+
attributes[semconv.ATTR_DB_STATEMENT] = dbQueryText;
|
|
102
|
+
}
|
|
103
|
+
if (thisPlugin._dbSemconvStability & instrumentation.SemconvStability.STABLE) {
|
|
104
|
+
attributes[semanticConventions.ATTR_DB_SYSTEM_NAME] = semanticConventions.DB_SYSTEM_NAME_VALUE_MYSQL;
|
|
105
|
+
attributes[semanticConventions.ATTR_DB_QUERY_TEXT] = dbQueryText;
|
|
106
|
+
}
|
|
107
|
+
const span = thisPlugin.tracer.startSpan(utils.getSpanName(query), {
|
|
108
|
+
kind: api.SpanKind.CLIENT,
|
|
109
|
+
attributes
|
|
110
|
+
});
|
|
111
|
+
if (!isPrepared && thisPlugin.getConfig().addSqlCommenterCommentToQueries) {
|
|
112
|
+
arguments[0] = query = typeof query === "string" ? sqlCommon.addSqlCommenterComment(span, query) : Object.assign(query, {
|
|
113
|
+
sql: sqlCommon.addSqlCommenterComment(span, query.sql)
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
const endSpan = utils.once((err, results) => {
|
|
117
|
+
if (err) {
|
|
118
|
+
span.setStatus({
|
|
119
|
+
code: api.SpanStatusCode.ERROR,
|
|
120
|
+
message: err.message
|
|
121
|
+
});
|
|
122
|
+
} else {
|
|
123
|
+
if (typeof responseHook === "function") {
|
|
124
|
+
instrumentation.safeExecuteInTheMiddle(
|
|
125
|
+
() => {
|
|
126
|
+
responseHook(span, {
|
|
127
|
+
queryResults: results
|
|
128
|
+
});
|
|
129
|
+
},
|
|
130
|
+
(err2) => {
|
|
131
|
+
if (err2) {
|
|
132
|
+
thisPlugin._diag.warn("Failed executing responseHook", err2);
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
true
|
|
136
|
+
);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
span.end();
|
|
140
|
+
});
|
|
141
|
+
if (arguments.length === 1) {
|
|
142
|
+
if (typeof query.onResult === "function") {
|
|
143
|
+
thisPlugin._wrap(query, "onResult", thisPlugin._patchCallbackQuery(endSpan));
|
|
144
|
+
}
|
|
145
|
+
const streamableQuery = originalQuery.apply(this, arguments);
|
|
146
|
+
streamableQuery.once("error", (err) => {
|
|
147
|
+
endSpan(err);
|
|
148
|
+
}).once("result", (results) => {
|
|
149
|
+
endSpan(void 0, results);
|
|
150
|
+
});
|
|
151
|
+
return streamableQuery;
|
|
152
|
+
}
|
|
153
|
+
if (typeof arguments[1] === "function") {
|
|
154
|
+
thisPlugin._wrap(arguments, 1, thisPlugin._patchCallbackQuery(endSpan));
|
|
155
|
+
} else if (typeof arguments[2] === "function") {
|
|
156
|
+
thisPlugin._wrap(arguments, 2, thisPlugin._patchCallbackQuery(endSpan));
|
|
157
|
+
}
|
|
158
|
+
return originalQuery.apply(this, arguments);
|
|
159
|
+
};
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
_patchCallbackQuery(endSpan) {
|
|
163
|
+
return (originalCallback) => {
|
|
164
|
+
return function(err, results, _fields) {
|
|
165
|
+
endSpan(err, results);
|
|
166
|
+
return originalCallback(...arguments);
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
exports.MySQL2Instrumentation = MySQL2Instrumentation;
|
|
173
|
+
//# sourceMappingURL=instrumentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentation.js","sources":["../../../../../../src/integrations/tracing/mysql2/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-mysql2\n * - Upstream version: @opentelemetry/instrumentation-mysql2@0.64.0\n * - Types from 'mysql2' inlined as simplified interfaces\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 {\n InstrumentationBase,\n InstrumentationNodeModuleDefinition,\n InstrumentationNodeModuleFile,\n isWrapped,\n safeExecuteInTheMiddle,\n SemconvStability,\n semconvStabilityFromStr,\n} from '@opentelemetry/instrumentation';\nimport { DB_SYSTEM_VALUE_MYSQL, ATTR_DB_STATEMENT, ATTR_DB_SYSTEM } from './semconv';\nimport { addSqlCommenterComment } from '../../utils/sql-common';\nimport type { Connection, Query, QueryOptions, QueryError, FieldPacket, FormatFunction } from './mysql2-types';\nimport { MySQL2InstrumentationConfig } from './types';\nimport { getConnectionAttributes, getConnectionPrototypeToInstrument, getQueryText, getSpanName, once } from './utils';\nimport {\n ATTR_DB_QUERY_TEXT,\n ATTR_DB_SYSTEM_NAME,\n DB_SYSTEM_NAME_VALUE_MYSQL,\n} from '@opentelemetry/semantic-conventions';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-mysql2';\n\nconst supportedVersions = ['>=1.4.2 <4'];\n\nexport class MySQL2Instrumentation extends InstrumentationBase<MySQL2InstrumentationConfig> {\n private _netSemconvStability!: SemconvStability;\n private _dbSemconvStability!: SemconvStability;\n\n constructor(config: MySQL2InstrumentationConfig = {}) {\n super(PACKAGE_NAME, SDK_VERSION, config);\n this._setSemconvStabilityFromEnv();\n }\n\n private _setSemconvStabilityFromEnv() {\n this._netSemconvStability = semconvStabilityFromStr('http', process.env.OTEL_SEMCONV_STABILITY_OPT_IN);\n this._dbSemconvStability = semconvStabilityFromStr('database', process.env.OTEL_SEMCONV_STABILITY_OPT_IN);\n }\n\n protected init() {\n let format: FormatFunction | undefined;\n function setFormatFunction(moduleExports: any) {\n if (!format && moduleExports.format) {\n format = moduleExports.format;\n }\n }\n const patch = (ConnectionPrototype: Connection) => {\n if (isWrapped(ConnectionPrototype.query)) {\n this._unwrap(ConnectionPrototype, 'query');\n }\n this._wrap(ConnectionPrototype, 'query', this._patchQuery(format, false) as any);\n if (isWrapped(ConnectionPrototype.execute)) {\n this._unwrap(ConnectionPrototype, 'execute');\n }\n this._wrap(ConnectionPrototype, 'execute', this._patchQuery(format, true) as any);\n };\n const unpatch = (ConnectionPrototype: Connection) => {\n this._unwrap(ConnectionPrototype, 'query');\n this._unwrap(ConnectionPrototype, 'execute');\n };\n return [\n new InstrumentationNodeModuleDefinition(\n 'mysql2',\n supportedVersions,\n (moduleExports: any) => {\n setFormatFunction(moduleExports);\n return moduleExports;\n },\n () => {},\n [\n new InstrumentationNodeModuleFile(\n 'mysql2/promise.js',\n supportedVersions,\n (moduleExports: any) => {\n setFormatFunction(moduleExports);\n return moduleExports;\n },\n () => {},\n ),\n new InstrumentationNodeModuleFile(\n 'mysql2/lib/connection.js',\n supportedVersions,\n (moduleExports: any) => {\n const ConnectionPrototype: Connection = getConnectionPrototypeToInstrument(moduleExports);\n patch(ConnectionPrototype);\n return moduleExports;\n },\n (moduleExports: any) => {\n if (moduleExports === undefined) return;\n const ConnectionPrototype: Connection = getConnectionPrototypeToInstrument(moduleExports);\n unpatch(ConnectionPrototype);\n },\n ),\n ],\n ),\n ];\n }\n\n private _patchQuery(format: FormatFunction | undefined, isPrepared: boolean) {\n return (originalQuery: Function): Function => {\n const thisPlugin = this;\n return function query(\n this: Connection,\n query: string | Query | QueryOptions,\n _valuesOrCallback?: unknown[] | Function,\n _callback?: Function,\n ) {\n let values;\n if (Array.isArray(_valuesOrCallback)) {\n values = _valuesOrCallback;\n } else if (arguments[2]) {\n values = [_valuesOrCallback];\n }\n const { maskStatement, maskStatementHook, responseHook } = thisPlugin.getConfig();\n\n const attributes: api.Attributes = getConnectionAttributes(\n this.config,\n thisPlugin._dbSemconvStability,\n thisPlugin._netSemconvStability,\n );\n const dbQueryText = getQueryText(query, format, values, maskStatement, maskStatementHook);\n if (thisPlugin._dbSemconvStability & SemconvStability.OLD) {\n attributes[ATTR_DB_SYSTEM] = DB_SYSTEM_VALUE_MYSQL;\n attributes[ATTR_DB_STATEMENT] = dbQueryText;\n }\n if (thisPlugin._dbSemconvStability & SemconvStability.STABLE) {\n attributes[ATTR_DB_SYSTEM_NAME] = DB_SYSTEM_NAME_VALUE_MYSQL;\n attributes[ATTR_DB_QUERY_TEXT] = dbQueryText;\n }\n\n const span = thisPlugin.tracer.startSpan(getSpanName(query), {\n kind: api.SpanKind.CLIENT,\n attributes,\n });\n\n if (!isPrepared && thisPlugin.getConfig().addSqlCommenterCommentToQueries) {\n arguments[0] = query =\n typeof query === 'string'\n ? addSqlCommenterComment(span, query)\n : Object.assign(query, {\n sql: addSqlCommenterComment(span, query.sql),\n });\n }\n\n const endSpan = once((err?: any, results?: any) => {\n if (err) {\n span.setStatus({\n code: api.SpanStatusCode.ERROR,\n message: err.message,\n });\n } else {\n if (typeof responseHook === 'function') {\n safeExecuteInTheMiddle(\n () => {\n responseHook(span, {\n queryResults: results,\n });\n },\n err => {\n if (err) {\n thisPlugin._diag.warn('Failed executing responseHook', err);\n }\n },\n true,\n );\n }\n }\n\n span.end();\n });\n\n if (arguments.length === 1) {\n if (typeof (query as any).onResult === 'function') {\n thisPlugin._wrap(query as any, 'onResult', thisPlugin._patchCallbackQuery(endSpan));\n }\n\n const streamableQuery: Query = originalQuery.apply(this, arguments);\n\n streamableQuery\n .once('error', (err: any) => {\n endSpan(err);\n })\n .once('result', (results: any) => {\n endSpan(undefined, results);\n });\n\n return streamableQuery;\n }\n\n if (typeof arguments[1] === 'function') {\n thisPlugin._wrap(arguments, 1, thisPlugin._patchCallbackQuery(endSpan));\n } else if (typeof arguments[2] === 'function') {\n thisPlugin._wrap(arguments, 2, thisPlugin._patchCallbackQuery(endSpan));\n }\n\n return originalQuery.apply(this, arguments);\n };\n };\n }\n\n private _patchCallbackQuery(endSpan: Function) {\n return (originalCallback: Function) => {\n return function (err: QueryError | null, results?: any, _fields?: FieldPacket[]) {\n endSpan(err, results);\n return originalCallback(...arguments);\n };\n };\n }\n}\n"],"names":["InstrumentationBase","SDK_VERSION","semconvStabilityFromStr","isWrapped","InstrumentationNodeModuleDefinition","InstrumentationNodeModuleFile","getConnectionPrototypeToInstrument","getConnectionAttributes","getQueryText","SemconvStability","ATTR_DB_SYSTEM","DB_SYSTEM_VALUE_MYSQL","ATTR_DB_STATEMENT","ATTR_DB_SYSTEM_NAME","DB_SYSTEM_NAME_VALUE_MYSQL","ATTR_DB_QUERY_TEXT","getSpanName","addSqlCommenterComment","once","safeExecuteInTheMiddle","err"],"mappings":";;;;;;;;;;AA6CA,MAAM,YAAA,GAAe,gCAAA;AAErB,MAAM,iBAAA,GAAoB,CAAC,YAAY,CAAA;AAEhC,MAAM,8BAA8BA,mCAAA,CAAiD;AAAA,EAI1F,WAAA,CAAY,MAAA,GAAsC,EAAC,EAAG;AACpD,IAAA,KAAA,CAAM,YAAA,EAAcC,kBAAa,MAAM,CAAA;AACvC,IAAA,IAAA,CAAK,2BAAA,EAA4B;AAAA,EACnC;AAAA,EAEQ,2BAAA,GAA8B;AACpC,IAAA,IAAA,CAAK,oBAAA,GAAuBC,uCAAA,CAAwB,MAAA,EAAQ,OAAA,CAAQ,IAAI,6BAA6B,CAAA;AACrG,IAAA,IAAA,CAAK,mBAAA,GAAsBA,uCAAA,CAAwB,UAAA,EAAY,OAAA,CAAQ,IAAI,6BAA6B,CAAA;AAAA,EAC1G;AAAA,EAEU,IAAA,GAAO;AACf,IAAA,IAAI,MAAA;AACJ,IAAA,SAAS,kBAAkB,aAAA,EAAoB;AAC7C,MAAA,IAAI,CAAC,MAAA,IAAU,aAAA,CAAc,MAAA,EAAQ;AACnC,QAAA,MAAA,GAAS,aAAA,CAAc,MAAA;AAAA,MACzB;AAA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,KAAA,CAAM,IAAA,EAAM,SAAS,CAAA;AAAA,MAC5C,CAAA;AAAA,IACF,CAAA;AAAA,EACF;AAAA,EAEQ,oBAAoB,OAAA,EAAmB;AAC7C,IAAA,OAAO,CAAC,gBAAA,KAA+B;AACrC,MAAA,OAAO,SAAU,GAAA,EAAwB,OAAA,EAAe,OAAA,EAAyB;AAC/E,QAAA,OAAA,CAAQ,KAAK,OAAO,CAAA;AACpB,QAAA,OAAO,gBAAA,CAAiB,GAAG,SAAS,CAAA;AAAA,MACtC,CAAA;AAAA,IACF,CAAA;AAAA,EACF;AACF;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const ATTR_DB_CONNECTION_STRING = "db.connection_string";
|
|
4
|
+
const ATTR_DB_NAME = "db.name";
|
|
5
|
+
const ATTR_DB_STATEMENT = "db.statement";
|
|
6
|
+
const ATTR_DB_SYSTEM = "db.system";
|
|
7
|
+
const ATTR_DB_USER = "db.user";
|
|
8
|
+
const ATTR_NET_PEER_NAME = "net.peer.name";
|
|
9
|
+
const ATTR_NET_PEER_PORT = "net.peer.port";
|
|
10
|
+
const DB_SYSTEM_VALUE_MYSQL = "mysql";
|
|
11
|
+
|
|
12
|
+
exports.ATTR_DB_CONNECTION_STRING = ATTR_DB_CONNECTION_STRING;
|
|
13
|
+
exports.ATTR_DB_NAME = ATTR_DB_NAME;
|
|
14
|
+
exports.ATTR_DB_STATEMENT = ATTR_DB_STATEMENT;
|
|
15
|
+
exports.ATTR_DB_SYSTEM = ATTR_DB_SYSTEM;
|
|
16
|
+
exports.ATTR_DB_USER = ATTR_DB_USER;
|
|
17
|
+
exports.ATTR_NET_PEER_NAME = ATTR_NET_PEER_NAME;
|
|
18
|
+
exports.ATTR_NET_PEER_PORT = ATTR_NET_PEER_PORT;
|
|
19
|
+
exports.DB_SYSTEM_VALUE_MYSQL = DB_SYSTEM_VALUE_MYSQL;
|
|
20
|
+
//# sourceMappingURL=semconv.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semconv.js","sources":["../../../../../../src/integrations/tracing/mysql2/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-mysql2\n * - Upstream version: @opentelemetry/instrumentation-mysql2@0.64.0\n */\n/* eslint-disable */\n\nexport const ATTR_DB_CONNECTION_STRING = 'db.connection_string' as const;\nexport const ATTR_DB_NAME = 'db.name' as const;\nexport const ATTR_DB_STATEMENT = 'db.statement' as const;\nexport const ATTR_DB_SYSTEM = 'db.system' as const;\nexport const ATTR_DB_USER = 'db.user' as const;\nexport const ATTR_NET_PEER_NAME = 'net.peer.name' as const;\nexport const ATTR_NET_PEER_PORT = 'net.peer.port' as const;\nexport const DB_SYSTEM_VALUE_MYSQL = 'mysql' as const;\n"],"names":[],"mappings":";;AAqBO,MAAM,yBAAA,GAA4B;AAClC,MAAM,YAAA,GAAe;AACrB,MAAM,iBAAA,GAAoB;AAC1B,MAAM,cAAA,GAAiB;AACvB,MAAM,YAAA,GAAe;AACrB,MAAM,kBAAA,GAAqB;AAC3B,MAAM,kBAAA,GAAqB;AAC3B,MAAM,qBAAA,GAAwB;;;;;;;;;;;"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const semconv = require('./semconv.js');
|
|
4
|
+
const instrumentation = require('@opentelemetry/instrumentation');
|
|
5
|
+
const semanticConventions = require('@opentelemetry/semantic-conventions');
|
|
6
|
+
|
|
7
|
+
function getConnectionAttributes(config, dbSemconvStability, netSemconvStability) {
|
|
8
|
+
const { host, port, database, user } = getConfig(config);
|
|
9
|
+
const attrs = {};
|
|
10
|
+
if (dbSemconvStability & instrumentation.SemconvStability.OLD) {
|
|
11
|
+
attrs[semconv.ATTR_DB_CONNECTION_STRING] = getJDBCString(host, port, database);
|
|
12
|
+
attrs[semconv.ATTR_DB_NAME] = database;
|
|
13
|
+
attrs[semconv.ATTR_DB_USER] = user;
|
|
14
|
+
}
|
|
15
|
+
if (dbSemconvStability & instrumentation.SemconvStability.STABLE) {
|
|
16
|
+
attrs[semanticConventions.ATTR_DB_NAMESPACE] = database;
|
|
17
|
+
}
|
|
18
|
+
const portNumber = parseInt(port, 10);
|
|
19
|
+
if (netSemconvStability & instrumentation.SemconvStability.OLD) {
|
|
20
|
+
attrs[semconv.ATTR_NET_PEER_NAME] = host;
|
|
21
|
+
if (!isNaN(portNumber)) {
|
|
22
|
+
attrs[semconv.ATTR_NET_PEER_PORT] = portNumber;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (netSemconvStability & instrumentation.SemconvStability.STABLE) {
|
|
26
|
+
attrs[semanticConventions.ATTR_SERVER_ADDRESS] = host;
|
|
27
|
+
if (!isNaN(portNumber)) {
|
|
28
|
+
attrs[semanticConventions.ATTR_SERVER_PORT] = portNumber;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return attrs;
|
|
32
|
+
}
|
|
33
|
+
function getConfig(config) {
|
|
34
|
+
const { host, port, database, user } = config && config.connectionConfig || config || {};
|
|
35
|
+
return { host, port, database, user };
|
|
36
|
+
}
|
|
37
|
+
function getJDBCString(host, port, database) {
|
|
38
|
+
let jdbcString = `jdbc:mysql://${host || "localhost"}`;
|
|
39
|
+
if (typeof port === "number") {
|
|
40
|
+
jdbcString += `:${port}`;
|
|
41
|
+
}
|
|
42
|
+
if (typeof database === "string") {
|
|
43
|
+
jdbcString += `/${database}`;
|
|
44
|
+
}
|
|
45
|
+
return jdbcString;
|
|
46
|
+
}
|
|
47
|
+
function getQueryText(query, format, values, maskStatement = false, maskStatementHook = defaultMaskingHook) {
|
|
48
|
+
const [querySql, queryValues] = typeof query === "string" ? [query, values] : [query.sql, hasValues(query) ? values || query.values : values];
|
|
49
|
+
try {
|
|
50
|
+
if (maskStatement) {
|
|
51
|
+
return maskStatementHook(querySql);
|
|
52
|
+
} else if (format && queryValues) {
|
|
53
|
+
return format(querySql, queryValues);
|
|
54
|
+
} else {
|
|
55
|
+
return querySql;
|
|
56
|
+
}
|
|
57
|
+
} catch (e) {
|
|
58
|
+
return "Could not determine the query due to an error in masking or formatting";
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function defaultMaskingHook(query) {
|
|
62
|
+
return query.replace(/\b\d+\b/g, "?").replace(/(["'])(?:(?=(\\?))\2.)*?\1/g, "?");
|
|
63
|
+
}
|
|
64
|
+
function hasValues(obj) {
|
|
65
|
+
return "values" in obj;
|
|
66
|
+
}
|
|
67
|
+
function getSpanName(query) {
|
|
68
|
+
const rawQuery = typeof query === "object" ? query.sql : query;
|
|
69
|
+
const firstSpace = rawQuery?.indexOf(" ");
|
|
70
|
+
if (typeof firstSpace === "number" && firstSpace !== -1) {
|
|
71
|
+
return rawQuery?.substring(0, firstSpace);
|
|
72
|
+
}
|
|
73
|
+
return rawQuery;
|
|
74
|
+
}
|
|
75
|
+
const once = (fn) => {
|
|
76
|
+
let called = false;
|
|
77
|
+
return (...args) => {
|
|
78
|
+
if (called) return;
|
|
79
|
+
called = true;
|
|
80
|
+
return fn(...args);
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
function getConnectionPrototypeToInstrument(connection) {
|
|
84
|
+
const connectionPrototype = connection.prototype;
|
|
85
|
+
const basePrototype = Object.getPrototypeOf(connectionPrototype);
|
|
86
|
+
if (typeof basePrototype?.query === "function" && typeof basePrototype?.execute === "function") {
|
|
87
|
+
return basePrototype;
|
|
88
|
+
}
|
|
89
|
+
return connectionPrototype;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
exports.getConnectionAttributes = getConnectionAttributes;
|
|
93
|
+
exports.getConnectionPrototypeToInstrument = getConnectionPrototypeToInstrument;
|
|
94
|
+
exports.getQueryText = getQueryText;
|
|
95
|
+
exports.getSpanName = getSpanName;
|
|
96
|
+
exports.once = once;
|
|
97
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../src/integrations/tracing/mysql2/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-mysql2\n * - Upstream version: @opentelemetry/instrumentation-mysql2@0.64.0\n * - Types from 'mysql2' inlined as simplified interfaces\n */\n/* eslint-disable */\n\nimport { Attributes } from '@opentelemetry/api';\nimport {\n ATTR_DB_CONNECTION_STRING,\n ATTR_DB_NAME,\n ATTR_DB_USER,\n ATTR_NET_PEER_NAME,\n ATTR_NET_PEER_PORT,\n} from './semconv';\nimport type { FormatFunction } from './mysql2-types';\nimport { MySQL2InstrumentationQueryMaskingHook } from './types';\nimport { SemconvStability } from '@opentelemetry/instrumentation';\nimport { ATTR_DB_NAMESPACE, ATTR_SERVER_ADDRESS, ATTR_SERVER_PORT } from '@opentelemetry/semantic-conventions';\n\ninterface QueryOptions {\n sql: string;\n values?: any | any[] | { [param: string]: any };\n}\n\ninterface Query {\n sql: string;\n}\n\ninterface Config {\n host?: string;\n port?: number;\n database?: string;\n user?: string;\n connectionConfig?: Config;\n}\n\nexport function getConnectionAttributes(\n config: Config,\n dbSemconvStability: SemconvStability,\n netSemconvStability: SemconvStability,\n): Attributes {\n const { host, port, database, user } = getConfig(config);\n\n const attrs: Attributes = {};\n if (dbSemconvStability & SemconvStability.OLD) {\n attrs[ATTR_DB_CONNECTION_STRING] = getJDBCString(host, port, database);\n attrs[ATTR_DB_NAME] = database;\n attrs[ATTR_DB_USER] = user;\n }\n if (dbSemconvStability & SemconvStability.STABLE) {\n attrs[ATTR_DB_NAMESPACE] = database;\n }\n\n const portNumber = parseInt(port, 10);\n if (netSemconvStability & SemconvStability.OLD) {\n attrs[ATTR_NET_PEER_NAME] = host;\n if (!isNaN(portNumber)) {\n attrs[ATTR_NET_PEER_PORT] = portNumber;\n }\n }\n if (netSemconvStability & SemconvStability.STABLE) {\n attrs[ATTR_SERVER_ADDRESS] = host;\n if (!isNaN(portNumber)) {\n attrs[ATTR_SERVER_PORT] = portNumber;\n }\n }\n\n return attrs;\n}\n\nfunction getConfig(config: any) {\n const { host, port, database, user } = (config && config.connectionConfig) || config || {};\n return { host, port, database, user };\n}\n\nfunction getJDBCString(host: string | undefined, port: number | undefined, database: string | undefined) {\n let jdbcString = `jdbc:mysql://${host || 'localhost'}`;\n\n if (typeof port === 'number') {\n jdbcString += `:${port}`;\n }\n\n if (typeof database === 'string') {\n jdbcString += `/${database}`;\n }\n\n return jdbcString;\n}\n\nexport function getQueryText(\n query: string | Query | QueryOptions,\n format?: FormatFunction,\n values?: any[],\n maskStatement = false,\n maskStatementHook: MySQL2InstrumentationQueryMaskingHook = defaultMaskingHook,\n): string {\n const [querySql, queryValues] =\n typeof query === 'string' ? [query, values] : [query.sql, hasValues(query) ? values || query.values : values];\n try {\n if (maskStatement) {\n return maskStatementHook(querySql);\n } else if (format && queryValues) {\n return format(querySql, queryValues);\n } else {\n return querySql;\n }\n } catch (e) {\n return 'Could not determine the query due to an error in masking or formatting';\n }\n}\n\nfunction defaultMaskingHook(query: string): string {\n return query.replace(/\\b\\d+\\b/g, '?').replace(/([\"'])(?:(?=(\\\\?))\\2.)*?\\1/g, '?');\n}\n\nfunction hasValues(obj: Query | QueryOptions): obj is QueryOptions {\n return 'values' in obj;\n}\n\nexport function getSpanName(query: string | Query | QueryOptions): string {\n const rawQuery = typeof query === 'object' ? query.sql : query;\n const firstSpace = rawQuery?.indexOf(' ');\n if (typeof firstSpace === 'number' && firstSpace !== -1) {\n return rawQuery?.substring(0, firstSpace);\n }\n return rawQuery;\n}\n\nexport const once = (fn: Function) => {\n let called = false;\n return (...args: unknown[]) => {\n if (called) return;\n called = true;\n return fn(...args);\n };\n};\n\nexport function getConnectionPrototypeToInstrument(connection: any) {\n const connectionPrototype = connection.prototype;\n const basePrototype = Object.getPrototypeOf(connectionPrototype);\n\n if (typeof basePrototype?.query === 'function' && typeof basePrototype?.execute === 'function') {\n return basePrototype;\n }\n\n return connectionPrototype;\n}\n"],"names":["SemconvStability","ATTR_DB_CONNECTION_STRING","ATTR_DB_NAME","ATTR_DB_USER","ATTR_DB_NAMESPACE","ATTR_NET_PEER_NAME","ATTR_NET_PEER_PORT","ATTR_SERVER_ADDRESS","ATTR_SERVER_PORT"],"mappings":";;;;;;AAoDO,SAAS,uBAAA,CACd,MAAA,EACA,kBAAA,EACA,mBAAA,EACY;AACZ,EAAA,MAAM,EAAE,IAAA,EAAM,IAAA,EAAM,UAAU,IAAA,EAAK,GAAI,UAAU,MAAM,CAAA;AAEvD,EAAA,MAAM,QAAoB,EAAC;AAC3B,EAAA,IAAI,kBAAA,GAAqBA,iCAAiB,GAAA,EAAK;AAC7C,IAAA,KAAA,CAAMC,iCAAyB,CAAA,GAAI,a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ACxC,EAAA,IAAI,OAAO,UAAA,KAAe,QAAA,IAAY,UAAA,KAAe,EAAA,EAAI;AACvD,IAAA,OAAO,QAAA,EAAU,SAAA,CAAU,CAAA,EAAG,UAAU,CAAA;AAAA,EAC1C;AACA,EAAA,OAAO,QAAA;AACT;AAEO,MAAM,IAAA,GAAO,CAAC,EAAA,KAAiB;AACpC,EAAA,IAAI,MAAA,GAAS,KAAA;AACb,EAAA,OAAO,IAAI,IAAA,KAAoB;AAC7B,IAAA,IAAI,MAAA,EAAQ;AACZ,IAAA,MAAA,GAAS,IAAA;AACT,IAAA,OAAO,EAAA,CAAG,GAAG,IAAI,CAAA;AAAA,EACnB,CAAA;AACF;AAEO,SAAS,mCAAmC,UAAA,EAAiB;AAClE,EAAA,MAAM,sBAAsB,UAAA,CAAW,SAAA;AACvC,EAAA,MAAM,aAAA,GAAgB,MAAA,CAAO,cAAA,CAAe,mBAAmB,CAAA;AAE/D,EAAA,IAAI,OAAO,aAAA,EAAe,KAAA,KAAU,cAAc,OAAO,aAAA,EAAe,YAAY,UAAA,EAAY;AAC9F,IAAA,OAAO,aAAA;AAAA,EACT;AAEA,EAAA,OAAO,mBAAA;AACT;;;;;;;;"}
|
|
@@ -6,71 +6,16 @@ const instrumentation = require('./instrumentation.js');
|
|
|
6
6
|
|
|
7
7
|
const instrumentOpenAi = nodeCore.generateInstrumentOnce(
|
|
8
8
|
core.OPENAI_INTEGRATION_NAME,
|
|
9
|
-
options => new instrumentation.SentryOpenAiInstrumentation(options)
|
|
9
|
+
(options) => new instrumentation.SentryOpenAiInstrumentation(options)
|
|
10
10
|
);
|
|
11
|
-
|
|
12
11
|
const _openAiIntegration = ((options = {}) => {
|
|
13
12
|
return {
|
|
14
13
|
name: core.OPENAI_INTEGRATION_NAME,
|
|
15
14
|
setupOnce() {
|
|
16
15
|
instrumentOpenAi(options);
|
|
17
|
-
}
|
|
16
|
+
}
|
|
18
17
|
};
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* Adds Sentry tracing instrumentation for the OpenAI SDK.
|
|
23
|
-
*
|
|
24
|
-
* This integration is enabled by default.
|
|
25
|
-
*
|
|
26
|
-
* When configured, this integration automatically instruments OpenAI SDK client instances
|
|
27
|
-
* to capture telemetry data following OpenTelemetry Semantic Conventions for Generative AI.
|
|
28
|
-
*
|
|
29
|
-
* @example
|
|
30
|
-
* ```javascript
|
|
31
|
-
* import * as Sentry from '@sentry/node';
|
|
32
|
-
*
|
|
33
|
-
* Sentry.init({
|
|
34
|
-
* integrations: [Sentry.openAIIntegration()],
|
|
35
|
-
* });
|
|
36
|
-
* ```
|
|
37
|
-
*
|
|
38
|
-
* ## Options
|
|
39
|
-
*
|
|
40
|
-
* - `recordInputs`: Whether to record prompt messages (default: respects `sendDefaultPii` client option)
|
|
41
|
-
* - `recordOutputs`: Whether to record response text (default: respects `sendDefaultPii` client option)
|
|
42
|
-
*
|
|
43
|
-
* ### Default Behavior
|
|
44
|
-
*
|
|
45
|
-
* By default, the integration will:
|
|
46
|
-
* - Record inputs and outputs ONLY if `sendDefaultPii` is set to `true` in your Sentry client options
|
|
47
|
-
* - Otherwise, inputs and outputs are NOT recorded unless explicitly enabled
|
|
48
|
-
*
|
|
49
|
-
* @example
|
|
50
|
-
* ```javascript
|
|
51
|
-
* // Record inputs and outputs when sendDefaultPii is false
|
|
52
|
-
* Sentry.init({
|
|
53
|
-
* integrations: [
|
|
54
|
-
* Sentry.openAIIntegration({
|
|
55
|
-
* recordInputs: true,
|
|
56
|
-
* recordOutputs: true
|
|
57
|
-
* })
|
|
58
|
-
* ],
|
|
59
|
-
* });
|
|
60
|
-
*
|
|
61
|
-
* // Never record inputs/outputs regardless of sendDefaultPii
|
|
62
|
-
* Sentry.init({
|
|
63
|
-
* sendDefaultPii: true,
|
|
64
|
-
* integrations: [
|
|
65
|
-
* Sentry.openAIIntegration({
|
|
66
|
-
* recordInputs: false,
|
|
67
|
-
* recordOutputs: false
|
|
68
|
-
* })
|
|
69
|
-
* ],
|
|
70
|
-
* });
|
|
71
|
-
* ```
|
|
72
|
-
*
|
|
73
|
-
*/
|
|
18
|
+
});
|
|
74
19
|
const openAIIntegration = core.defineIntegration(_openAiIntegration);
|
|
75
20
|
|
|
76
21
|
exports.instrumentOpenAi = instrumentOpenAi;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/openai/index.ts"],"sourcesContent":["import type { IntegrationFn, OpenAiOptions } from '@sentry/core';\nimport { defineIntegration, OPENAI_INTEGRATION_NAME } from '@sentry/core';\nimport { generateInstrumentOnce } from '@sentry/node-core';\nimport { SentryOpenAiInstrumentation } from './instrumentation';\n\nexport const instrumentOpenAi = generateInstrumentOnce<OpenAiOptions>(\n OPENAI_INTEGRATION_NAME,\n options => new SentryOpenAiInstrumentation(options),\n);\n\nconst _openAiIntegration = ((options: OpenAiOptions = {}) => {\n return {\n name: OPENAI_INTEGRATION_NAME,\n setupOnce() {\n instrumentOpenAi(options);\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the OpenAI SDK.\n *\n * This integration is enabled by default.\n *\n * When configured, this integration automatically instruments OpenAI SDK client instances\n * to capture telemetry data following OpenTelemetry Semantic Conventions for Generative AI.\n *\n * @example\n * ```javascript\n * import * as Sentry from '@sentry/node';\n *\n * Sentry.init({\n * integrations: [Sentry.openAIIntegration()],\n * });\n * ```\n *\n * ## Options\n *\n * - `recordInputs`: Whether to record prompt messages (default: respects `sendDefaultPii` client option)\n * - `recordOutputs`: Whether to record response text (default: respects `sendDefaultPii` client option)\n *\n * ### Default Behavior\n *\n * By default, the integration will:\n * - Record inputs and outputs ONLY if `sendDefaultPii` is set to `true` in your Sentry client options\n * - Otherwise, inputs and outputs are NOT recorded unless explicitly enabled\n *\n * @example\n * ```javascript\n * // Record inputs and outputs when sendDefaultPii is false\n * Sentry.init({\n * integrations: [\n * Sentry.openAIIntegration({\n * recordInputs: true,\n * recordOutputs: true\n * })\n * ],\n * });\n *\n * // Never record inputs/outputs regardless of sendDefaultPii\n * Sentry.init({\n * sendDefaultPii: true,\n * integrations: [\n * Sentry.openAIIntegration({\n * recordInputs: false,\n * recordOutputs: false\n * })\n * ],\n * });\n * ```\n *\n */\nexport const openAIIntegration = defineIntegration(_openAiIntegration);\n"],"names":["generateInstrumentOnce","OPENAI_INTEGRATION_NAME","SentryOpenAiInstrumentation","defineIntegration"],"mappings":";;;;;;AAKO,MAAM,gBAAA,GAAmBA,+
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/openai/index.ts"],"sourcesContent":["import type { IntegrationFn, OpenAiOptions } from '@sentry/core';\nimport { defineIntegration, OPENAI_INTEGRATION_NAME } from '@sentry/core';\nimport { generateInstrumentOnce } from '@sentry/node-core';\nimport { SentryOpenAiInstrumentation } from './instrumentation';\n\nexport const instrumentOpenAi = generateInstrumentOnce<OpenAiOptions>(\n OPENAI_INTEGRATION_NAME,\n options => new SentryOpenAiInstrumentation(options),\n);\n\nconst _openAiIntegration = ((options: OpenAiOptions = {}) => {\n return {\n name: OPENAI_INTEGRATION_NAME,\n setupOnce() {\n instrumentOpenAi(options);\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the OpenAI SDK.\n *\n * This integration is enabled by default.\n *\n * When configured, this integration automatically instruments OpenAI SDK client instances\n * to capture telemetry data following OpenTelemetry Semantic Conventions for Generative AI.\n *\n * @example\n * ```javascript\n * import * as Sentry from '@sentry/node';\n *\n * Sentry.init({\n * integrations: [Sentry.openAIIntegration()],\n * });\n * ```\n *\n * ## Options\n *\n * - `recordInputs`: Whether to record prompt messages (default: respects `sendDefaultPii` client option)\n * - `recordOutputs`: Whether to record response text (default: respects `sendDefaultPii` client option)\n *\n * ### Default Behavior\n *\n * By default, the integration will:\n * - Record inputs and outputs ONLY if `sendDefaultPii` is set to `true` in your Sentry client options\n * - Otherwise, inputs and outputs are NOT recorded unless explicitly enabled\n *\n * @example\n * ```javascript\n * // Record inputs and outputs when sendDefaultPii is false\n * Sentry.init({\n * integrations: [\n * Sentry.openAIIntegration({\n * recordInputs: true,\n * recordOutputs: true\n * })\n * ],\n * });\n *\n * // Never record inputs/outputs regardless of sendDefaultPii\n * Sentry.init({\n * sendDefaultPii: true,\n * integrations: [\n * Sentry.openAIIntegration({\n * recordInputs: false,\n * recordOutputs: false\n * })\n * ],\n * });\n * ```\n *\n */\nexport const openAIIntegration = defineIntegration(_openAiIntegration);\n"],"names":["generateInstrumentOnce","OPENAI_INTEGRATION_NAME","SentryOpenAiInstrumentation","defineIntegration"],"mappings":";;;;;;AAKO,MAAM,gBAAA,GAAmBA,+BAAA;AAAA,EAC9BC,4BAAA;AAAA,EACA,CAAA,OAAA,KAAW,IAAIC,2CAAA,CAA4B,OAAO;AACpD;AAEA,MAAM,kBAAA,IAAsB,CAAC,OAAA,GAAyB,EAAC,KAAM;AAC3D,EAAA,OAAO;AAAA,IACL,IAAA,EAAMD,4BAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,gBAAA,CAAiB,OAAO,CAAA;AAAA,IAC1B;AAAA,GACF;AACF,CAAA,CAAA;AAuDO,MAAM,iBAAA,GAAoBE,uBAAkB,kBAAkB;;;;;"}
|