@depup/sentry__node 10.48.0-depup.0 → 10.67.0-depup.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/README.md +5 -6
- package/build/cjs/debug-build.js +0 -5
- package/build/cjs/debug-build.js.map +1 -1
- package/build/cjs/index.js +76 -67
- package/build/cjs/index.js.map +1 -1
- 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 +17 -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 +230 -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 +19 -175
- package/build/cjs/integrations/http.js.map +1 -1
- package/build/cjs/integrations/node-fetch.js +10 -94
- package/build/cjs/integrations/node-fetch.js.map +1 -1
- package/build/cjs/integrations/tracing/InstrumentationNodeModuleFile.js +15 -0
- package/build/cjs/integrations/tracing/InstrumentationNodeModuleFile.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/index.js +21 -0
- package/build/cjs/integrations/tracing/amqplib/index.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js +117 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/patches.js +185 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js +26 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/types.js +17 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/types.js.map +1 -0
- package/build/cjs/integrations/tracing/amqplib/vendored/utils.js +129 -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 +21 -44
- package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/connect/index.js +35 -0
- package/build/cjs/integrations/tracing/connect/index.js.map +1 -0
- package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js +16 -0
- package/build/cjs/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/connect/vendored/instrumentation.js +137 -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 +36 -0
- package/build/cjs/integrations/tracing/connect/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/dataloader/index.js +26 -0
- package/build/cjs/integrations/tracing/dataloader/index.js.map +1 -0
- package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js +217 -0
- package/build/cjs/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/express.js +22 -34
- package/build/cjs/integrations/tracing/express.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/index.js +19 -234
- 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 +78 -162
- 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/firebase/firebase.js +4 -33
- package/build/cjs/integrations/tracing/firebase/firebase.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js +7 -23
- package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js +73 -215
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js +86 -210
- package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
- package/build/cjs/integrations/tracing/genericPool/index.js +21 -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 +23 -43
- package/build/cjs/integrations/tracing/google-genai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/graphql/index.js +34 -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 +15 -0
- package/build/cjs/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -0
- package/build/cjs/integrations/tracing/graphql/vendored/instrumentation.js +329 -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 +265 -0
- package/build/cjs/integrations/tracing/graphql/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/hapi/index.js +16 -91
- 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 +255 -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/utils.js +85 -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 +26 -77
- 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 -83
- package/build/cjs/integrations/tracing/index.js.map +1 -1
- package/build/cjs/integrations/tracing/kafka/index.js +21 -0
- package/build/cjs/integrations/tracing/kafka/index.js.map +1 -0
- package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js +237 -0
- package/build/cjs/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/kafka/vendored/semconv.js +22 -0
- package/build/cjs/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/kafka/vendored/utils.js +114 -0
- package/build/cjs/integrations/tracing/kafka/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/index.js +26 -0
- package/build/cjs/integrations/tracing/knex/index.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js +135 -0
- package/build/cjs/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/vendored/semconv.js +10 -0
- package/build/cjs/integrations/tracing/knex/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/knex/vendored/utils.js +84 -0
- package/build/cjs/integrations/tracing/knex/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/koa/index.js +46 -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 +127 -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 +36 -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 +57 -151
- 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 +76 -40
- 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 +38 -0
- package/build/cjs/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/index.js +21 -0
- package/build/cjs/integrations/tracing/mongo/index.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js +129 -0
- package/build/cjs/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/vendored/patches.js +150 -0
- package/build/cjs/integrations/tracing/mongo/vendored/patches.js.map +1 -0
- package/build/cjs/integrations/tracing/mongo/vendored/utils.js +40 -0
- package/build/cjs/integrations/tracing/mongo/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose/index.js +22 -0
- package/build/cjs/integrations/tracing/mongoose/index.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js +240 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
- package/build/cjs/integrations/tracing/mongoose/vendored/utils.js +41 -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/instrumentation.js +185 -0
- package/build/cjs/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql/vendored/semconv.js +8 -0
- package/build/cjs/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql/vendored/utils.js +38 -0
- package/build/cjs/integrations/tracing/mysql/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/index.js +22 -0
- package/build/cjs/integrations/tracing/mysql2/index.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js +138 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js +8 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/mysql2/vendored/utils.js +81 -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 +25 -49
- package/build/cjs/integrations/tracing/openai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/postgres/index.js +27 -0
- package/build/cjs/integrations/tracing/postgres/index.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/enums/AttributeNames.js +11 -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 +225 -0
- package/build/cjs/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/semconv.js +8 -0
- package/build/cjs/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/postgres/vendored/utils.js +151 -0
- package/build/cjs/integrations/tracing/postgres/vendored/utils.js.map +1 -0
- package/build/cjs/integrations/tracing/postgresjs.js +77 -190
- package/build/cjs/integrations/tracing/postgresjs.js.map +1 -1
- package/build/cjs/integrations/tracing/redis/cache.js +41 -0
- package/build/cjs/integrations/tracing/redis/cache.js.map +1 -0
- package/build/cjs/integrations/tracing/redis/index.js +50 -0
- package/build/cjs/integrations/tracing/redis/index.js.map +1 -0
- package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js +147 -0
- package/build/cjs/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js +445 -0
- package/build/cjs/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/redis/vendored/semconv.js +8 -0
- package/build/cjs/integrations/tracing/redis/vendored/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing/tedious/index.js +21 -0
- package/build/cjs/integrations/tracing/tedious/index.js.map +1 -0
- package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js +154 -0
- package/build/cjs/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/tedious/vendored/semconv.js +8 -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/vercelai/constants.js +1 -1
- package/build/cjs/integrations/tracing/vercelai/constants.js.map +1 -1
- package/build/cjs/integrations/tracing/vercelai/index.js +7 -53
- package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/vercelai/instrumentation.js +60 -158
- 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/diagnosticsChannelInjection.js +21 -0
- package/build/cjs/sdk/diagnosticsChannelInjection.js.map +1 -0
- package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js +33 -0
- package/build/cjs/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -0
- package/build/cjs/sdk/index.js +33 -35
- package/build/cjs/sdk/index.js.map +1 -1
- package/build/cjs/sdk/initOtel.js +74 -60
- 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/cjs/utils/setHttpServerSpanRouteAttribute.js +21 -0
- package/build/cjs/utils/setHttpServerSpanRouteAttribute.js.map +1 -0
- package/build/esm/debug-build.js +0 -5
- package/build/esm/debug-build.js.map +1 -1
- package/build/esm/index.js +23 -21
- package/build/esm/index.js.map +1 -1
- 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 +15 -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 +228 -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 +22 -176
- package/build/esm/integrations/http.js.map +1 -1
- package/build/esm/integrations/node-fetch.js +12 -95
- package/build/esm/integrations/node-fetch.js.map +1 -1
- package/build/esm/integrations/tracing/InstrumentationNodeModuleFile.js +13 -0
- package/build/esm/integrations/tracing/InstrumentationNodeModuleFile.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/index.js +18 -0
- package/build/esm/integrations/tracing/amqplib/index.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js +115 -0
- package/build/esm/integrations/tracing/amqplib/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/patches.js +177 -0
- package/build/esm/integrations/tracing/amqplib/vendored/patches.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/semconv.js +14 -0
- package/build/esm/integrations/tracing/amqplib/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/types.js +15 -0
- package/build/esm/integrations/tracing/amqplib/vendored/types.js.map +1 -0
- package/build/esm/integrations/tracing/amqplib/vendored/utils.js +117 -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 +21 -44
- package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/connect/index.js +31 -0
- package/build/esm/integrations/tracing/connect/index.js.map +1 -0
- package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js +13 -0
- package/build/esm/integrations/tracing/connect/vendored/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/connect/vendored/instrumentation.js +135 -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 +32 -0
- package/build/esm/integrations/tracing/connect/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/dataloader/index.js +23 -0
- package/build/esm/integrations/tracing/dataloader/index.js.map +1 -0
- package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js +215 -0
- package/build/esm/integrations/tracing/dataloader/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/express.js +22 -34
- package/build/esm/integrations/tracing/express.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/index.js +21 -235
- 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 +74 -158
- 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/firebase/firebase.js +6 -35
- package/build/esm/integrations/tracing/firebase/firebase.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js +7 -23
- package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js +72 -214
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/patches/functions.js +86 -210
- package/build/esm/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
- package/build/esm/integrations/tracing/genericPool/index.js +18 -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 +23 -43
- package/build/esm/integrations/tracing/google-genai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/graphql/index.js +31 -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 +13 -0
- package/build/esm/integrations/tracing/graphql/vendored/enums/AttributeNames.js.map +1 -0
- package/build/esm/integrations/tracing/graphql/vendored/instrumentation.js +327 -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 +257 -0
- package/build/esm/integrations/tracing/graphql/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/hapi/index.js +16 -91
- 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 +253 -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/utils.js +76 -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 +22 -73
- 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 +20 -29
- package/build/esm/integrations/tracing/index.js.map +1 -1
- package/build/esm/integrations/tracing/kafka/index.js +18 -0
- package/build/esm/integrations/tracing/kafka/index.js.map +1 -0
- package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js +235 -0
- package/build/esm/integrations/tracing/kafka/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/kafka/vendored/semconv.js +12 -0
- package/build/esm/integrations/tracing/kafka/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/kafka/vendored/utils.js +108 -0
- package/build/esm/integrations/tracing/kafka/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/knex/index.js +23 -0
- package/build/esm/integrations/tracing/knex/index.js.map +1 -0
- package/build/esm/integrations/tracing/knex/vendored/instrumentation.js +133 -0
- package/build/esm/integrations/tracing/knex/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/knex/vendored/semconv.js +6 -0
- package/build/esm/integrations/tracing/knex/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/knex/vendored/utils.js +75 -0
- package/build/esm/integrations/tracing/knex/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/koa/index.js +42 -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 +125 -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 +33 -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 +57 -151
- 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 +78 -42
- 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 +36 -0
- package/build/esm/integrations/tracing/lrumemoizer/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/index.js +18 -0
- package/build/esm/integrations/tracing/mongo/index.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js +127 -0
- package/build/esm/integrations/tracing/mongo/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/vendored/patches.js +142 -0
- package/build/esm/integrations/tracing/mongo/vendored/patches.js.map +1 -0
- package/build/esm/integrations/tracing/mongo/vendored/utils.js +34 -0
- package/build/esm/integrations/tracing/mongo/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose/index.js +19 -0
- package/build/esm/integrations/tracing/mongoose/index.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js +236 -0
- package/build/esm/integrations/tracing/mongoose/vendored/mongoose.js.map +1 -0
- package/build/esm/integrations/tracing/mongoose/vendored/utils.js +38 -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/instrumentation.js +183 -0
- package/build/esm/integrations/tracing/mysql/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mysql/vendored/semconv.js +5 -0
- package/build/esm/integrations/tracing/mysql/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/mysql/vendored/utils.js +33 -0
- package/build/esm/integrations/tracing/mysql/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/index.js +19 -0
- package/build/esm/integrations/tracing/mysql2/index.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js +136 -0
- package/build/esm/integrations/tracing/mysql2/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/vendored/semconv.js +5 -0
- package/build/esm/integrations/tracing/mysql2/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/mysql2/vendored/utils.js +75 -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 +25 -49
- package/build/esm/integrations/tracing/openai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/postgres/index.js +24 -0
- package/build/esm/integrations/tracing/postgres/index.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/enums/AttributeNames.js +9 -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 +223 -0
- package/build/esm/integrations/tracing/postgres/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/semconv.js +5 -0
- package/build/esm/integrations/tracing/postgres/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/postgres/vendored/utils.js +136 -0
- package/build/esm/integrations/tracing/postgres/vendored/utils.js.map +1 -0
- package/build/esm/integrations/tracing/postgresjs.js +77 -190
- package/build/esm/integrations/tracing/postgresjs.js.map +1 -1
- package/build/esm/integrations/tracing/redis/cache.js +38 -0
- package/build/esm/integrations/tracing/redis/cache.js.map +1 -0
- package/build/esm/integrations/tracing/redis/index.js +43 -0
- package/build/esm/integrations/tracing/redis/index.js.map +1 -0
- package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js +145 -0
- package/build/esm/integrations/tracing/redis/vendored/ioredis-instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js +443 -0
- package/build/esm/integrations/tracing/redis/vendored/redis-instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/redis/vendored/semconv.js +5 -0
- package/build/esm/integrations/tracing/redis/vendored/semconv.js.map +1 -0
- package/build/esm/integrations/tracing/tedious/index.js +18 -0
- package/build/esm/integrations/tracing/tedious/index.js.map +1 -0
- package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js +152 -0
- package/build/esm/integrations/tracing/tedious/vendored/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/tedious/vendored/semconv.js +5 -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/vercelai/constants.js +1 -1
- package/build/esm/integrations/tracing/vercelai/constants.js.map +1 -1
- package/build/esm/integrations/tracing/vercelai/index.js +8 -54
- package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/esm/integrations/tracing/vercelai/instrumentation.js +60 -158
- 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/diagnosticsChannelInjection.js +17 -0
- package/build/esm/sdk/diagnosticsChannelInjection.js.map +1 -0
- package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js +30 -0
- package/build/esm/sdk/experimentalUseDiagnosticsChannelInjection.js.map +1 -0
- package/build/esm/sdk/index.js +33 -36
- package/build/esm/sdk/index.js.map +1 -1
- package/build/esm/sdk/initOtel.js +77 -63
- 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/esm/utils/setHttpServerSpanRouteAttribute.js +19 -0
- package/build/esm/utils/setHttpServerSpanRouteAttribute.js.map +1 -0
- package/build/import-hook.mjs +6 -0
- package/build/types/index.d.ts +6 -4
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
- package/build/types/integrations/featureFlagShims/launchDarkly.d.ts.map +1 -1
- package/build/types/integrations/featureFlagShims/openFeature.d.ts +3 -1
- package/build/types/integrations/featureFlagShims/openFeature.d.ts.map +1 -1
- package/build/types/integrations/featureFlagShims/statsig.d.ts +3 -1
- package/build/types/integrations/featureFlagShims/statsig.d.ts.map +1 -1
- package/build/types/integrations/featureFlagShims/unleash.d.ts +3 -1
- package/build/types/integrations/featureFlagShims/unleash.d.ts.map +1 -1
- package/build/types/integrations/fs/index.d.ts +14 -0
- 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 +3 -0
- package/build/types/integrations/fs/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/fs/vendored/types.d.ts +23 -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/integrations/http.d.ts +12 -17
- package/build/types/integrations/http.d.ts.map +1 -1
- package/build/types/integrations/node-fetch.d.ts +8 -35
- package/build/types/integrations/node-fetch.d.ts.map +1 -1
- package/build/types/integrations/tracing/InstrumentationNodeModuleFile.d.ts +9 -0
- package/build/types/integrations/tracing/InstrumentationNodeModuleFile.d.ts.map +1 -0
- package/build/types/integrations/tracing/{amqplib.d.ts → amqplib/index.d.ts} +5 -3
- 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/instrumentation.d.ts +11 -0
- package/build/types/integrations/tracing/amqplib/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
- package/build/types/integrations/tracing/amqplib/vendored/patches.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts +23 -0
- package/build/types/integrations/tracing/amqplib/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/types.d.ts +49 -0
- package/build/types/integrations/tracing/amqplib/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts +42 -0
- package/build/types/integrations/tracing/amqplib/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/anthropic-ai/index.d.ts +11 -8
- package/build/types/integrations/tracing/anthropic-ai/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/{connect.d.ts → connect/index.d.ts} +5 -3
- package/build/types/integrations/tracing/connect/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +9 -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} +5 -3
- package/build/types/integrations/tracing/dataloader/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts +18 -0
- package/build/types/integrations/tracing/dataloader/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/dataloader/vendored/types.d.ts +22 -0
- package/build/types/integrations/tracing/dataloader/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/express.d.ts +3 -1
- package/build/types/integrations/tracing/express.d.ts.map +1 -1
- package/build/types/integrations/tracing/fastify/index.d.ts +6 -6
- package/build/types/integrations/tracing/fastify/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/fastify/v3/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/firebase.d.ts +3 -1
- package/build/types/integrations/tracing/firebase/firebase.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
- package/build/types/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
- package/build/types/integrations/tracing/firebase/otel/patches/firestore.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
- package/build/types/integrations/tracing/firebase/otel/patches/functions.d.ts.map +1 -1
- package/build/types/integrations/tracing/firebase/otel/types.d.ts +0 -20
- package/build/types/integrations/tracing/firebase/otel/types.d.ts.map +1 -1
- package/build/types/integrations/tracing/{genericPool.d.ts → genericPool/index.d.ts} +5 -3
- 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 +11 -0
- package/build/types/integrations/tracing/genericPool/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/google-genai/index.d.ts +11 -8
- package/build/types/integrations/tracing/google-genai/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/google-genai/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +5 -3
- 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 +10 -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 +2 -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 +25 -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 +33 -0
- package/build/types/integrations/tracing/graphql/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/graphql/vendored/utils.d.ts +14 -0
- package/build/types/integrations/tracing/graphql/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/hapi/index.d.ts +4 -2
- 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/utils.d.ts +18 -0
- package/build/types/integrations/tracing/hapi/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/hono/index.d.ts +9 -1
- package/build/types/integrations/tracing/hono/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +5 -3
- package/build/types/integrations/tracing/kafka/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts +15 -0
- package/build/types/integrations/tracing/kafka/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +79 -0
- package/build/types/integrations/tracing/kafka/vendored/kafkajs-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts +54 -0
- package/build/types/integrations/tracing/kafka/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/kafka/vendored/utils.d.ts +29 -0
- package/build/types/integrations/tracing/kafka/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{knex.d.ts → knex/index.d.ts} +5 -3
- package/build/types/integrations/tracing/knex/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts +12 -0
- package/build/types/integrations/tracing/knex/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/semconv.d.ts +7 -0
- package/build/types/integrations/tracing/knex/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/knex/vendored/utils.d.ts +9 -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} +5 -3
- 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 +13 -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/index.d.ts +12 -9
- package/build/types/integrations/tracing/langchain/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/langchain/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/langgraph/index.d.ts +11 -8
- package/build/types/integrations/tracing/langgraph/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/langgraph/instrumentation.d.ts +1 -1
- package/build/types/integrations/tracing/langgraph/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/{lrumemoizer.d.ts → lrumemoizer/index.d.ts} +5 -3
- 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-ts3.8/integrations/tracing/mongo.d.ts → types/integrations/tracing/mongo/index.d.ts} +22 -24
- package/build/types/integrations/tracing/mongo/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongo/vendored/instrumentation.d.ts +11 -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 +62 -0
- package/build/types/integrations/tracing/mongo/vendored/internal-types.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongo/vendored/patches.d.ts +15 -0
- package/build/types/integrations/tracing/mongo/vendored/patches.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongo/vendored/utils.d.ts +15 -0
- package/build/types/integrations/tracing/mongo/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/{mongoose.d.ts → mongoose/index.d.ts} +5 -3
- package/build/types/integrations/tracing/mongoose/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +33 -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 +18 -0
- package/build/types/integrations/tracing/mongoose/vendored/mongoose.d.ts.map +1 -0
- package/build/types/integrations/tracing/mongoose/vendored/utils.d.ts +4 -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} +5 -3
- package/build/types/integrations/tracing/mysql/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/instrumentation.d.ts +14 -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 +19 -0
- package/build/types/integrations/tracing/mysql/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql/vendored/utils.d.ts +22 -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} +5 -3
- package/build/types/integrations/tracing/mysql2/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2/vendored/instrumentation.d.ts +9 -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 +3 -0
- package/build/types/integrations/tracing/mysql2/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts +25 -0
- package/build/types/integrations/tracing/mysql2/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/openai/index.d.ts +11 -8
- package/build/types/integrations/tracing/openai/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +5 -3
- package/build/types/integrations/tracing/postgres/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +6 -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 +12 -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 +33 -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 +13 -0
- package/build/types/integrations/tracing/postgres/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/types.d.ts +11 -0
- package/build/types/integrations/tracing/postgres/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgres/vendored/utils.d.ts +56 -0
- package/build/types/integrations/tracing/postgres/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/postgresjs.d.ts +3 -1
- package/build/types/integrations/tracing/postgresjs.d.ts.map +1 -1
- package/build/types/integrations/tracing/redis/cache.d.ts +22 -0
- package/build/types/integrations/tracing/redis/cache.d.ts.map +1 -0
- package/build/types/integrations/tracing/redis/index.d.ts +28 -0
- package/build/types/integrations/tracing/redis/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +10 -0
- package/build/types/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts +16 -0
- package/build/types/integrations/tracing/redis/vendored/redis-instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/redis/vendored/semconv.d.ts +4 -0
- package/build/types/integrations/tracing/redis/vendored/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing/redis/vendored/types.d.ts +24 -0
- package/build/types/integrations/tracing/redis/vendored/types.d.ts.map +1 -0
- package/build/types/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +5 -3
- package/build/types/integrations/tracing/tedious/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts +11 -0
- package/build/types/integrations/tracing/tedious/vendored/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/tedious/vendored/semconv.d.ts +19 -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/utils.d.ts +9 -0
- package/build/types/integrations/tracing/tedious/vendored/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing/vercelai/constants.d.ts +1 -1
- package/build/types/integrations/tracing/vercelai/constants.d.ts.map +1 -1
- package/build/types/integrations/tracing/vercelai/index.d.ts +3 -2
- package/build/types/integrations/tracing/vercelai/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/vercelai/instrumentation.d.ts +2 -2
- package/build/types/integrations/tracing/vercelai/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/vercelai/types.d.ts +11 -4
- package/build/types/integrations/tracing/vercelai/types.d.ts.map +1 -1
- package/build/types/sdk/diagnosticsChannelInjection.d.ts +41 -0
- package/build/types/sdk/diagnosticsChannelInjection.d.ts.map +1 -0
- package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +37 -0
- package/build/types/sdk/experimentalUseDiagnosticsChannelInjection.d.ts.map +1 -0
- package/build/types/sdk/index.d.ts +18 -0
- package/build/types/sdk/index.d.ts.map +1 -1
- package/build/types/sdk/initOtel.d.ts +2 -3
- package/build/types/sdk/initOtel.d.ts.map +1 -1
- package/build/types/utils/redisCache.d.ts +1 -1
- package/build/types/utils/redisCache.d.ts.map +1 -1
- package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts +9 -0
- package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts.map +1 -0
- package/build/types-ts3.8/index.d.ts +6 -4
- package/build/types-ts3.8/integrations/featureFlagShims/launchDarkly.d.ts +3 -1
- package/build/types-ts3.8/integrations/featureFlagShims/openFeature.d.ts +3 -1
- package/build/types-ts3.8/integrations/featureFlagShims/statsig.d.ts +3 -1
- package/build/types-ts3.8/integrations/featureFlagShims/unleash.d.ts +3 -1
- package/build/types-ts3.8/integrations/fs/index.d.ts +14 -0
- package/build/types-ts3.8/integrations/fs/vendored/constants.d.ts +5 -0
- package/build/types-ts3.8/integrations/fs/vendored/instrumentation.d.ts +3 -0
- package/build/types-ts3.8/integrations/fs/vendored/types.d.ts +23 -0
- package/build/types-ts3.8/integrations/fs/vendored/utils.d.ts +15 -0
- package/build/types-ts3.8/integrations/http.d.ts +12 -17
- package/build/types-ts3.8/integrations/node-fetch.d.ts +8 -35
- package/build/types-ts3.8/integrations/tracing/InstrumentationNodeModuleFile.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing/{amqplib.d.ts → amqplib/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/amqplib-types.d.ts +44 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/instrumentation.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/patches.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/semconv.d.ts +23 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/types.d.ts +49 -0
- package/build/types-ts3.8/integrations/tracing/amqplib/vendored/utils.d.ts +42 -0
- package/build/types-ts3.8/integrations/tracing/anthropic-ai/index.d.ts +11 -8
- package/build/types-ts3.8/integrations/tracing/{connect.d.ts → connect/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/connect/vendored/enums/AttributeNames.d.ts +9 -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} +5 -3
- package/build/types-ts3.8/integrations/tracing/dataloader/vendored/instrumentation.d.ts +18 -0
- package/build/types-ts3.8/integrations/tracing/dataloader/vendored/types.d.ts +22 -0
- package/build/types-ts3.8/integrations/tracing/express.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/fastify/index.d.ts +6 -6
- package/build/types-ts3.8/integrations/tracing/firebase/firebase.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/firebase/otel/firebaseInstrumentation.d.ts +4 -9
- package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/firestore.d.ts +2 -5
- package/build/types-ts3.8/integrations/tracing/firebase/otel/patches/functions.d.ts +3 -8
- package/build/types-ts3.8/integrations/tracing/firebase/otel/types.d.ts +0 -20
- package/build/types-ts3.8/integrations/tracing/{genericPool.d.ts → genericPool/index.d.ts} +5 -3
- 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 +11 -0
- package/build/types-ts3.8/integrations/tracing/google-genai/index.d.ts +11 -8
- package/build/types-ts3.8/integrations/tracing/{graphql.d.ts → graphql/index.d.ts} +5 -3
- 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 +10 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/graphql-types.d.ts +2 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/instrumentation.d.ts +25 -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 +33 -0
- package/build/types-ts3.8/integrations/tracing/graphql/vendored/utils.d.ts +14 -0
- package/build/types-ts3.8/integrations/tracing/hapi/index.d.ts +4 -2
- 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/utils.d.ts +18 -0
- package/build/types-ts3.8/integrations/tracing/hono/index.d.ts +9 -1
- package/build/types-ts3.8/integrations/tracing/{kafka.d.ts → kafka/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/instrumentation.d.ts +15 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/kafkajs-types.d.ts +79 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/semconv.d.ts +54 -0
- package/build/types-ts3.8/integrations/tracing/kafka/vendored/utils.d.ts +29 -0
- package/build/types-ts3.8/integrations/tracing/{knex.d.ts → knex/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/knex/vendored/instrumentation.d.ts +12 -0
- package/build/types-ts3.8/integrations/tracing/knex/vendored/semconv.d.ts +7 -0
- package/build/types-ts3.8/integrations/tracing/knex/vendored/utils.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing/{koa.d.ts → koa/index.d.ts} +5 -3
- 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 +13 -0
- package/build/types-ts3.8/integrations/tracing/koa/vendored/utils.d.ts +15 -0
- package/build/types-ts3.8/integrations/tracing/langchain/index.d.ts +12 -9
- package/build/types-ts3.8/integrations/tracing/langgraph/index.d.ts +11 -8
- package/build/types-ts3.8/integrations/tracing/langgraph/instrumentation.d.ts +1 -1
- package/build/types-ts3.8/integrations/tracing/{lrumemoizer.d.ts → lrumemoizer/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/lrumemoizer/vendored/instrumentation.d.ts +6 -0
- package/build/{types/integrations/tracing/mongo.d.ts → types-ts3.8/integrations/tracing/mongo/index.d.ts} +22 -24
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/instrumentation.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/internal-types.d.ts +62 -0
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/patches.d.ts +15 -0
- package/build/types-ts3.8/integrations/tracing/mongo/vendored/utils.d.ts +15 -0
- package/build/types-ts3.8/integrations/tracing/{mongoose.d.ts → mongoose/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose-types.d.ts +33 -0
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/mongoose.d.ts +18 -0
- package/build/types-ts3.8/integrations/tracing/mongoose/vendored/utils.d.ts +4 -0
- package/build/types-ts3.8/integrations/tracing/{mysql.d.ts → mysql/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/instrumentation.d.ts +14 -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 +19 -0
- package/build/types-ts3.8/integrations/tracing/mysql/vendored/utils.d.ts +22 -0
- package/build/types-ts3.8/integrations/tracing/{mysql2.d.ts → mysql2/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/instrumentation.d.ts +9 -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 +3 -0
- package/build/types-ts3.8/integrations/tracing/mysql2/vendored/utils.d.ts +25 -0
- package/build/types-ts3.8/integrations/tracing/openai/index.d.ts +11 -8
- package/build/types-ts3.8/integrations/tracing/{postgres.d.ts → postgres/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/enums/AttributeNames.d.ts +6 -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 +12 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/internal-types.d.ts +33 -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 +13 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/types.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing/postgres/vendored/utils.d.ts +56 -0
- package/build/types-ts3.8/integrations/tracing/postgresjs.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing/redis/cache.d.ts +22 -0
- package/build/types-ts3.8/integrations/tracing/redis/index.d.ts +28 -0
- package/build/types-ts3.8/integrations/tracing/redis/vendored/ioredis-instrumentation.d.ts +10 -0
- package/build/types-ts3.8/integrations/tracing/redis/vendored/redis-instrumentation.d.ts +16 -0
- package/build/types-ts3.8/integrations/tracing/redis/vendored/semconv.d.ts +4 -0
- package/build/types-ts3.8/integrations/tracing/redis/vendored/types.d.ts +24 -0
- package/build/types-ts3.8/integrations/tracing/{tedious.d.ts → tedious/index.d.ts} +5 -3
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/instrumentation.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing/tedious/vendored/semconv.d.ts +19 -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/utils.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing/vercelai/constants.d.ts +1 -1
- package/build/types-ts3.8/integrations/tracing/vercelai/index.d.ts +3 -2
- package/build/types-ts3.8/integrations/tracing/vercelai/instrumentation.d.ts +2 -2
- package/build/types-ts3.8/integrations/tracing/vercelai/types.d.ts +11 -4
- package/build/types-ts3.8/sdk/diagnosticsChannelInjection.d.ts +41 -0
- package/build/types-ts3.8/sdk/experimentalUseDiagnosticsChannelInjection.d.ts +37 -0
- package/build/types-ts3.8/sdk/index.d.ts +18 -0
- package/build/types-ts3.8/sdk/initOtel.d.ts +3 -4
- package/build/types-ts3.8/utils/redisCache.d.ts +1 -1
- package/build/types-ts3.8/utils/setHttpServerSpanRouteAttribute.d.ts +9 -0
- package/changes.json +6 -10
- package/package.json +30 -45
- 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 -203
- package/build/cjs/integrations/tracing/prisma.js.map +0 -1
- package/build/cjs/integrations/tracing/redis.js +0 -121
- package/build/cjs/integrations/tracing/redis.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 -200
- package/build/esm/integrations/tracing/prisma.js.map +0 -1
- package/build/esm/integrations/tracing/redis.js +0 -117
- package/build/esm/integrations/tracing/redis.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 +0 -24
- 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 +0 -38
- 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 +0 -31
- package/build/types/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts.map +0 -1
- package/build/types/integrations/tracing/prisma.d.ts +0 -50
- package/build/types/integrations/tracing/prisma.d.ts.map +0 -1
- package/build/types/integrations/tracing/redis.d.ts +0 -41
- package/build/types/integrations/tracing/redis.d.ts.map +0 -1
- package/build/types/integrations/tracing/tedious.d.ts.map +0 -1
- package/build/types-ts3.8/integrations/fs.d.ts +0 -24
- package/build/types-ts3.8/integrations/tracing/prisma/vendor/v5-tracing-helper.d.ts +0 -44
- package/build/types-ts3.8/integrations/tracing/prisma/vendor/v6-tracing-helper.d.ts +0 -34
- package/build/types-ts3.8/integrations/tracing/prisma.d.ts +0 -50
- package/build/types-ts3.8/integrations/tracing/redis.d.ts +0 -41
|
@@ -0,0 +1,223 @@
|
|
|
1
|
+
import { InstrumentationBase, InstrumentationNodeModuleDefinition, isWrapped } from '@opentelemetry/instrumentation';
|
|
2
|
+
import { SDK_VERSION, startInactiveSpan, SPAN_KIND, getActiveSpan, withActiveSpan, SPAN_STATUS_ERROR } from '@sentry/core';
|
|
3
|
+
import { InstrumentationNodeModuleFile } from '../../InstrumentationNodeModuleFile.js';
|
|
4
|
+
import { SpanNames } from './enums/SpanNames.js';
|
|
5
|
+
import { shouldSkipInstrumentation, getSemanticAttributesFromConnection, patchClientConnectCallback, isObjectWithTextString, handleConfigQuery, patchCallback, getErrorMessage, getSemanticAttributesFromPoolConnection, patchCallbackPGPool } from './utils.js';
|
|
6
|
+
|
|
7
|
+
const PACKAGE_NAME = "@sentry/instrumentation-pg";
|
|
8
|
+
function extractModuleExports(module) {
|
|
9
|
+
return module[Symbol.toStringTag] === "Module" ? module.default : module;
|
|
10
|
+
}
|
|
11
|
+
function bindCallbackToSpan(parentSpan, callback) {
|
|
12
|
+
return function(...args) {
|
|
13
|
+
return withActiveSpan(parentSpan, () => callback.apply(this, args));
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
class PgInstrumentation extends InstrumentationBase {
|
|
17
|
+
constructor(config = {}) {
|
|
18
|
+
super(PACKAGE_NAME, SDK_VERSION, config);
|
|
19
|
+
}
|
|
20
|
+
init() {
|
|
21
|
+
const SUPPORTED_PG_VERSIONS = [">=8.0.3 <9"];
|
|
22
|
+
const SUPPORTED_PG_POOL_VERSIONS = [">=2.0.0 <4"];
|
|
23
|
+
const modulePgNativeClient = new InstrumentationNodeModuleFile(
|
|
24
|
+
"pg/lib/native/client.js",
|
|
25
|
+
SUPPORTED_PG_VERSIONS,
|
|
26
|
+
this._patchPgClient.bind(this),
|
|
27
|
+
this._unpatchPgClient.bind(this)
|
|
28
|
+
);
|
|
29
|
+
const modulePgClient = new InstrumentationNodeModuleFile(
|
|
30
|
+
"pg/lib/client.js",
|
|
31
|
+
SUPPORTED_PG_VERSIONS,
|
|
32
|
+
this._patchPgClient.bind(this),
|
|
33
|
+
this._unpatchPgClient.bind(this)
|
|
34
|
+
);
|
|
35
|
+
const modulePG = new InstrumentationNodeModuleDefinition(
|
|
36
|
+
"pg",
|
|
37
|
+
SUPPORTED_PG_VERSIONS,
|
|
38
|
+
(module) => {
|
|
39
|
+
const moduleExports = extractModuleExports(module);
|
|
40
|
+
this._patchPgClient(moduleExports.Client);
|
|
41
|
+
return module;
|
|
42
|
+
},
|
|
43
|
+
(module) => {
|
|
44
|
+
const moduleExports = extractModuleExports(module);
|
|
45
|
+
this._unpatchPgClient(moduleExports.Client);
|
|
46
|
+
return module;
|
|
47
|
+
},
|
|
48
|
+
[modulePgClient, modulePgNativeClient]
|
|
49
|
+
);
|
|
50
|
+
const modulePGPool = new InstrumentationNodeModuleDefinition(
|
|
51
|
+
"pg-pool",
|
|
52
|
+
SUPPORTED_PG_POOL_VERSIONS,
|
|
53
|
+
(module) => {
|
|
54
|
+
const moduleExports = extractModuleExports(module);
|
|
55
|
+
if (isWrapped(moduleExports.prototype.connect)) {
|
|
56
|
+
this._unwrap(moduleExports.prototype, "connect");
|
|
57
|
+
}
|
|
58
|
+
this._wrap(moduleExports.prototype, "connect", this._getPoolConnectPatch());
|
|
59
|
+
return moduleExports;
|
|
60
|
+
},
|
|
61
|
+
(module) => {
|
|
62
|
+
const moduleExports = extractModuleExports(module);
|
|
63
|
+
if (isWrapped(moduleExports.prototype.connect)) {
|
|
64
|
+
this._unwrap(moduleExports.prototype, "connect");
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
return [modulePG, modulePGPool];
|
|
69
|
+
}
|
|
70
|
+
_patchPgClient(module) {
|
|
71
|
+
if (!module) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const moduleExports = extractModuleExports(module);
|
|
75
|
+
if (isWrapped(moduleExports.prototype.query)) {
|
|
76
|
+
this._unwrap(moduleExports.prototype, "query");
|
|
77
|
+
}
|
|
78
|
+
if (isWrapped(moduleExports.prototype.connect)) {
|
|
79
|
+
this._unwrap(moduleExports.prototype, "connect");
|
|
80
|
+
}
|
|
81
|
+
this._wrap(moduleExports.prototype, "query", this._getClientQueryPatch());
|
|
82
|
+
this._wrap(moduleExports.prototype, "connect", this._getClientConnectPatch());
|
|
83
|
+
return module;
|
|
84
|
+
}
|
|
85
|
+
_unpatchPgClient(module) {
|
|
86
|
+
const moduleExports = extractModuleExports(module);
|
|
87
|
+
if (isWrapped(moduleExports.prototype.query)) {
|
|
88
|
+
this._unwrap(moduleExports.prototype, "query");
|
|
89
|
+
}
|
|
90
|
+
if (isWrapped(moduleExports.prototype.connect)) {
|
|
91
|
+
this._unwrap(moduleExports.prototype, "connect");
|
|
92
|
+
}
|
|
93
|
+
return module;
|
|
94
|
+
}
|
|
95
|
+
_getClientConnectPatch() {
|
|
96
|
+
const plugin = this;
|
|
97
|
+
return (original) => {
|
|
98
|
+
return function connect(callback) {
|
|
99
|
+
if (shouldSkipInstrumentation() || plugin.getConfig().ignoreConnectSpans) {
|
|
100
|
+
return original.call(this, callback);
|
|
101
|
+
}
|
|
102
|
+
const span = startInactiveSpan({
|
|
103
|
+
name: SpanNames.CONNECT,
|
|
104
|
+
kind: SPAN_KIND.CLIENT,
|
|
105
|
+
attributes: getSemanticAttributesFromConnection(this)
|
|
106
|
+
});
|
|
107
|
+
let cb = callback;
|
|
108
|
+
if (cb) {
|
|
109
|
+
const parentSpan = getActiveSpan();
|
|
110
|
+
cb = patchClientConnectCallback(span, cb);
|
|
111
|
+
if (parentSpan) {
|
|
112
|
+
cb = bindCallbackToSpan(parentSpan, cb);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
const connectResult = withActiveSpan(span, () => {
|
|
116
|
+
return original.call(this, cb);
|
|
117
|
+
});
|
|
118
|
+
return handleConnectResult(span, connectResult);
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
_getClientQueryPatch() {
|
|
123
|
+
return (original) => {
|
|
124
|
+
this._diag.debug("Patching pg.Client.prototype.query");
|
|
125
|
+
return function query(...args) {
|
|
126
|
+
if (shouldSkipInstrumentation()) {
|
|
127
|
+
return original.apply(this, args);
|
|
128
|
+
}
|
|
129
|
+
const arg0 = args[0];
|
|
130
|
+
const firstArgIsString = typeof arg0 === "string";
|
|
131
|
+
const firstArgIsQueryObjectWithText = isObjectWithTextString(arg0);
|
|
132
|
+
const queryConfig = firstArgIsString ? {
|
|
133
|
+
text: arg0,
|
|
134
|
+
values: Array.isArray(args[1]) ? args[1] : void 0
|
|
135
|
+
} : firstArgIsQueryObjectWithText ? {
|
|
136
|
+
...arg0,
|
|
137
|
+
name: arg0.name,
|
|
138
|
+
text: arg0.text,
|
|
139
|
+
values: arg0.values ?? (Array.isArray(args[1]) ? args[1] : void 0)
|
|
140
|
+
} : void 0;
|
|
141
|
+
const span = handleConfigQuery.call(this, queryConfig);
|
|
142
|
+
if (args.length > 0) {
|
|
143
|
+
const parentSpan = getActiveSpan();
|
|
144
|
+
if (typeof args[args.length - 1] === "function") {
|
|
145
|
+
args[args.length - 1] = patchCallback(span, args[args.length - 1]);
|
|
146
|
+
if (parentSpan) {
|
|
147
|
+
args[args.length - 1] = bindCallbackToSpan(parentSpan, args[args.length - 1]);
|
|
148
|
+
}
|
|
149
|
+
} else if (typeof queryConfig?.callback === "function") {
|
|
150
|
+
let callback = patchCallback(span, queryConfig.callback);
|
|
151
|
+
if (parentSpan) {
|
|
152
|
+
callback = bindCallbackToSpan(parentSpan, callback);
|
|
153
|
+
}
|
|
154
|
+
args[0].callback = callback;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
let result;
|
|
158
|
+
try {
|
|
159
|
+
result = original.apply(this, args);
|
|
160
|
+
} catch (e) {
|
|
161
|
+
span.setStatus({ code: SPAN_STATUS_ERROR, message: getErrorMessage(e) });
|
|
162
|
+
span.end();
|
|
163
|
+
throw e;
|
|
164
|
+
}
|
|
165
|
+
if (result instanceof Promise) {
|
|
166
|
+
return result.then((result2) => {
|
|
167
|
+
span.end();
|
|
168
|
+
return result2;
|
|
169
|
+
}).catch((error) => {
|
|
170
|
+
span.setStatus({ code: SPAN_STATUS_ERROR, message: getErrorMessage(error) });
|
|
171
|
+
span.end();
|
|
172
|
+
return Promise.reject(error);
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
return result;
|
|
176
|
+
};
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
_getPoolConnectPatch() {
|
|
180
|
+
const plugin = this;
|
|
181
|
+
return (originalConnect) => {
|
|
182
|
+
return function connect(callback) {
|
|
183
|
+
if (shouldSkipInstrumentation() || plugin.getConfig().ignoreConnectSpans) {
|
|
184
|
+
return originalConnect.call(this, callback);
|
|
185
|
+
}
|
|
186
|
+
const span = startInactiveSpan({
|
|
187
|
+
name: SpanNames.POOL_CONNECT,
|
|
188
|
+
kind: SPAN_KIND.CLIENT,
|
|
189
|
+
attributes: getSemanticAttributesFromPoolConnection(this.options)
|
|
190
|
+
});
|
|
191
|
+
let cb = callback;
|
|
192
|
+
if (cb) {
|
|
193
|
+
const parentSpan = getActiveSpan();
|
|
194
|
+
cb = patchCallbackPGPool(span, cb);
|
|
195
|
+
if (parentSpan) {
|
|
196
|
+
cb = bindCallbackToSpan(parentSpan, cb);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
const connectResult = withActiveSpan(span, () => {
|
|
200
|
+
return originalConnect.call(this, cb);
|
|
201
|
+
});
|
|
202
|
+
return handleConnectResult(span, connectResult);
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
function handleConnectResult(span, connectResult) {
|
|
208
|
+
if (!(connectResult instanceof Promise)) {
|
|
209
|
+
return connectResult;
|
|
210
|
+
}
|
|
211
|
+
const connectResultPromise = connectResult;
|
|
212
|
+
return connectResultPromise.then((result) => {
|
|
213
|
+
span.end();
|
|
214
|
+
return result;
|
|
215
|
+
}).catch((error) => {
|
|
216
|
+
span.setStatus({ code: SPAN_STATUS_ERROR, message: getErrorMessage(error) });
|
|
217
|
+
span.end();
|
|
218
|
+
return Promise.reject(error);
|
|
219
|
+
});
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
export { PgInstrumentation };
|
|
223
|
+
//# sourceMappingURL=instrumentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentation.js","sources":["../../../../../../src/integrations/tracing/postgres/vendored/instrumentation.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-pg\n * - Upstream version: @opentelemetry/instrumentation-pg@0.70.0\n * - Types from `pg` and `pg-pool` packages inlined as simplified interfaces\n * - Refactored to use Sentry's span APIs instead of OpenTelemetry tracing APIs\n * - Dropped the OTel metrics (no MeterProvider is wired up), the `SemconvStability`\n * dual-emission, and config the SDK never passes (request/response hooks,\n * enhancedDatabaseReporting, addSqlCommenterCommentToQueries)\n */\n\nimport { InstrumentationBase, InstrumentationNodeModuleDefinition, isWrapped } from '@opentelemetry/instrumentation';\nimport type { Span } from '@sentry/core';\nimport {\n getActiveSpan,\n SDK_VERSION,\n SPAN_KIND,\n SPAN_STATUS_ERROR,\n startInactiveSpan,\n withActiveSpan,\n} from '@sentry/core';\nimport { InstrumentationNodeModuleFile } from '../../InstrumentationNodeModuleFile';\nimport { SpanNames } from './enums/SpanNames';\nimport type {\n PgClientConnect,\n PgClientExtended,\n PgPoolCallback,\n PgPoolExtended,\n PostgresCallback,\n} from './internal-types';\nimport type { PgInstrumentationConfig } from './types';\nimport * as utils from './utils';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-pg';\n\nfunction extractModuleExports(module: any): any {\n return module[Symbol.toStringTag] === 'Module'\n ? module.default // ESM\n : module; // CommonJS\n}\n\n/**\n * Binds `callback` to `parentSpan`, so that the span is active again whenever the\n * (deferred) callback runs. This mirrors the upstream `context.bind(context.active(), callback)`:\n * `pg` invokes callbacks outside of the original async scope (e.g. for pooled connections), so we\n * re-establish the trace context to keep spans created inside the callback correctly parented.\n */\nfunction bindCallbackToSpan<T extends (...args: any[]) => any>(parentSpan: Span, callback: T): T {\n return function (this: unknown, ...args: any[]): unknown {\n return withActiveSpan(parentSpan, () => callback.apply(this, args));\n } as T;\n}\n\nexport class PgInstrumentation extends InstrumentationBase<PgInstrumentationConfig> {\n public constructor(config: PgInstrumentationConfig = {}) {\n super(PACKAGE_NAME, SDK_VERSION, config);\n }\n\n protected init(): InstrumentationNodeModuleDefinition[] {\n const SUPPORTED_PG_VERSIONS = ['>=8.0.3 <9'];\n const SUPPORTED_PG_POOL_VERSIONS = ['>=2.0.0 <4'];\n\n const modulePgNativeClient = new InstrumentationNodeModuleFile(\n 'pg/lib/native/client.js',\n SUPPORTED_PG_VERSIONS,\n this._patchPgClient.bind(this),\n this._unpatchPgClient.bind(this),\n );\n\n const modulePgClient = new InstrumentationNodeModuleFile(\n 'pg/lib/client.js',\n SUPPORTED_PG_VERSIONS,\n this._patchPgClient.bind(this),\n this._unpatchPgClient.bind(this),\n );\n\n const modulePG = new InstrumentationNodeModuleDefinition(\n 'pg',\n SUPPORTED_PG_VERSIONS,\n (module: any) => {\n const moduleExports = extractModuleExports(module);\n\n this._patchPgClient(moduleExports.Client);\n return module;\n },\n (module: any) => {\n const moduleExports = extractModuleExports(module);\n\n this._unpatchPgClient(moduleExports.Client);\n return module;\n },\n [modulePgClient, modulePgNativeClient],\n );\n\n const modulePGPool = new InstrumentationNodeModuleDefinition(\n 'pg-pool',\n SUPPORTED_PG_POOL_VERSIONS,\n (module: any) => {\n const moduleExports = extractModuleExports(module);\n if (isWrapped(moduleExports.prototype.connect)) {\n this._unwrap(moduleExports.prototype, 'connect');\n }\n this._wrap(moduleExports.prototype, 'connect', this._getPoolConnectPatch());\n return moduleExports;\n },\n (module: any) => {\n const moduleExports = extractModuleExports(module);\n if (isWrapped(moduleExports.prototype.connect)) {\n this._unwrap(moduleExports.prototype, 'connect');\n }\n },\n );\n\n return [modulePG, modulePGPool];\n }\n\n private _patchPgClient(module: any): any {\n if (!module) {\n return;\n }\n\n const moduleExports = extractModuleExports(module);\n\n if (isWrapped(moduleExports.prototype.query)) {\n this._unwrap(moduleExports.prototype, 'query');\n }\n\n if (isWrapped(moduleExports.prototype.connect)) {\n this._unwrap(moduleExports.prototype, 'connect');\n }\n\n this._wrap(moduleExports.prototype, 'query', this._getClientQueryPatch());\n\n this._wrap(moduleExports.prototype, 'connect', this._getClientConnectPatch());\n\n return module;\n }\n\n private _unpatchPgClient(module: any): any {\n const moduleExports = extractModuleExports(module);\n\n if (isWrapped(moduleExports.prototype.query)) {\n this._unwrap(moduleExports.prototype, 'query');\n }\n\n if (isWrapped(moduleExports.prototype.connect)) {\n this._unwrap(moduleExports.prototype, 'connect');\n }\n\n return module;\n }\n\n private _getClientConnectPatch() {\n const plugin = this;\n return (original: PgClientConnect) => {\n return function connect(this: PgClientExtended, callback?: (...args: unknown[]) => void) {\n if (utils.shouldSkipInstrumentation() || plugin.getConfig().ignoreConnectSpans) {\n return original.call(this, callback);\n }\n\n const span = startInactiveSpan({\n name: SpanNames.CONNECT,\n kind: SPAN_KIND.CLIENT,\n attributes: utils.getSemanticAttributesFromConnection(this),\n });\n\n let cb = callback;\n if (cb) {\n const parentSpan = getActiveSpan();\n cb = utils.patchClientConnectCallback(span, cb);\n if (parentSpan) {\n cb = bindCallbackToSpan(parentSpan, cb);\n }\n }\n\n const connectResult: unknown = withActiveSpan(span, () => {\n return original.call(this, cb);\n });\n\n return handleConnectResult(span, connectResult);\n };\n };\n }\n\n private _getClientQueryPatch() {\n return (original: (...args: any[]) => any) => {\n this._diag.debug('Patching pg.Client.prototype.query');\n return function query(this: PgClientExtended, ...args: unknown[]) {\n if (utils.shouldSkipInstrumentation()) {\n return original.apply(this, args as never);\n }\n\n // client.query(text, cb?), client.query(text, values, cb?), and\n // client.query(configObj, cb?) are all valid signatures. We construct\n // a queryConfig obj from all (valid) signatures to build the span in a\n // unified way. We verify that we at least have query text, and code\n // defensively when dealing with `queryConfig` after that (to handle all\n // the other invalid cases, like a non-array for values being provided).\n // The type casts here reflect only what we've actually validated.\n const arg0 = args[0];\n const firstArgIsString = typeof arg0 === 'string';\n const firstArgIsQueryObjectWithText = utils.isObjectWithTextString(arg0);\n\n const queryConfig = firstArgIsString\n ? {\n text: arg0,\n values: Array.isArray(args[1]) ? args[1] : undefined,\n }\n : firstArgIsQueryObjectWithText\n ? {\n ...(arg0 as any),\n name: arg0.name,\n text: arg0.text,\n values: (arg0 as any).values ?? (Array.isArray(args[1]) ? args[1] : undefined),\n }\n : undefined;\n\n const span = utils.handleConfigQuery.call(this, queryConfig);\n\n // Bind callback (if any) to parent span (if any)\n if (args.length > 0) {\n const parentSpan = getActiveSpan();\n if (typeof args[args.length - 1] === 'function') {\n // Patch ParameterQuery callback\n args[args.length - 1] = utils.patchCallback(span, args[args.length - 1] as PostgresCallback);\n\n // If a parent span exists, bind the callback\n if (parentSpan) {\n args[args.length - 1] = bindCallbackToSpan(parentSpan, args[args.length - 1] as PostgresCallback);\n }\n } else if (typeof queryConfig?.callback === 'function') {\n // Patch ConfigQuery callback\n let callback = utils.patchCallback(span, queryConfig.callback as PostgresCallback);\n\n // If a parent span existed, bind the callback\n if (parentSpan) {\n callback = bindCallbackToSpan(parentSpan, callback);\n }\n\n (args[0] as { callback?: PostgresCallback }).callback = callback;\n }\n }\n\n let result: unknown;\n try {\n result = original.apply(this, args as never);\n } catch (e: unknown) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: utils.getErrorMessage(e) });\n span.end();\n throw e;\n }\n\n // Bind promise to parent span and end the span\n if (result instanceof Promise) {\n return result\n .then((result: unknown) => {\n span.end();\n return result;\n })\n .catch((error: unknown) => {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: utils.getErrorMessage(error) });\n span.end();\n return Promise.reject(error);\n });\n }\n\n // else returns void\n return result; // void\n };\n };\n }\n\n private _getPoolConnectPatch() {\n const plugin = this;\n return (originalConnect: (...args: any[]) => any) => {\n return function connect(this: PgPoolExtended, callback?: PgPoolCallback) {\n if (utils.shouldSkipInstrumentation() || plugin.getConfig().ignoreConnectSpans) {\n return originalConnect.call(this, callback);\n }\n\n const span = startInactiveSpan({\n name: SpanNames.POOL_CONNECT,\n kind: SPAN_KIND.CLIENT,\n attributes: utils.getSemanticAttributesFromPoolConnection(this.options),\n });\n\n let cb = callback;\n if (cb) {\n const parentSpan = getActiveSpan();\n cb = utils.patchCallbackPGPool(span, cb);\n // If a parent span exists, bind the callback\n if (parentSpan) {\n cb = bindCallbackToSpan(parentSpan, cb);\n }\n }\n\n const connectResult: unknown = withActiveSpan(span, () => {\n return originalConnect.call(this, cb);\n });\n\n return handleConnectResult(span, connectResult);\n };\n };\n }\n}\n\nfunction handleConnectResult(span: Span, connectResult: unknown): unknown {\n if (!(connectResult instanceof Promise)) {\n return connectResult;\n }\n\n const connectResultPromise = connectResult as Promise<unknown>;\n // The caller's continuation after `await client.connect()` keeps its trace context via the\n // SDK's async context propagation, so we don't need to re-bind the returned promise.\n return connectResultPromise\n .then(result => {\n span.end();\n return result;\n })\n .catch((error: unknown) => {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: utils.getErrorMessage(error) });\n span.end();\n return Promise.reject(error);\n });\n}\n"],"names":["utils.shouldSkipInstrumentation","utils.getSemanticAttributesFromConnection","utils.patchClientConnectCallback","utils.isObjectWithTextString","utils.handleConfigQuery","utils.patchCallback","utils.getErrorMessage","result","utils.getSemanticAttributesFromPoolConnection","utils.patchCallbackPGPool"],"mappings":";;;;;;AAoCA,MAAM,YAAA,GAAe,4BAAA;AAErB,SAAS,qBAAqB,MAAA,EAAkB;AAC9C,EAAA,OAAO,OAAO,MAAA,CAAO,WAAW,CAAA,KAAM,QAAA,GAClC,OAAO,OAAA,GACP,MAAA;AACN;AAQA,SAAS,kBAAA,CAAsD,YAAkB,QAAA,EAAgB;AAC/F,EAAA,OAAO,YAA4B,IAAA,EAAsB;AACvD,IAAA,OAAO,eAAe,UAAA,EAAY,MAAM,SAAS,KAAA,CAAM,IAAA,EAAM,IAAI,CAAC,CAAA;AAAA,EACpE,CAAA;AACF;AAEO,MAAM,0BAA0B,mBAAA,CAA6C;AAAA,EAC3E,WAAA,CAAY,MAAA,GAAkC,EAAC,EAAG;AACvD,IAAA,KAAA,CAAM,YAAA,EAAc,aAAa,MAAM,CAAA;AAAA,EACzC;AAAA,EAEU,IAAA,GAA8C;AACtD,IAAA,MAAM,qBAAA,GAAwB,CAAC,YAAY,CAAA;AAC3C,IAAA,MAAM,0BAAA,GAA6B,CAAC,YAAY,CAAA;AAEhD,IAAA,MAAM,uBAAuB,IAAI,6BAAA;AAAA,MAC/B,yBAAA;AAAA,MACA,qBAAA;AAAA,MACA,IAAA,CAAK,cAAA,CAAe,IAAA,CAAK,IAAI,CAAA;AAAA,MAC7B,IAAA,CAAK,gBAAA,CAAiB,IAAA,CAAK,IAAI;AAAA,KACjC;AAEA,IAAA,MAAM,iBAAiB,IAAI,6BAAA;AAAA,M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AA,OAAO,oBAAA,CACJ,KAAK,CAAA,MAAA,KAAU;AACd,IAAA,IAAA,CAAK,GAAA,EAAI;AACT,IAAA,OAAO,MAAA;AAAA,EACT,CAAC,CAAA,CACA,KAAA,CAAM,CAAC,KAAA,KAAmB;AACzB,IAAA,IAAA,CAAK,SAAA,CAAU,EAAE,IAAA,EAAM,iBAAA,EAAmB,SAASH,eAAM,CAAgB,KAAK,CAAA,EAAG,CAAA;AACjF,IAAA,IAAA,CAAK,GAAA,EAAI;AACT,IAAA,OAAO,OAAA,CAAQ,OAAO,KAAK,CAAA;AAAA,EAC7B,CAAC,CAAA;AACL;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semconv.js","sources":["../../../../../../src/integrations/tracing/postgres/vendored/semconv.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-pg\n * - Upstream version: @opentelemetry/instrumentation-pg@0.70.0\n * - Trimmed to the (old) semantic conventions the SDK actually emits\n */\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 * @deprecated Replaced by `server.address` and `server.port`.\n */\nexport const ATTR_DB_CONNECTION_STRING = 'db.connection_string' as const;\n\n/**\n * Enum value \"postgresql\" for attribute `db.system`.\n */\nexport const DB_SYSTEM_VALUE_POSTGRESQL = 'postgresql' as const;\n"],"names":[],"mappings":"AAuBO,MAAM,yBAAA,GAA4B;AAKlC,MAAM,0BAAA,GAA6B;;;;"}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { getActiveSpan, SPAN_STATUS_ERROR, startInactiveSpan, SPAN_KIND, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN } from '@sentry/core';
|
|
2
|
+
import { AttributeNames } from './enums/AttributeNames.js';
|
|
3
|
+
import { SpanNames } from './enums/SpanNames.js';
|
|
4
|
+
import { DB_SYSTEM_VALUE_POSTGRESQL, ATTR_DB_CONNECTION_STRING } from './semconv.js';
|
|
5
|
+
import { NET_PEER_PORT, NET_PEER_NAME, DB_USER, DB_NAME, DB_SYSTEM, DB_STATEMENT } from '@sentry/conventions/attributes';
|
|
6
|
+
|
|
7
|
+
const ORIGIN = "auto.db.otel.postgres";
|
|
8
|
+
function getQuerySpanName(dbName, queryConfig) {
|
|
9
|
+
if (!queryConfig) return SpanNames.QUERY_PREFIX;
|
|
10
|
+
const command = typeof queryConfig.name === "string" && queryConfig.name ? queryConfig.name : parseNormalizedOperationName(queryConfig.text);
|
|
11
|
+
return `${SpanNames.QUERY_PREFIX}:${command}${dbName ? ` ${dbName}` : ""}`;
|
|
12
|
+
}
|
|
13
|
+
function parseNormalizedOperationName(queryText) {
|
|
14
|
+
const trimmedQuery = queryText.trim();
|
|
15
|
+
const indexOfFirstSpace = trimmedQuery.indexOf(" ");
|
|
16
|
+
let sqlCommand = indexOfFirstSpace === -1 ? trimmedQuery : trimmedQuery.slice(0, indexOfFirstSpace);
|
|
17
|
+
sqlCommand = sqlCommand.toUpperCase();
|
|
18
|
+
return sqlCommand.endsWith(";") ? sqlCommand.slice(0, -1) : sqlCommand;
|
|
19
|
+
}
|
|
20
|
+
function parseAndMaskConnectionString(connectionString) {
|
|
21
|
+
try {
|
|
22
|
+
const url = new URL(connectionString);
|
|
23
|
+
url.username = "";
|
|
24
|
+
url.password = "";
|
|
25
|
+
return url.toString();
|
|
26
|
+
} catch {
|
|
27
|
+
return "postgresql://localhost:5432/";
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
function getConnectionString(params) {
|
|
31
|
+
if ("connectionString" in params && params.connectionString) {
|
|
32
|
+
return parseAndMaskConnectionString(params.connectionString);
|
|
33
|
+
}
|
|
34
|
+
const host = params.host || "localhost";
|
|
35
|
+
const port = params.port || 5432;
|
|
36
|
+
const database = params.database || "";
|
|
37
|
+
return `postgresql://${host}:${port}/${database}`;
|
|
38
|
+
}
|
|
39
|
+
function getPort(port) {
|
|
40
|
+
if (Number.isInteger(port)) {
|
|
41
|
+
return port;
|
|
42
|
+
}
|
|
43
|
+
return void 0;
|
|
44
|
+
}
|
|
45
|
+
function getSemanticAttributesFromConnection(params) {
|
|
46
|
+
return {
|
|
47
|
+
[DB_SYSTEM]: DB_SYSTEM_VALUE_POSTGRESQL,
|
|
48
|
+
[DB_NAME]: params.database,
|
|
49
|
+
[ATTR_DB_CONNECTION_STRING]: getConnectionString(params),
|
|
50
|
+
[DB_USER]: params.user,
|
|
51
|
+
[NET_PEER_NAME]: params.host,
|
|
52
|
+
// required
|
|
53
|
+
[NET_PEER_PORT]: getPort(params.port)
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function getSemanticAttributesFromPoolConnection(params) {
|
|
57
|
+
let url;
|
|
58
|
+
try {
|
|
59
|
+
url = params.connectionString ? new URL(params.connectionString) : void 0;
|
|
60
|
+
} catch {
|
|
61
|
+
url = void 0;
|
|
62
|
+
}
|
|
63
|
+
return {
|
|
64
|
+
[AttributeNames.IDLE_TIMEOUT_MILLIS]: params.idleTimeoutMillis,
|
|
65
|
+
[AttributeNames.MAX_CLIENT]: params.maxClient,
|
|
66
|
+
[DB_SYSTEM]: DB_SYSTEM_VALUE_POSTGRESQL,
|
|
67
|
+
[DB_NAME]: url?.pathname.slice(1) ?? params.database,
|
|
68
|
+
[ATTR_DB_CONNECTION_STRING]: getConnectionString(params),
|
|
69
|
+
[NET_PEER_NAME]: url?.hostname ?? params.host,
|
|
70
|
+
[NET_PEER_PORT]: Number(url?.port) || getPort(params.port),
|
|
71
|
+
[DB_USER]: url?.username ?? params.user
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
function shouldSkipInstrumentation() {
|
|
75
|
+
return getActiveSpan() === void 0;
|
|
76
|
+
}
|
|
77
|
+
function handleConfigQuery(queryConfig) {
|
|
78
|
+
const { connectionParameters } = this;
|
|
79
|
+
const dbName = connectionParameters.database;
|
|
80
|
+
const spanName = getQuerySpanName(dbName, queryConfig);
|
|
81
|
+
const span = startInactiveSpan({
|
|
82
|
+
name: spanName,
|
|
83
|
+
kind: SPAN_KIND.CLIENT,
|
|
84
|
+
attributes: {
|
|
85
|
+
...getSemanticAttributesFromConnection(connectionParameters),
|
|
86
|
+
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
if (!queryConfig) {
|
|
90
|
+
return span;
|
|
91
|
+
}
|
|
92
|
+
if (queryConfig.text) {
|
|
93
|
+
span.setAttribute(DB_STATEMENT, queryConfig.text);
|
|
94
|
+
}
|
|
95
|
+
if (typeof queryConfig.name === "string") {
|
|
96
|
+
span.setAttribute(AttributeNames.PG_PLAN, queryConfig.name);
|
|
97
|
+
}
|
|
98
|
+
return span;
|
|
99
|
+
}
|
|
100
|
+
function patchCallback(span, cb) {
|
|
101
|
+
return function patchedCallback(err, res) {
|
|
102
|
+
if (err) {
|
|
103
|
+
span.setStatus({ code: SPAN_STATUS_ERROR, message: err.message });
|
|
104
|
+
}
|
|
105
|
+
span.end();
|
|
106
|
+
cb.call(this, err, res);
|
|
107
|
+
};
|
|
108
|
+
}
|
|
109
|
+
function patchCallbackPGPool(span, cb) {
|
|
110
|
+
return function patchedCallback(err, res, done) {
|
|
111
|
+
if (err) {
|
|
112
|
+
span.setStatus({ code: SPAN_STATUS_ERROR, message: err.message });
|
|
113
|
+
}
|
|
114
|
+
span.end();
|
|
115
|
+
cb.call(this, err, res, done);
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
function patchClientConnectCallback(span, cb) {
|
|
119
|
+
return function patchedClientConnectCallback(...args) {
|
|
120
|
+
const err = args[0];
|
|
121
|
+
if (err instanceof Error) {
|
|
122
|
+
span.setStatus({ code: SPAN_STATUS_ERROR, message: err.message });
|
|
123
|
+
}
|
|
124
|
+
span.end();
|
|
125
|
+
cb.apply(this, args);
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function getErrorMessage(e) {
|
|
129
|
+
return typeof e === "object" && e !== null && "message" in e ? String(e.message) : void 0;
|
|
130
|
+
}
|
|
131
|
+
function isObjectWithTextString(it) {
|
|
132
|
+
return typeof it === "object" && typeof it?.text === "string";
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
export { ORIGIN, getConnectionString, getErrorMessage, getQuerySpanName, getSemanticAttributesFromConnection, getSemanticAttributesFromPoolConnection, handleConfigQuery, isObjectWithTextString, parseAndMaskConnectionString, parseNormalizedOperationName, patchCallback, patchCallbackPGPool, patchClientConnectCallback, shouldSkipInstrumentation };
|
|
136
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../../../src/integrations/tracing/postgres/vendored/utils.ts"],"sourcesContent":["/*\n * Copyright The OpenTelemetry Authors\n * SPDX-License-Identifier: Apache-2.0\n *\n * NOTICE from the Sentry authors:\n * - Vendored from: https://github.com/open-telemetry/opentelemetry-js-contrib/tree/15ef7506553f631ea4181391e0c5725a56f0d082/packages/instrumentation-pg\n * - Upstream version: @opentelemetry/instrumentation-pg@0.70.0\n * - Types from `pg` package inlined as simplified interfaces\n * - Refactored to use Sentry's span APIs instead of OpenTelemetry tracing APIs\n */\n\nimport type { Span, SpanAttributes } from '@sentry/core';\nimport {\n getActiveSpan,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n SPAN_KIND,\n SPAN_STATUS_ERROR,\n startInactiveSpan,\n} from '@sentry/core';\nimport { AttributeNames } from './enums/AttributeNames';\nimport { SpanNames } from './enums/SpanNames';\nimport type {\n PgClientExtended,\n PgParsedConnectionParams,\n PgPoolCallback,\n PgPoolExtended,\n PgPoolOptionsParams,\n PostgresCallback,\n} from './internal-types';\nimport type { PgClient } from './pg-types';\nimport { ATTR_DB_CONNECTION_STRING, DB_SYSTEM_VALUE_POSTGRESQL } from './semconv';\nimport {\n DB_NAME,\n DB_STATEMENT,\n DB_SYSTEM,\n DB_USER,\n NET_PEER_NAME,\n NET_PEER_PORT,\n} from '@sentry/conventions/attributes';\n\n/* oxlint-disable typescript/no-deprecated */\n\nexport const ORIGIN = 'auto.db.otel.postgres';\n\n/**\n * Helper function to get a low cardinality span name from whatever info we have\n * about the query.\n *\n * This is tricky, because we don't have most of the information (table name,\n * operation name, etc) the spec recommends using to build a low-cardinality\n * value w/o parsing. So, we use db.name and assume that, if the query's a named\n * prepared statement, those `name` values will be low cardinality. If we don't\n * have a named prepared statement, we try to parse an operation (despite the\n * spec's warnings).\n *\n * @params dbName The name of the db against which this query is being issued,\n * which could be missing if no db name was given at the time that the\n * connection was established.\n * @params queryConfig Information we have about the query being issued, typed\n * to reflect only the validation we've actually done on the args to\n * `client.query()`. This will be undefined if `client.query()` was called\n * with invalid arguments.\n */\nexport function getQuerySpanName(dbName: string | undefined, queryConfig?: { text: string; name?: unknown }): string {\n // NB: when the query config is invalid, we omit the dbName too, so that\n // someone (or some tool) reading the span name doesn't misinterpret the\n // dbName as being a prepared statement or sql commit name.\n if (!queryConfig) return SpanNames.QUERY_PREFIX;\n\n // Either the name of a prepared statement; or an attempted parse\n // of the SQL command, normalized to uppercase; or unknown.\n const command =\n typeof queryConfig.name === 'string' && queryConfig.name\n ? queryConfig.name\n : parseNormalizedOperationName(queryConfig.text);\n\n return `${SpanNames.QUERY_PREFIX}:${command}${dbName ? ` ${dbName}` : ''}`;\n}\n\nexport function parseNormalizedOperationName(queryText: string): string {\n // Trim the query text to handle leading/trailing whitespace\n const trimmedQuery = queryText.trim();\n const indexOfFirstSpace = trimmedQuery.indexOf(' ');\n let sqlCommand = indexOfFirstSpace === -1 ? trimmedQuery : trimmedQuery.slice(0, indexOfFirstSpace);\n sqlCommand = sqlCommand.toUpperCase();\n\n // Handle query text being \"COMMIT;\", which has an extra semicolon before the space.\n return sqlCommand.endsWith(';') ? sqlCommand.slice(0, -1) : sqlCommand;\n}\n\nexport function parseAndMaskConnectionString(connectionString: string): string {\n try {\n // Parse the connection string\n const url = new URL(connectionString);\n\n // Remove all auth information (username and password)\n url.username = '';\n url.password = '';\n\n return url.toString();\n } catch {\n // If parsing fails, return a generic connection string\n return 'postgresql://localhost:5432/';\n }\n}\n\nexport function getConnectionString(params: PgParsedConnectionParams | PgPoolOptionsParams): string {\n if ('connectionString' in params && params.connectionString) {\n return parseAndMaskConnectionString(params.connectionString);\n }\n const host = params.host || 'localhost';\n const port = params.port || 5432;\n const database = params.database || '';\n return `postgresql://${host}:${port}/${database}`;\n}\n\nfunction getPort(port: number | undefined): number | undefined {\n // Port may be NaN as parseInt() is used on the value, passing null will result in NaN being parsed.\n // https://github.com/brianc/node-postgres/blob/2a8efbee09a284be12748ed3962bc9b816965e36/packages/pg/lib/connection-parameters.js#L66\n if (Number.isInteger(port)) {\n return port;\n }\n\n // Unable to find the default used in pg code, so falling back to 'undefined'.\n return undefined;\n}\n\nexport function getSemanticAttributesFromConnection(params: PgParsedConnectionParams): SpanAttributes {\n return {\n [DB_SYSTEM]: DB_SYSTEM_VALUE_POSTGRESQL,\n [DB_NAME]: params.database,\n [ATTR_DB_CONNECTION_STRING]: getConnectionString(params),\n [DB_USER]: params.user,\n [NET_PEER_NAME]: params.host, // required\n [NET_PEER_PORT]: getPort(params.port),\n };\n}\n\nexport function getSemanticAttributesFromPoolConnection(params: PgPoolOptionsParams): SpanAttributes {\n let url: URL | undefined;\n try {\n url = params.connectionString ? new URL(params.connectionString) : undefined;\n } catch {\n url = undefined;\n }\n\n return {\n [AttributeNames.IDLE_TIMEOUT_MILLIS]: params.idleTimeoutMillis,\n [AttributeNames.MAX_CLIENT]: params.maxClient,\n [DB_SYSTEM]: DB_SYSTEM_VALUE_POSTGRESQL,\n [DB_NAME]: url?.pathname.slice(1) ?? params.database,\n [ATTR_DB_CONNECTION_STRING]: getConnectionString(params),\n [NET_PEER_NAME]: url?.hostname ?? params.host,\n [NET_PEER_PORT]: Number(url?.port) || getPort(params.port),\n [DB_USER]: url?.username ?? params.user,\n };\n}\n\n/**\n * The SDK always requires a parent span (it sets `requireParentSpan: true`), so\n * we only instrument when there is an active span to parent the new span under.\n */\nexport function shouldSkipInstrumentation(): boolean {\n return getActiveSpan() === undefined;\n}\n\n// Create an (inactive) span from our normalized queryConfig object,\n// or return a basic span if no queryConfig was given/could be created.\nexport function handleConfigQuery(\n this: PgClientExtended,\n queryConfig?: { text: string; values?: unknown; name?: unknown },\n): Span {\n // Create child span.\n const { connectionParameters } = this;\n const dbName = connectionParameters.database;\n\n const spanName = getQuerySpanName(dbName, queryConfig);\n const span = startInactiveSpan({\n name: spanName,\n kind: SPAN_KIND.CLIENT,\n attributes: {\n ...getSemanticAttributesFromConnection(connectionParameters),\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN,\n },\n });\n\n if (!queryConfig) {\n return span;\n }\n\n // Set attributes\n if (queryConfig.text) {\n span.setAttribute(DB_STATEMENT, queryConfig.text);\n }\n\n // Set plan name attribute, if present\n if (typeof queryConfig.name === 'string') {\n span.setAttribute(AttributeNames.PG_PLAN, queryConfig.name);\n }\n\n return span;\n}\n\nexport function patchCallback(span: Span, cb: PostgresCallback): PostgresCallback {\n return function patchedCallback(this: PgClientExtended, err: Error, res: object) {\n if (err) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: err.message });\n }\n span.end();\n cb.call(this, err, res);\n };\n}\n\nexport function patchCallbackPGPool(span: Span, cb: PgPoolCallback): PgPoolCallback {\n return function patchedCallback(this: PgPoolExtended, err: Error, res: object, done: any) {\n if (err) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: err.message });\n }\n span.end();\n cb.call(this, err, res, done);\n };\n}\n\nexport function patchClientConnectCallback(span: Span, cb: (...args: unknown[]) => void): (...args: unknown[]) => void {\n return function patchedClientConnectCallback(this: PgClient, ...args: unknown[]) {\n const err = args[0];\n if (err instanceof Error) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: err.message });\n }\n span.end();\n cb.apply(this, args);\n };\n}\n\n/**\n * Attempt to get a message string from a thrown value, while being quite\n * defensive, to recognize the fact that, in JS, any kind of value (even\n * primitives) can be thrown.\n */\nexport function getErrorMessage(e: unknown): string | undefined {\n return typeof e === 'object' && e !== null && 'message' in e\n ? String((e as { message?: unknown }).message)\n : undefined;\n}\n\nexport function isObjectWithTextString(it: unknown): it is ObjectWithText {\n return typeof it === 'object' && typeof (it as null | { text?: unknown })?.text === 'string';\n}\n\nexport type ObjectWithText = {\n text: string;\n [k: string]: unknown;\n};\n"],"names":[],"mappings":";;;;;;AA0CO,MAAM,MAAA,GAAS;AAqBf,SAAS,gBAAA,CAAiB,QAA4B,WAAA,EAAwD;AAInH,EAAA,IAAI,CAAC,WAAA,EAAa,OAAO,SAAA,CAAU,YAAA;AAInC,EAAA,MAAM,OAAA,GACJ,OAAO,WAAA,CAAY,IAAA,KAAS,QAAA,IAAY,WAAA,CAAY,IAAA,GAChD,WAAA,CAAY,IAAA,GACZ,4BAAA,CAA6B,WAAA,CAAY,IAAI,CAAA;AAEnD,EAAA,OAAO,CAAA,EAAG,SAAA,CAAU,YAAY,CAAA,CAAA,EAAI,OAAO,GAAG,MAAA,GAAS,CAAA,CAAA,EAAI,MAAM,CAAA,CAAA,GAAK,EAAE,CAAA,CAAA;AAC1E;AAEO,SAAS,6BAA6B,SAAA,EAA2B;AAEtE,EAAA,MAAM,YAAA,GAAe,UAAU,IAAA,EAAK;AACpC,EAAA,MAAM,iBAAA,GAAoB,YAAA,CAAa,OAAA,CAAQ,GAAG,CAAA;AAClD,EAAA,IAAI,aAAa,iBAAA,KAAsB,EAAA,GAAK,eAAe,YAAA,CAAa,KAAA,CAAM,GAAG,iBAAiB,CAAA;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