@depup/sentry__node 10.48.0-depup.0 → 10.67.0-depup.1
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 +7 -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 +13 -9
- package/package.json +37 -44
- 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
|
@@ -1,58 +1,94 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
2
|
|
|
3
3
|
const instrumentation = require('@opentelemetry/instrumentation');
|
|
4
|
+
const InstrumentationNodeModuleFile = require('../InstrumentationNodeModuleFile.js');
|
|
4
5
|
const core = require('@sentry/core');
|
|
5
6
|
|
|
6
|
-
const supportedVersions = [
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Sentry LangGraph instrumentation using OpenTelemetry.
|
|
10
|
-
*/
|
|
7
|
+
const supportedVersions = [">=0.0.0 <2.0.0"];
|
|
11
8
|
class SentryLangGraphInstrumentation extends instrumentation.InstrumentationBase {
|
|
12
|
-
|
|
13
|
-
super(
|
|
9
|
+
constructor(config = {}) {
|
|
10
|
+
super("@sentry/instrumentation-langgraph", core.SDK_VERSION, config);
|
|
14
11
|
}
|
|
15
|
-
|
|
16
12
|
/**
|
|
17
13
|
* Initializes the instrumentation by defining the modules to be patched.
|
|
18
14
|
*/
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
15
|
+
init() {
|
|
16
|
+
return [
|
|
17
|
+
new instrumentation.InstrumentationNodeModuleDefinition(
|
|
18
|
+
"@langchain/langgraph",
|
|
19
|
+
supportedVersions,
|
|
20
|
+
this._patch.bind(this),
|
|
21
|
+
(exports) => exports,
|
|
22
|
+
[
|
|
23
|
+
new InstrumentationNodeModuleFile.InstrumentationNodeModuleFile(
|
|
24
|
+
/**
|
|
25
|
+
* In CJS, LangGraph packages re-export from dist/index.cjs files.
|
|
26
|
+
* Patching only the root module sometimes misses the real implementation or
|
|
27
|
+
* gets overwritten when that file is loaded. We add a file-level patch so that
|
|
28
|
+
* _patch runs again on the concrete implementation
|
|
29
|
+
*/
|
|
30
|
+
"@langchain/langgraph/dist/index.cjs",
|
|
31
|
+
supportedVersions,
|
|
32
|
+
this._patch.bind(this),
|
|
33
|
+
(exports) => exports
|
|
34
|
+
),
|
|
35
|
+
new InstrumentationNodeModuleFile.InstrumentationNodeModuleFile(
|
|
36
|
+
/**
|
|
37
|
+
* In CJS, the prebuilt submodule re-exports from dist/prebuilt/index.cjs.
|
|
38
|
+
* We add a file-level patch under the main module so that CJS require()
|
|
39
|
+
* of @langchain/langgraph/prebuilt gets patched.
|
|
40
|
+
*/
|
|
41
|
+
"@langchain/langgraph/dist/prebuilt/index.cjs",
|
|
42
|
+
supportedVersions,
|
|
43
|
+
this._patch.bind(this),
|
|
44
|
+
(exports) => exports
|
|
45
|
+
)
|
|
46
|
+
]
|
|
47
|
+
),
|
|
48
|
+
new instrumentation.InstrumentationNodeModuleDefinition(
|
|
49
|
+
"@langchain/langgraph/prebuilt",
|
|
50
|
+
supportedVersions,
|
|
51
|
+
this._patch.bind(this),
|
|
52
|
+
(exports) => exports,
|
|
53
|
+
[
|
|
54
|
+
new InstrumentationNodeModuleFile.InstrumentationNodeModuleFile(
|
|
55
|
+
/**
|
|
56
|
+
* In CJS, the prebuilt submodule re-exports from dist/prebuilt/index.cjs.
|
|
57
|
+
* We add file-level patches so _patch runs on the concrete implementation.
|
|
58
|
+
*/
|
|
59
|
+
"@langchain/langgraph/dist/prebuilt/index.cjs",
|
|
60
|
+
supportedVersions,
|
|
61
|
+
this._patch.bind(this),
|
|
62
|
+
(exports) => exports
|
|
63
|
+
)
|
|
64
|
+
]
|
|
65
|
+
)
|
|
66
|
+
];
|
|
41
67
|
}
|
|
42
|
-
|
|
43
68
|
/**
|
|
44
69
|
* Core patch logic applying instrumentation to the LangGraph module.
|
|
45
70
|
*/
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
)
|
|
71
|
+
_patch(exports) {
|
|
72
|
+
const client = core.getClient();
|
|
73
|
+
const genAI = client?.getDataCollectionOptions().genAI;
|
|
74
|
+
const options = {
|
|
75
|
+
...this.getConfig(),
|
|
76
|
+
recordInputs: this.getConfig().recordInputs ?? genAI?.inputs ?? false,
|
|
77
|
+
recordOutputs: this.getConfig().recordOutputs ?? genAI?.outputs ?? false
|
|
78
|
+
};
|
|
79
|
+
if (exports.StateGraph && typeof exports.StateGraph === "function") {
|
|
80
|
+
core.instrumentLangGraph(exports.StateGraph.prototype, options);
|
|
53
81
|
}
|
|
54
|
-
|
|
55
|
-
|
|
82
|
+
if (exports.createReactAgent && typeof exports.createReactAgent === "function") {
|
|
83
|
+
const originalCreateReactAgent = exports.createReactAgent;
|
|
84
|
+
Object.defineProperty(exports, "createReactAgent", {
|
|
85
|
+
value: core.instrumentCreateReactAgent(originalCreateReactAgent, options),
|
|
86
|
+
writable: true,
|
|
87
|
+
enumerable: true,
|
|
88
|
+
configurable: true
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
return exports;
|
|
56
92
|
}
|
|
57
93
|
}
|
|
58
94
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.js","sources":["../../../../../src/integrations/tracing/langgraph/instrumentation.ts"],"sourcesContent":["import {\n InstrumentationBase,\n type InstrumentationConfig,\n type InstrumentationModuleDefinition,\n InstrumentationNodeModuleDefinition,\n
|
|
1
|
+
{"version":3,"file":"instrumentation.js","sources":["../../../../../src/integrations/tracing/langgraph/instrumentation.ts"],"sourcesContent":["import {\n InstrumentationBase,\n type InstrumentationConfig,\n type InstrumentationModuleDefinition,\n InstrumentationNodeModuleDefinition,\n} from '@opentelemetry/instrumentation';\nimport { InstrumentationNodeModuleFile } from '../InstrumentationNodeModuleFile';\nimport type { CompiledGraph, LangGraphOptions } from '@sentry/core';\nimport { getClient, instrumentCreateReactAgent, instrumentLangGraph, SDK_VERSION } from '@sentry/core';\n\nconst supportedVersions = ['>=0.0.0 <2.0.0'];\n\ntype LangGraphInstrumentationOptions = InstrumentationConfig & LangGraphOptions;\n\n/**\n * Represents the patched shape of the LangGraph module export.\n */\ninterface PatchedModuleExports {\n [key: string]: unknown;\n StateGraph?: abstract new (...args: unknown[]) => unknown;\n createReactAgent?: (...args: unknown[]) => CompiledGraph;\n}\n\n/**\n * Sentry LangGraph instrumentation using OpenTelemetry.\n */\nexport class SentryLangGraphInstrumentation extends InstrumentationBase<LangGraphInstrumentationOptions> {\n public constructor(config: LangGraphInstrumentationOptions = {}) {\n super('@sentry/instrumentation-langgraph', SDK_VERSION, config);\n }\n\n /**\n * Initializes the instrumentation by defining the modules to be patched.\n */\n public init(): InstrumentationModuleDefinition[] {\n return [\n new InstrumentationNodeModuleDefinition(\n '@langchain/langgraph',\n supportedVersions,\n this._patch.bind(this),\n exports => exports,\n [\n new InstrumentationNodeModuleFile(\n /**\n * In CJS, LangGraph packages re-export from dist/index.cjs files.\n * Patching only the root module sometimes misses the real implementation or\n * gets overwritten when that file is loaded. We add a file-level patch so that\n * _patch runs again on the concrete implementation\n */\n '@langchain/langgraph/dist/index.cjs',\n supportedVersions,\n this._patch.bind(this),\n exports => exports,\n ),\n new InstrumentationNodeModuleFile(\n /**\n * In CJS, the prebuilt submodule re-exports from dist/prebuilt/index.cjs.\n * We add a file-level patch under the main module so that CJS require()\n * of @langchain/langgraph/prebuilt gets patched.\n */\n '@langchain/langgraph/dist/prebuilt/index.cjs',\n supportedVersions,\n this._patch.bind(this),\n exports => exports,\n ),\n ],\n ),\n new InstrumentationNodeModuleDefinition(\n '@langchain/langgraph/prebuilt',\n supportedVersions,\n this._patch.bind(this),\n exports => exports,\n [\n new InstrumentationNodeModuleFile(\n /**\n * In CJS, the prebuilt submodule re-exports from dist/prebuilt/index.cjs.\n * We add file-level patches so _patch runs on the concrete implementation.\n */\n '@langchain/langgraph/dist/prebuilt/index.cjs',\n supportedVersions,\n this._patch.bind(this),\n exports => exports,\n ),\n ],\n ),\n ];\n }\n\n /**\n * Core patch logic applying instrumentation to the LangGraph module.\n */\n private _patch(exports: PatchedModuleExports): PatchedModuleExports | void {\n const client = getClient();\n const genAI = client?.getDataCollectionOptions().genAI;\n const options = {\n ...this.getConfig(),\n recordInputs: this.getConfig().recordInputs ?? genAI?.inputs ?? false,\n recordOutputs: this.getConfig().recordOutputs ?? genAI?.outputs ?? false,\n };\n\n // Patch StateGraph.compile to instrument both compile() and invoke()\n if (exports.StateGraph && typeof exports.StateGraph === 'function') {\n instrumentLangGraph(exports.StateGraph.prototype as { compile: (...args: unknown[]) => unknown }, options);\n }\n\n // Patch createReactAgent to instrument agent creation and invocation\n if (exports.createReactAgent && typeof exports.createReactAgent === 'function') {\n const originalCreateReactAgent = exports.createReactAgent;\n Object.defineProperty(exports, 'createReactAgent', {\n value: instrumentCreateReactAgent(originalCreateReactAgent as (...args: unknown[]) => CompiledGraph, options),\n writable: true,\n enumerable: true,\n configurable: true,\n });\n }\n\n return exports;\n }\n}\n"],"names":["InstrumentationBase","SDK_VERSION","InstrumentationNodeModuleDefinition","InstrumentationNodeModuleFile","getClient","instrumentLangGraph","instrumentCreateReactAgent"],"mappings":";;;;;;AAU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AA,EAKQ,OAAO,OAAA,EAA4D;AACzE,IAAA,MAAM,SAASC,cAAA,EAAU;AACzB,IAAA,MAAM,KAAA,GAAQ,MAAA,EAAQ,wBAAA,EAAyB,CAAE,KAAA;AACjD,IAAA,MAAM,OAAA,GAAU;AAAA,MACd,GAAG,KAAK,SAAA,EAAU;AAAA,MAClB,cAAc,IAAA,CAAK,SAAA,EAAU,CAAE,YAAA,IAAgB,OAAO,MAAA,IAAU,KAAA;AAAA,MAChE,eAAe,IAAA,CAAK,SAAA,EAAU,CAAE,aAAA,IAAiB,OAAO,OAAA,IAAW;AAAA,KACrE;AAGA,IAAA,IAAI,OAAA,CAAQ,UAAA,IAAc,OAAO,OAAA,CAAQ,eAAe,UAAA,EAAY;AAClE,MAAAC,wBAAA,CAAoB,OAAA,CAAQ,UAAA,CAAW,SAAA,EAA2D,OAAO,CAAA;AAAA,IAC3G;AAGA,IAAA,IAAI,OAAA,CAAQ,gBAAA,IAAoB,OAAO,OAAA,CAAQ,qBAAqB,UAAA,EAAY;AAC9E,MAAA,MAAM,2BAA2B,OAAA,CAAQ,gBAAA;AACzC,MAAA,MAAA,CAAO,cAAA,CAAe,SAAS,kBAAA,EAAoB;AAAA,QACjD,KAAA,EAAOC,+BAAA,CAA2B,wBAAA,EAAmE,OAAO,CAAA;AAAA,QAC5G,QAAA,EAAU,IAAA;AAAA,QACV,UAAA,EAAY,IAAA;AAAA,QACZ,YAAA,EAAc;AAAA,OACf,CAAA;AAAA,IACH;AAEA,IAAA,OAAO,OAAA;AAAA,EACT;AACF;;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const instrumentation = require('./vendored/instrumentation.js');
|
|
4
|
+
const core = require('@sentry/core');
|
|
5
|
+
const nodeCore = require('@sentry/node-core');
|
|
6
|
+
|
|
7
|
+
const INTEGRATION_NAME = "LruMemoizer";
|
|
8
|
+
const instrumentLruMemoizer = nodeCore.generateInstrumentOnce(INTEGRATION_NAME, () => new instrumentation.LruMemoizerInstrumentation());
|
|
9
|
+
const _lruMemoizerIntegration = (() => {
|
|
10
|
+
return {
|
|
11
|
+
name: INTEGRATION_NAME,
|
|
12
|
+
setupOnce() {
|
|
13
|
+
instrumentLruMemoizer();
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
const lruMemoizerIntegration = core.defineIntegration(_lruMemoizerIntegration);
|
|
18
|
+
|
|
19
|
+
exports.instrumentLruMemoizer = instrumentLruMemoizer;
|
|
20
|
+
exports.lruMemoizerIntegration = lruMemoizerIntegration;
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/lrumemoizer/index.ts"],"sourcesContent":["import { LruMemoizerInstrumentation } from './vendored/instrumentation';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport { generateInstrumentOnce } from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'LruMemoizer' as const;\n\nexport const instrumentLruMemoizer = generateInstrumentOnce(INTEGRATION_NAME, () => new LruMemoizerInstrumentation());\n\nconst _lruMemoizerIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentLruMemoizer();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [lru-memoizer](https://www.npmjs.com/package/lru-memoizer) library.\n *\n * For more information, see the [`lruMemoizerIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/lrumemoizer/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.lruMemoizerIntegration()],\n * });\n */\nexport const lruMemoizerIntegration = defineIntegration(_lruMemoizerIntegration);\n"],"names":["generateInstrumentOnce","LruMemoizerInstrumentation","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,gBAAA,GAAmB,aAAA;AAElB,MAAM,wBAAwBA,+BAAA,CAAuB,gBAAA,EAAkB,MAAM,IAAIC,4CAA4B;AAEpH,MAAM,2BAA2B,MAAM;AACrC,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,qBAAA,EAAsB;AAAA,IACxB;AAAA,GACF;AACF,CAAA,CAAA;AAeO,MAAM,sBAAA,GAAyBC,uBAAkB,uBAAuB;;;;;"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const instrumentation = require('@opentelemetry/instrumentation');
|
|
4
|
+
const core = require('@sentry/core');
|
|
5
|
+
|
|
6
|
+
const PACKAGE_NAME = "@sentry/instrumentation-lru-memoizer";
|
|
7
|
+
class LruMemoizerInstrumentation extends instrumentation.InstrumentationBase {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(PACKAGE_NAME, core.SDK_VERSION, {});
|
|
10
|
+
}
|
|
11
|
+
init() {
|
|
12
|
+
return [
|
|
13
|
+
new instrumentation.InstrumentationNodeModuleDefinition(
|
|
14
|
+
"lru-memoizer",
|
|
15
|
+
[">=1.3 <4"],
|
|
16
|
+
(moduleExports) => {
|
|
17
|
+
const asyncMemoizer = function(...args) {
|
|
18
|
+
const origMemoizer = moduleExports.apply(this, args);
|
|
19
|
+
return function(...memoizerArgs) {
|
|
20
|
+
const origCallback = memoizerArgs.pop();
|
|
21
|
+
const scope = core.getCurrentScope();
|
|
22
|
+
const callbackWithContext = typeof origCallback === "function" ? function(...callbackArgs) {
|
|
23
|
+
return core.withScope(scope, () => origCallback.apply(this, callbackArgs));
|
|
24
|
+
} : origCallback;
|
|
25
|
+
return origMemoizer.apply(this, [...memoizerArgs, callbackWithContext]);
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
return Object.assign(asyncMemoizer, { sync: moduleExports.sync });
|
|
29
|
+
},
|
|
30
|
+
void 0
|
|
31
|
+
// no need to disable as this instrumentation does not create any spans
|
|
32
|
+
)
|
|
33
|
+
];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
exports.LruMemoizerInstrumentation = LruMemoizerInstrumentation;
|
|
38
|
+
//# sourceMappingURL=instrumentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentation.js","sources":["../../../../../../src/integrations/tracing/lrumemoizer/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-lru-memoizer\n * - Upstream version: @opentelemetry/instrumentation-lru-memoizer@0.62.0\n */\n\nimport { InstrumentationBase, InstrumentationNodeModuleDefinition } from '@opentelemetry/instrumentation';\nimport { getCurrentScope, SDK_VERSION, withScope } from '@sentry/core';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-lru-memoizer';\n\ntype Memoizer = (this: unknown, ...args: unknown[]) => unknown;\ntype LruMemoizerModule = ((this: unknown, ...args: unknown[]) => Memoizer) & { sync: unknown };\n\nexport class LruMemoizerInstrumentation extends InstrumentationBase {\n constructor() {\n super(PACKAGE_NAME, SDK_VERSION, {});\n }\n\n init(): InstrumentationNodeModuleDefinition[] {\n return [\n new InstrumentationNodeModuleDefinition(\n 'lru-memoizer',\n ['>=1.3 <4'],\n (moduleExports: LruMemoizerModule) => {\n // moduleExports is a function which receives an options object,\n // and returns a \"memoizer\" function upon invocation.\n // We want to patch this \"memoizer's\" internal function\n const asyncMemoizer = function (this: unknown, ...args: unknown[]): unknown {\n // This following function is invoked every time the user wants to get a (possible) memoized value\n // We replace it with another function in which we bind the current context to the last argument (callback)\n const origMemoizer = moduleExports.apply(this, args) as Memoizer;\n return function (this: unknown, ...memoizerArgs: unknown[]): unknown {\n // last argument is the callback\n const origCallback = memoizerArgs.pop();\n const scope = getCurrentScope();\n const callbackWithContext =\n typeof origCallback === 'function'\n ? function (this: unknown, ...callbackArgs: unknown[]): unknown {\n return withScope(scope, () => (origCallback as Memoizer).apply(this, callbackArgs));\n }\n : origCallback;\n return origMemoizer.apply(this, [...memoizerArgs, callbackWithContext]);\n };\n };\n\n // sync function preserves context, but we still need to export it\n // as the lru-memoizer package does\n return Object.assign(asyncMemoizer, { sync: moduleExports.sync });\n },\n undefined, // no need to disable as this instrumentation does not create any spans\n ),\n ];\n }\n}\n"],"names":["InstrumentationBase","SDK_VERSION","InstrumentationNodeModuleDefinition","getCurrentScope","withScope"],"mappings":";;;;;AAYA,MAAM,YAAA,GAAe,sCAAA;AAKd,MAAM,mCAAmCA,mCAAA,CAAoB;AAAA,EAClE,WAAA,GAAc;AACZ,IAAA,KAAA,CAAM,YAAA,EAAcC,gBAAA,EAAa,EAAE,CAAA;AAAA,EACrC;AAAA,EAEA,IAAA,GAA8C;AAC5C,IAAA,OAAO;AAAA,MACL,IAAIC,mDAAA;AAAA,QACF,cAAA;AAAA,QACA,CAAC,UAAU,CAAA;AAAA,QACX,CAAC,aAAA,KAAqC;AAIpC,UAAA,MAAM,aAAA,GAAgB,YAA4B,IAAA,EAA0B;AAG1E,YAAA,MAAM,YAAA,GAAe,aAAA,CAAc,KAAA,CAAM,IAAA,EAAM,IAAI,CAAA;AACnD,YAAA,OAAO,YAA4B,YAAA,EAAkC;AAEnE,cAAA,MAAM,YAAA,GAAe,aAAa,GAAA,EAAI;AACtC,cAAA,MAAM,QAAQC,oBAAA,EAAgB;AAC9B,cAAA,MAAM,mBAAA,GACJ,OAAO,YAAA,KAAiB,UAAA,GACpB,YAA4B,YAAA,EAAkC;AAC5D,gBAAA,OAAOC,eAAU,KAAA,EAAO,MAAO,aAA0B,KAAA,CAAM,IAAA,EAAM,YAAY,CAAC,CAAA;AAAA,cACpF,CAAA,GACA,YAAA;AACN,cAAA,OAAO,aAAa,KAAA,CAAM,IAAA,EAAM,CAAC,GAAG,YAAA,EAAc,mBAAmB,CAAC,CAAA;AAAA,YACxE,CAAA;AAAA,UACF,CAAA;AAIA,UAAA,OAAO,OAAO,MAAA,CAAO,aAAA,EAAe,EAAE,IAAA,EAAM,aAAA,CAAc,MAAM,CAAA;AAAA,QAClE,CAAA;AAAA,QACA;AAAA;AAAA;AACF,KACF;AAAA,EACF;AACF;;;;"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const instrumentation = require('./vendored/instrumentation.js');
|
|
4
|
+
const core = require('@sentry/core');
|
|
5
|
+
const nodeCore = require('@sentry/node-core');
|
|
6
|
+
|
|
7
|
+
const INTEGRATION_NAME = "Mongo";
|
|
8
|
+
const instrumentMongo = nodeCore.generateInstrumentOnce(INTEGRATION_NAME, () => new instrumentation.MongoDBInstrumentation());
|
|
9
|
+
const _mongoIntegration = (() => {
|
|
10
|
+
return {
|
|
11
|
+
name: INTEGRATION_NAME,
|
|
12
|
+
setupOnce() {
|
|
13
|
+
instrumentMongo();
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
const mongoIntegration = core.defineIntegration(_mongoIntegration);
|
|
18
|
+
|
|
19
|
+
exports.instrumentMongo = instrumentMongo;
|
|
20
|
+
exports.mongoIntegration = mongoIntegration;
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing/mongo/index.ts"],"sourcesContent":["import { MongoDBInstrumentation } from './vendored/instrumentation';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport { generateInstrumentOnce } from '@sentry/node-core';\n\nconst INTEGRATION_NAME = 'Mongo' as const;\n\nexport const instrumentMongo = generateInstrumentOnce(INTEGRATION_NAME, () => new MongoDBInstrumentation());\n\nconst _mongoIntegration = (() => {\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n instrumentMongo();\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for the [mongodb](https://www.npmjs.com/package/mongodb) library.\n *\n * For more information, see the [`mongoIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/mongo/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.mongoIntegration()],\n * });\n * ```\n */\nexport const mongoIntegration = defineIntegration(_mongoIntegration);\n"],"names":["generateInstrumentOnce","MongoDBInstrumentation","defineIntegration"],"mappings":";;;;;;AAKA,MAAM,gBAAA,GAAmB,OAAA;AAElB,MAAM,kBAAkBA,+BAAA,CAAuB,gBAAA,EAAkB,MAAM,IAAIC,wCAAwB;AAE1G,MAAM,qBAAqB,MAAM;AAC/B,EAAA,OAAO;AAAA,IACL,IAAA,EAAM,gBAAA;AAAA,IACN,SAAA,GAAY;AACV,MAAA,eAAA,EAAgB;AAAA,IAClB;AAAA,GACF;AACF,CAAA,CAAA;AAgBO,MAAM,gBAAA,GAAmBC,uBAAkB,iBAAiB;;;;;"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const instrumentation = require('@opentelemetry/instrumentation');
|
|
4
|
+
const core = require('@sentry/core');
|
|
5
|
+
const InstrumentationNodeModuleFile = require('../../InstrumentationNodeModuleFile.js');
|
|
6
|
+
const patches = require('./patches.js');
|
|
7
|
+
|
|
8
|
+
const PACKAGE_NAME = "@sentry/instrumentation-mongodb";
|
|
9
|
+
class MongoDBInstrumentation extends instrumentation.InstrumentationBase {
|
|
10
|
+
constructor(config = {}) {
|
|
11
|
+
super(PACKAGE_NAME, core.SDK_VERSION, config);
|
|
12
|
+
}
|
|
13
|
+
init() {
|
|
14
|
+
const { v3PatchConnection, v3UnpatchConnection } = this._getV3ConnectionPatches();
|
|
15
|
+
const { v4PatchConnectionCallback, v4PatchConnectionPromise, v4UnpatchConnection } = this._getV4ConnectionPatches();
|
|
16
|
+
const { v4PatchConnectionPool, v4UnpatchConnectionPool } = this._getV4ConnectionPoolPatches();
|
|
17
|
+
return [
|
|
18
|
+
new instrumentation.InstrumentationNodeModuleDefinition("mongodb", [">=3.3.0 <4"], void 0, void 0, [
|
|
19
|
+
new InstrumentationNodeModuleFile.InstrumentationNodeModuleFile(
|
|
20
|
+
"mongodb/lib/core/wireprotocol/index.js",
|
|
21
|
+
[">=3.3.0 <4"],
|
|
22
|
+
v3PatchConnection,
|
|
23
|
+
v3UnpatchConnection
|
|
24
|
+
)
|
|
25
|
+
]),
|
|
26
|
+
new instrumentation.InstrumentationNodeModuleDefinition("mongodb", [">=4.0.0 <8"], void 0, void 0, [
|
|
27
|
+
new InstrumentationNodeModuleFile.InstrumentationNodeModuleFile(
|
|
28
|
+
"mongodb/lib/cmap/connection.js",
|
|
29
|
+
[">=4.0.0 <6.4"],
|
|
30
|
+
v4PatchConnectionCallback,
|
|
31
|
+
v4UnpatchConnection
|
|
32
|
+
),
|
|
33
|
+
new InstrumentationNodeModuleFile.InstrumentationNodeModuleFile(
|
|
34
|
+
"mongodb/lib/cmap/connection.js",
|
|
35
|
+
[">=6.4.0 <8"],
|
|
36
|
+
v4PatchConnectionPromise,
|
|
37
|
+
v4UnpatchConnection
|
|
38
|
+
),
|
|
39
|
+
new InstrumentationNodeModuleFile.InstrumentationNodeModuleFile(
|
|
40
|
+
"mongodb/lib/cmap/connection_pool.js",
|
|
41
|
+
[">=4.0.0 <6.4"],
|
|
42
|
+
v4PatchConnectionPool,
|
|
43
|
+
v4UnpatchConnectionPool
|
|
44
|
+
)
|
|
45
|
+
])
|
|
46
|
+
];
|
|
47
|
+
}
|
|
48
|
+
_getV3ConnectionPatches() {
|
|
49
|
+
return {
|
|
50
|
+
v3PatchConnection: (moduleExports) => {
|
|
51
|
+
if (instrumentation.isWrapped(moduleExports.insert)) {
|
|
52
|
+
this._unwrap(moduleExports, "insert");
|
|
53
|
+
}
|
|
54
|
+
this._wrap(moduleExports, "insert", patches.getV3PatchOperation("insert"));
|
|
55
|
+
if (instrumentation.isWrapped(moduleExports.remove)) {
|
|
56
|
+
this._unwrap(moduleExports, "remove");
|
|
57
|
+
}
|
|
58
|
+
this._wrap(moduleExports, "remove", patches.getV3PatchOperation("remove"));
|
|
59
|
+
if (instrumentation.isWrapped(moduleExports.update)) {
|
|
60
|
+
this._unwrap(moduleExports, "update");
|
|
61
|
+
}
|
|
62
|
+
this._wrap(moduleExports, "update", patches.getV3PatchOperation("update"));
|
|
63
|
+
if (instrumentation.isWrapped(moduleExports.command)) {
|
|
64
|
+
this._unwrap(moduleExports, "command");
|
|
65
|
+
}
|
|
66
|
+
this._wrap(moduleExports, "command", patches.getV3PatchCommand());
|
|
67
|
+
if (instrumentation.isWrapped(moduleExports.query)) {
|
|
68
|
+
this._unwrap(moduleExports, "query");
|
|
69
|
+
}
|
|
70
|
+
this._wrap(moduleExports, "query", patches.getV3PatchFind());
|
|
71
|
+
if (instrumentation.isWrapped(moduleExports.getMore)) {
|
|
72
|
+
this._unwrap(moduleExports, "getMore");
|
|
73
|
+
}
|
|
74
|
+
this._wrap(moduleExports, "getMore", patches.getV3PatchCursor());
|
|
75
|
+
return moduleExports;
|
|
76
|
+
},
|
|
77
|
+
v3UnpatchConnection: (moduleExports) => {
|
|
78
|
+
if (moduleExports === void 0) return;
|
|
79
|
+
this._unwrap(moduleExports, "insert");
|
|
80
|
+
this._unwrap(moduleExports, "remove");
|
|
81
|
+
this._unwrap(moduleExports, "update");
|
|
82
|
+
this._unwrap(moduleExports, "command");
|
|
83
|
+
this._unwrap(moduleExports, "query");
|
|
84
|
+
this._unwrap(moduleExports, "getMore");
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
_getV4ConnectionPoolPatches() {
|
|
89
|
+
return {
|
|
90
|
+
v4PatchConnectionPool: (moduleExports) => {
|
|
91
|
+
const poolPrototype = moduleExports.ConnectionPool.prototype;
|
|
92
|
+
if (instrumentation.isWrapped(poolPrototype.checkOut)) {
|
|
93
|
+
this._unwrap(poolPrototype, "checkOut");
|
|
94
|
+
}
|
|
95
|
+
this._wrap(poolPrototype, "checkOut", patches.getV4ConnectionPoolCheckOut());
|
|
96
|
+
return moduleExports;
|
|
97
|
+
},
|
|
98
|
+
v4UnpatchConnectionPool: (moduleExports) => {
|
|
99
|
+
if (moduleExports === void 0) return;
|
|
100
|
+
this._unwrap(moduleExports.ConnectionPool.prototype, "checkOut");
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
_getV4ConnectionPatches() {
|
|
105
|
+
return {
|
|
106
|
+
v4PatchConnectionCallback: (moduleExports) => {
|
|
107
|
+
if (instrumentation.isWrapped(moduleExports.Connection.prototype.command)) {
|
|
108
|
+
this._unwrap(moduleExports.Connection.prototype, "command");
|
|
109
|
+
}
|
|
110
|
+
this._wrap(moduleExports.Connection.prototype, "command", patches.getV4PatchCommandCallback());
|
|
111
|
+
return moduleExports;
|
|
112
|
+
},
|
|
113
|
+
v4PatchConnectionPromise: (moduleExports) => {
|
|
114
|
+
if (instrumentation.isWrapped(moduleExports.Connection.prototype.command)) {
|
|
115
|
+
this._unwrap(moduleExports.Connection.prototype, "command");
|
|
116
|
+
}
|
|
117
|
+
this._wrap(moduleExports.Connection.prototype, "command", patches.getV4PatchCommandPromise());
|
|
118
|
+
return moduleExports;
|
|
119
|
+
},
|
|
120
|
+
v4UnpatchConnection: (moduleExports) => {
|
|
121
|
+
if (moduleExports === void 0) return;
|
|
122
|
+
this._unwrap(moduleExports.Connection.prototype, "command");
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
exports.MongoDBInstrumentation = MongoDBInstrumentation;
|
|
129
|
+
//# sourceMappingURL=instrumentation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentation.js","sources":["../../../../../../src/integrations/tracing/mongo/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-mongodb\n * - Upstream version: @opentelemetry/instrumentation-mongodb@0.71.0\n * - Refactored to use Sentry's span APIs instead of OpenTelemetry tracing APIs\n * - Dropped the OTel connection-usage metrics (no Sentry MeterProvider consumes them) and the\n * session/connect patches that existed only to feed them\n * - Dropped the env-gated stable-semconv dual emission; only the (default) old semantic\n * conventions are emitted, matching the previous default span output\n */\n\nimport { InstrumentationBase, InstrumentationNodeModuleDefinition, isWrapped } from '@opentelemetry/instrumentation';\nimport type { InstrumentationConfig } from '@opentelemetry/instrumentation';\nimport { SDK_VERSION } from '@sentry/core';\nimport { InstrumentationNodeModuleFile } from '../../InstrumentationNodeModuleFile';\nimport type { WireProtocolInternal } from './internal-types';\nimport * as patches from './patches';\n\nconst PACKAGE_NAME = '@sentry/instrumentation-mongodb';\n\n/** mongodb instrumentation plugin */\nexport class MongoDBInstrumentation extends InstrumentationBase<InstrumentationConfig> {\n public constructor(config: InstrumentationConfig = {}) {\n super(PACKAGE_NAME, SDK_VERSION, config);\n }\n\n public init(): InstrumentationNodeModuleDefinition[] {\n const { v3PatchConnection, v3UnpatchConnection } = this._getV3ConnectionPatches();\n\n const { v4PatchConnectionCallback, v4PatchConnectionPromise, v4UnpatchConnection } = this._getV4ConnectionPatches();\n const { v4PatchConnectionPool, v4UnpatchConnectionPool } = this._getV4ConnectionPoolPatches();\n\n return [\n new InstrumentationNodeModuleDefinition('mongodb', ['>=3.3.0 <4'], undefined, undefined, [\n new InstrumentationNodeModuleFile(\n 'mongodb/lib/core/wireprotocol/index.js',\n ['>=3.3.0 <4'],\n v3PatchConnection,\n v3UnpatchConnection,\n ),\n ]),\n new InstrumentationNodeModuleDefinition('mongodb', ['>=4.0.0 <8'], undefined, undefined, [\n new InstrumentationNodeModuleFile(\n 'mongodb/lib/cmap/connection.js',\n ['>=4.0.0 <6.4'],\n v4PatchConnectionCallback,\n v4UnpatchConnection,\n ),\n new InstrumentationNodeModuleFile(\n 'mongodb/lib/cmap/connection.js',\n ['>=6.4.0 <8'],\n v4PatchConnectionPromise,\n v4UnpatchConnection,\n ),\n new InstrumentationNodeModuleFile(\n 'mongodb/lib/cmap/connection_pool.js',\n ['>=4.0.0 <6.4'],\n v4PatchConnectionPool,\n v4UnpatchConnectionPool,\n ),\n ]),\n ];\n }\n\n private _getV3ConnectionPatches<T extends WireProtocolInternal>() {\n return {\n v3PatchConnection: (moduleExports: T) => {\n // patch insert operation\n if (isWrapped(moduleExports.insert)) {\n this._unwrap(moduleExports, 'insert');\n }\n this._wrap(moduleExports, 'insert', patches.getV3PatchOperation('insert'));\n // patch remove operation\n if (isWrapped(moduleExports.remove)) {\n this._unwrap(moduleExports, 'remove');\n }\n this._wrap(moduleExports, 'remove', patches.getV3PatchOperation('remove'));\n // patch update operation\n if (isWrapped(moduleExports.update)) {\n this._unwrap(moduleExports, 'update');\n }\n this._wrap(moduleExports, 'update', patches.getV3PatchOperation('update'));\n // patch other command\n if (isWrapped(moduleExports.command)) {\n this._unwrap(moduleExports, 'command');\n }\n this._wrap(moduleExports, 'command', patches.getV3PatchCommand());\n // patch query\n if (isWrapped(moduleExports.query)) {\n this._unwrap(moduleExports, 'query');\n }\n this._wrap(moduleExports, 'query', patches.getV3PatchFind());\n // patch get more operation on cursor\n if (isWrapped(moduleExports.getMore)) {\n this._unwrap(moduleExports, 'getMore');\n }\n this._wrap(moduleExports, 'getMore', patches.getV3PatchCursor());\n return moduleExports;\n },\n v3UnpatchConnection: (moduleExports?: T) => {\n if (moduleExports === undefined) return;\n this._unwrap(moduleExports, 'insert');\n this._unwrap(moduleExports, 'remove');\n this._unwrap(moduleExports, 'update');\n this._unwrap(moduleExports, 'command');\n this._unwrap(moduleExports, 'query');\n this._unwrap(moduleExports, 'getMore');\n },\n };\n }\n\n private _getV4ConnectionPoolPatches() {\n return {\n v4PatchConnectionPool: (moduleExports: any) => {\n const poolPrototype = moduleExports.ConnectionPool.prototype;\n\n if (isWrapped(poolPrototype.checkOut)) {\n this._unwrap(poolPrototype, 'checkOut');\n }\n\n this._wrap(poolPrototype, 'checkOut', patches.getV4ConnectionPoolCheckOut());\n return moduleExports;\n },\n v4UnpatchConnectionPool: (moduleExports?: any) => {\n if (moduleExports === undefined) return;\n\n this._unwrap(moduleExports.ConnectionPool.prototype, 'checkOut');\n },\n };\n }\n\n private _getV4ConnectionPatches() {\n return {\n v4PatchConnectionCallback: (moduleExports: any) => {\n if (isWrapped(moduleExports.Connection.prototype.command)) {\n this._unwrap(moduleExports.Connection.prototype, 'command');\n }\n\n this._wrap(moduleExports.Connection.prototype, 'command', patches.getV4PatchCommandCallback());\n return moduleExports;\n },\n v4PatchConnectionPromise: (moduleExports: any) => {\n if (isWrapped(moduleExports.Connection.prototype.command)) {\n this._unwrap(moduleExports.Connection.prototype, 'command');\n }\n\n this._wrap(moduleExports.Connection.prototype, 'command', patches.getV4PatchCommandPromise());\n return moduleExports;\n },\n v4UnpatchConnection: (moduleExports?: any) => {\n if (moduleExports === undefined) return;\n this._unwrap(moduleExports.Connection.prototype, 'command');\n },\n };\n }\n}\n"],"names":["InstrumentationBase","SDK_VERSION","InstrumentationNodeModuleDefinition","InstrumentationNodeModuleFile","isWrapped","patches.getV3PatchOperation","patches.getV3PatchCommand","patches.getV3PatchFind","patches.getV3PatchCursor","patches.getV4ConnectionPoolCheckOut","patches.getV4PatchCommandCallback","patches.getV4PatchCommandPromise"],"mappings":";;;;;;;AAqBA,MAAM,YAAA,GAAe,iCAAA;AAGd,MAAM,+BAA+BA,mCAAA,CAA2C;AAAA,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AO,CAAA,EAAG;AACzD,UAAA,IAAA,CAAK,OAAA,CAAQ,aAAA,CAAc,UAAA,CAAW,SAAA,EAAW,SAAS,CAAA;AAAA,QAC5D;AAEA,QAAA,IAAA,CAAK,MAAM,aAAA,CAAc,UAAA,CAAW,WAAW,SAAA,EAAWM,mCAAmC,CAAA;AAC7F,QAAA,OAAO,aAAA;AAAA,MACT,CAAA;AAAA,MACA,wBAAA,EAA0B,CAAC,aAAA,KAAuB;AAChD,QAAA,IAAIN,yBAAA,CAAU,aAAA,CAAc,UAAA,CAAW,SAAA,CAAU,OAAO,CAAA,EAAG;AACzD,UAAA,IAAA,CAAK,OAAA,CAAQ,aAAA,CAAc,UAAA,CAAW,SAAA,EAAW,SAAS,CAAA;AAAA,QAC5D;AAEA,QAAA,IAAA,CAAK,MAAM,aAAA,CAAc,UAAA,CAAW,WAAW,SAAA,EAAWO,kCAAkC,CAAA;AAC5F,QAAA,OAAO,aAAA;AAAA,MACT,CAAA;AAAA,MACA,mBAAA,EAAqB,CAAC,aAAA,KAAwB;AAC5C,QAAA,IAAI,kBAAkB,MAAA,EAAW;AACjC,QAAA,IAAA,CAAK,OAAA,CAAQ,aAAA,CAAc,UAAA,CAAW,SAAA,EAAW,SAAS,CAAA;AAAA,MAC5D;AAAA,KACF;AAAA,EACF;AACF;;;;"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const core = require('@sentry/core');
|
|
4
|
+
const utils = require('./utils.js');
|
|
5
|
+
const serverUtils = require('@sentry/server-utils');
|
|
6
|
+
|
|
7
|
+
function getV3PatchOperation(operationName) {
|
|
8
|
+
return (original) => {
|
|
9
|
+
return function patchedServerCommand(server, ns, ops, options, callback) {
|
|
10
|
+
const resultHandler = typeof options === "function" ? options : callback;
|
|
11
|
+
if (utils.shouldSkipInstrumentation() || typeof resultHandler !== "function" || typeof ops !== "object") {
|
|
12
|
+
if (typeof options === "function") {
|
|
13
|
+
return original.call(this, server, ns, ops, options);
|
|
14
|
+
} else {
|
|
15
|
+
return original.call(this, server, ns, ops, options, callback);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
const span = serverUtils.startMongoSpan(utils.getV3SpanAttributes(ns, server, ops[0], operationName));
|
|
19
|
+
const patchedCallback = utils.patchEnd(span, resultHandler);
|
|
20
|
+
if (typeof options === "function") {
|
|
21
|
+
return original.call(this, server, ns, ops, patchedCallback);
|
|
22
|
+
} else {
|
|
23
|
+
return original.call(this, server, ns, ops, options, patchedCallback);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function getV3PatchCommand() {
|
|
29
|
+
return (original) => {
|
|
30
|
+
return function patchedServerCommand(server, ns, cmd, options, callback) {
|
|
31
|
+
const resultHandler = typeof options === "function" ? options : callback;
|
|
32
|
+
if (utils.shouldSkipInstrumentation() || typeof resultHandler !== "function" || typeof cmd !== "object") {
|
|
33
|
+
if (typeof options === "function") {
|
|
34
|
+
return original.call(this, server, ns, cmd, options);
|
|
35
|
+
} else {
|
|
36
|
+
return original.call(this, server, ns, cmd, options, callback);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
const operationName = serverUtils.getV3CommandOperation(cmd);
|
|
40
|
+
const span = serverUtils.startMongoSpan(utils.getV3SpanAttributes(ns, server, cmd, operationName));
|
|
41
|
+
const patchedCallback = utils.patchEnd(span, resultHandler);
|
|
42
|
+
if (typeof options === "function") {
|
|
43
|
+
return original.call(this, server, ns, cmd, patchedCallback);
|
|
44
|
+
} else {
|
|
45
|
+
return original.call(this, server, ns, cmd, options, patchedCallback);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
function getV4PatchCommandCallback() {
|
|
51
|
+
return (original) => {
|
|
52
|
+
return function patchedV4ServerCommand(ns, cmd, options, callback) {
|
|
53
|
+
const resultHandler = callback;
|
|
54
|
+
const commandType = Object.keys(cmd)[0];
|
|
55
|
+
if (typeof cmd !== "object" || cmd.ismaster || cmd.hello) {
|
|
56
|
+
return original.call(this, ns, cmd, options, callback);
|
|
57
|
+
}
|
|
58
|
+
let span = void 0;
|
|
59
|
+
if (!utils.shouldSkipInstrumentation()) {
|
|
60
|
+
span = serverUtils.startMongoSpan(utils.getV4SpanAttributes(this, ns, cmd, commandType));
|
|
61
|
+
}
|
|
62
|
+
const patchedCallback = utils.patchEnd(span, resultHandler);
|
|
63
|
+
return original.call(this, ns, cmd, options, patchedCallback);
|
|
64
|
+
};
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
function getV4PatchCommandPromise() {
|
|
68
|
+
return (original) => {
|
|
69
|
+
return function patchedV4ServerCommand(...args) {
|
|
70
|
+
const [ns, cmd] = args;
|
|
71
|
+
const commandType = Object.keys(cmd)[0];
|
|
72
|
+
const resultHandler = () => void 0;
|
|
73
|
+
if (typeof cmd !== "object" || cmd.ismaster || cmd.hello) {
|
|
74
|
+
return original.apply(this, args);
|
|
75
|
+
}
|
|
76
|
+
let span = void 0;
|
|
77
|
+
if (!utils.shouldSkipInstrumentation()) {
|
|
78
|
+
span = serverUtils.startMongoSpan(utils.getV4SpanAttributes(this, ns, cmd, commandType));
|
|
79
|
+
}
|
|
80
|
+
const patchedCallback = utils.patchEnd(span, resultHandler);
|
|
81
|
+
const result = original.apply(this, args);
|
|
82
|
+
result.then(
|
|
83
|
+
(res) => patchedCallback(null, res),
|
|
84
|
+
(err) => patchedCallback(err)
|
|
85
|
+
);
|
|
86
|
+
return result;
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function getV3PatchFind() {
|
|
91
|
+
return (original) => {
|
|
92
|
+
return function patchedServerCommand(server, ns, cmd, cursorState, options, callback) {
|
|
93
|
+
const resultHandler = typeof options === "function" ? options : callback;
|
|
94
|
+
if (utils.shouldSkipInstrumentation() || typeof resultHandler !== "function" || typeof cmd !== "object") {
|
|
95
|
+
if (typeof options === "function") {
|
|
96
|
+
return original.call(this, server, ns, cmd, cursorState, options);
|
|
97
|
+
} else {
|
|
98
|
+
return original.call(this, server, ns, cmd, cursorState, options, callback);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
const span = serverUtils.startMongoSpan(utils.getV3SpanAttributes(ns, server, cmd, "find"));
|
|
102
|
+
const patchedCallback = utils.patchEnd(span, resultHandler);
|
|
103
|
+
if (typeof options === "function") {
|
|
104
|
+
return original.call(this, server, ns, cmd, cursorState, patchedCallback);
|
|
105
|
+
} else {
|
|
106
|
+
return original.call(this, server, ns, cmd, cursorState, options, patchedCallback);
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function getV3PatchCursor() {
|
|
112
|
+
return (original) => {
|
|
113
|
+
return function patchedServerCommand(server, ns, cursorState, batchSize, options, callback) {
|
|
114
|
+
const resultHandler = typeof options === "function" ? options : callback;
|
|
115
|
+
if (utils.shouldSkipInstrumentation() || typeof resultHandler !== "function") {
|
|
116
|
+
if (typeof options === "function") {
|
|
117
|
+
return original.call(this, server, ns, cursorState, batchSize, options);
|
|
118
|
+
} else {
|
|
119
|
+
return original.call(this, server, ns, cursorState, batchSize, options, callback);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
const span = serverUtils.startMongoSpan(utils.getV3SpanAttributes(ns, server, cursorState.cmd, "getMore"));
|
|
123
|
+
const patchedCallback = utils.patchEnd(span, resultHandler);
|
|
124
|
+
if (typeof options === "function") {
|
|
125
|
+
return original.call(this, server, ns, cursorState, batchSize, patchedCallback);
|
|
126
|
+
} else {
|
|
127
|
+
return original.call(this, server, ns, cursorState, batchSize, options, patchedCallback);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
function getV4ConnectionPoolCheckOut() {
|
|
133
|
+
return (original) => {
|
|
134
|
+
return function patchedCheckout(callback) {
|
|
135
|
+
const parentSpan = core.getActiveSpan();
|
|
136
|
+
return original.call(this, function(...args) {
|
|
137
|
+
return core.withActiveSpan(parentSpan ?? null, () => callback.apply(this, args));
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
exports.getV3PatchCommand = getV3PatchCommand;
|
|
144
|
+
exports.getV3PatchCursor = getV3PatchCursor;
|
|
145
|
+
exports.getV3PatchFind = getV3PatchFind;
|
|
146
|
+
exports.getV3PatchOperation = getV3PatchOperation;
|
|
147
|
+
exports.getV4ConnectionPoolCheckOut = getV4ConnectionPoolCheckOut;
|
|
148
|
+
exports.getV4PatchCommandCallback = getV4PatchCommandCallback;
|
|
149
|
+
exports.getV4PatchCommandPromise = getV4PatchCommandPromise;
|
|
150
|
+
//# sourceMappingURL=patches.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patches.js","sources":["../../../../../../src/integrations/tracing/mongo/vendored/patches.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-mongodb\n * - Upstream version: @opentelemetry/instrumentation-mongodb@0.71.0\n * - Refactored to use Sentry's span APIs instead of OpenTelemetry tracing APIs\n */\n\nimport { getActiveSpan, withActiveSpan } from '@sentry/core';\nimport type {\n CursorState,\n MongodbNamespace,\n MongoInternalCommand,\n MongoInternalTopology,\n V4Connection,\n V4ConnectionPool,\n WireProtocolInternal,\n} from './internal-types';\nimport {\n getV3CommandOperation,\n getV3SpanAttributes,\n getV4SpanAttributes,\n patchEnd,\n shouldSkipInstrumentation,\n startMongoSpan,\n} from './utils';\n\n/** Creates spans for v3 common operations (insert/update/remove). */\nexport function getV3PatchOperation(operationName: 'insert' | 'update' | 'remove') {\n return (original: WireProtocolInternal[typeof operationName]) => {\n return function patchedServerCommand(\n this: unknown,\n server: MongoInternalTopology,\n ns: string,\n ops: unknown[],\n options: unknown | Function,\n callback?: Function,\n ) {\n const resultHandler = typeof options === 'function' ? options : callback;\n if (shouldSkipInstrumentation() || typeof resultHandler !== 'function' || typeof ops !== 'object') {\n if (typeof options === 'function') {\n return original.call(this, server, ns, ops, options);\n } else {\n return original.call(this, server, ns, ops, options, callback);\n }\n }\n\n const span = startMongoSpan(getV3SpanAttributes(ns, server, ops[0] as any, operationName));\n\n const patchedCallback = patchEnd(span, resultHandler);\n // handle when options is the callback to send the correct number of args\n if (typeof options === 'function') {\n return original.call(this, server, ns, ops, patchedCallback);\n } else {\n return original.call(this, server, ns, ops, options, patchedCallback);\n }\n };\n };\n}\n\n/** Creates spans for the v3 command operation. */\nexport function getV3PatchCommand() {\n return (original: WireProtocolInternal['command']) => {\n return function patchedServerCommand(\n this: unknown,\n server: MongoInternalTopology,\n ns: string,\n cmd: MongoInternalCommand,\n options: unknown | Function,\n callback?: Function,\n ) {\n const resultHandler = typeof options === 'function' ? options : callback;\n\n if (shouldSkipInstrumentation() || typeof resultHandler !== 'function' || typeof cmd !== 'object') {\n if (typeof options === 'function') {\n return original.call(this, server, ns, cmd, options);\n } else {\n return original.call(this, server, ns, cmd, options, callback);\n }\n }\n\n const operationName = getV3CommandOperation(cmd as unknown as Record<string, unknown>);\n const span = startMongoSpan(getV3SpanAttributes(ns, server, cmd, operationName));\n\n const patchedCallback = patchEnd(span, resultHandler);\n // handle when options is the callback to send the correct number of args\n if (typeof options === 'function') {\n return original.call(this, server, ns, cmd, patchedCallback);\n } else {\n return original.call(this, server, ns, cmd, options, patchedCallback);\n }\n };\n };\n}\n\n/** Creates spans for the v4 (<6.4) callback-style command operation. */\nexport function getV4PatchCommandCallback() {\n return (original: V4Connection['commandCallback']) => {\n return function patchedV4ServerCommand(\n this: any,\n ns: MongodbNamespace,\n cmd: any,\n options: undefined | unknown,\n callback: any,\n ) {\n const resultHandler = callback;\n const commandType = Object.keys(cmd)[0];\n\n if (typeof cmd !== 'object' || cmd.ismaster || cmd.hello) {\n return original.call(this, ns, cmd, options, callback);\n }\n\n let span = undefined;\n if (!shouldSkipInstrumentation()) {\n span = startMongoSpan(getV4SpanAttributes(this, ns, cmd, commandType));\n }\n const patchedCallback = patchEnd(span, resultHandler);\n\n return original.call(this, ns, cmd, options, patchedCallback);\n };\n };\n}\n\n/** Creates spans for the v4 (>=6.4) promise-style command operation. */\nexport function getV4PatchCommandPromise() {\n return (original: V4Connection['commandPromise']) => {\n return function patchedV4ServerCommand(this: any, ...args: Parameters<V4Connection['commandPromise']>) {\n const [ns, cmd] = args;\n const commandType = Object.keys(cmd)[0];\n const resultHandler = () => undefined;\n\n if (typeof cmd !== 'object' || cmd.ismaster || cmd.hello) {\n return original.apply(this, args);\n }\n\n let span = undefined;\n if (!shouldSkipInstrumentation()) {\n span = startMongoSpan(getV4SpanAttributes(this, ns, cmd, commandType));\n }\n\n const patchedCallback = patchEnd(span, resultHandler);\n\n const result = original.apply(this, args);\n result.then(\n (res: any) => patchedCallback(null, res),\n (err: any) => patchedCallback(err),\n );\n\n return result;\n };\n };\n}\n\n/** Creates spans for the v3 find operation. */\nexport function getV3PatchFind() {\n return (original: WireProtocolInternal['query']) => {\n return function patchedServerCommand(\n this: unknown,\n server: MongoInternalTopology,\n ns: string,\n cmd: MongoInternalCommand,\n cursorState: CursorState,\n options: unknown | Function,\n callback?: Function,\n ) {\n const resultHandler = typeof options === 'function' ? options : callback;\n\n if (shouldSkipInstrumentation() || typeof resultHandler !== 'function' || typeof cmd !== 'object') {\n if (typeof options === 'function') {\n return original.call(this, server, ns, cmd, cursorState, options);\n } else {\n return original.call(this, server, ns, cmd, cursorState, options, callback);\n }\n }\n\n const span = startMongoSpan(getV3SpanAttributes(ns, server, cmd, 'find'));\n\n const patchedCallback = patchEnd(span, resultHandler);\n // handle when options is the callback to send the correct number of args\n if (typeof options === 'function') {\n return original.call(this, server, ns, cmd, cursorState, patchedCallback);\n } else {\n return original.call(this, server, ns, cmd, cursorState, options, patchedCallback);\n }\n };\n };\n}\n\n/** Creates spans for the v3 getMore (cursor) operation. */\nexport function getV3PatchCursor() {\n return (original: WireProtocolInternal['getMore']) => {\n return function patchedServerCommand(\n this: unknown,\n server: MongoInternalTopology,\n ns: string,\n cursorState: CursorState,\n batchSize: number,\n options: unknown | Function,\n callback?: Function,\n ) {\n const resultHandler = typeof options === 'function' ? options : callback;\n\n if (shouldSkipInstrumentation() || typeof resultHandler !== 'function') {\n if (typeof options === 'function') {\n return original.call(this, server, ns, cursorState, batchSize, options);\n } else {\n return original.call(this, server, ns, cursorState, batchSize, options, callback);\n }\n }\n\n const span = startMongoSpan(getV3SpanAttributes(ns, server, cursorState.cmd, 'getMore'));\n\n const patchedCallback = patchEnd(span, resultHandler);\n // handle when options is the callback to send the correct number of args\n if (typeof options === 'function') {\n return original.call(this, server, ns, cursorState, batchSize, patchedCallback);\n } else {\n return original.call(this, server, ns, cursorState, batchSize, options, patchedCallback);\n }\n };\n };\n}\n\n// This patch will become unnecessary once https://jira.mongodb.org/browse/NODE-5639 is done.\nexport function getV4ConnectionPoolCheckOut() {\n return (original: V4ConnectionPool['checkOut']) => {\n return function patchedCheckout(this: unknown, callback: (error: any, connection: any) => void) {\n // The pool runs the callback in a detached context, so re-activate the span that was\n // active when `checkOut` was called — otherwise the pooled operation finds no parent.\n const parentSpan = getActiveSpan();\n return original.call(this, function (this: unknown, ...args: [any, any]) {\n return withActiveSpan(parentSpan ?? null, () => callback.apply(this, args));\n });\n };\n };\n}\n"],"names":["shouldSkipInstrumentation","startMongoSpan","getV3SpanAttributes","patchEnd","getV3CommandOperation","getV4SpanAttributes","getActiveSpan","withActiveSpan"],"mappings":";;;;;;AA8BO,SAAS,oBAAoB,aAAA,EAA+C;AACjF,EAAA,OAAO,CAAC,QAAA,KAAyD;AAC/D,IAAA,OAAO,SAAS,oBAAA,CAEd,MAAA,EACA,EAAA,EACA,GAAA,EACA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