@sentry/server-utils 10.69.0 → 11.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/build/THIRD-PARTY-LICENSES.txt +976 -0
- package/build/cjs/_virtual/_commonjsHelpers.js +8 -0
- package/build/cjs/_virtual/_commonjsHelpers.js.map +1 -0
- package/build/cjs/_virtual/array-set.js +6 -0
- package/build/cjs/_virtual/array-set.js.map +1 -0
- package/build/cjs/_virtual/astring.js +6 -0
- package/build/cjs/_virtual/astring.js.map +1 -0
- package/build/cjs/_virtual/base64-vlq.js +6 -0
- package/build/cjs/_virtual/base64-vlq.js.map +1 -0
- package/build/cjs/_virtual/base64.js +6 -0
- package/build/cjs/_virtual/base64.js.map +1 -0
- package/build/cjs/_virtual/binary-search.js +6 -0
- package/build/cjs/_virtual/binary-search.js.map +1 -0
- package/build/cjs/_virtual/mapping-list.js +6 -0
- package/build/cjs/_virtual/mapping-list.js.map +1 -0
- package/build/cjs/_virtual/meriyah.js +6 -0
- package/build/cjs/_virtual/meriyah.js.map +1 -0
- package/build/cjs/_virtual/node.js +6 -0
- package/build/cjs/_virtual/node.js.map +1 -0
- package/build/cjs/_virtual/quick-sort.js +6 -0
- package/build/cjs/_virtual/quick-sort.js.map +1 -0
- package/build/cjs/_virtual/source-map-consumer.js +6 -0
- package/build/cjs/_virtual/source-map-consumer.js.map +1 -0
- package/build/cjs/_virtual/source-map-generator.js +6 -0
- package/build/cjs/_virtual/source-map-generator.js.map +1 -0
- package/build/cjs/_virtual/source-map.js +6 -0
- package/build/cjs/_virtual/source-map.js.map +1 -0
- package/build/cjs/_virtual/source-node.js +6 -0
- package/build/cjs/_virtual/source-node.js.map +1 -0
- package/build/cjs/_virtual/util.js +6 -0
- package/build/cjs/_virtual/util.js.map +1 -0
- package/build/cjs/ai/anthropic-ai/constants.js +16 -0
- package/build/cjs/ai/anthropic-ai/constants.js.map +1 -0
- package/build/cjs/ai/anthropic-ai/index.js +250 -0
- package/build/cjs/ai/anthropic-ai/index.js.map +1 -0
- package/build/cjs/ai/anthropic-ai/streaming.js +154 -0
- package/build/cjs/ai/anthropic-ai/streaming.js.map +1 -0
- package/build/cjs/ai/anthropic-ai/utils.js +61 -0
- package/build/cjs/ai/anthropic-ai/utils.js.map +1 -0
- package/build/cjs/ai/core/gen-ai-attributes.js +20 -0
- package/build/cjs/ai/core/gen-ai-attributes.js.map +1 -0
- package/build/cjs/ai/core/utils.js +134 -0
- package/build/cjs/ai/core/utils.js.map +1 -0
- package/build/cjs/ai/google-genai/constants.js +17 -0
- package/build/cjs/ai/google-genai/constants.js.map +1 -0
- package/build/cjs/ai/google-genai/index.js +251 -0
- package/build/cjs/ai/google-genai/index.js.map +1 -0
- package/build/cjs/ai/google-genai/streaming.js +71 -0
- package/build/cjs/ai/google-genai/streaming.js.map +1 -0
- package/build/cjs/ai/google-genai/utils.js +21 -0
- package/build/cjs/ai/google-genai/utils.js.map +1 -0
- package/build/cjs/ai/langchain/constants.js +17 -0
- package/build/cjs/ai/langchain/constants.js.map +1 -0
- package/build/cjs/ai/langchain/embeddings.js +85 -0
- package/build/cjs/ai/langchain/embeddings.js.map +1 -0
- package/build/cjs/ai/langchain/index.js +257 -0
- package/build/cjs/ai/langchain/index.js.map +1 -0
- package/build/cjs/ai/langchain/utils.js +272 -0
- package/build/cjs/ai/langchain/utils.js.map +1 -0
- package/build/cjs/ai/langgraph/constants.js +8 -0
- package/build/cjs/ai/langgraph/constants.js.map +1 -0
- package/build/cjs/ai/langgraph/index.js +176 -0
- package/build/cjs/ai/langgraph/index.js.map +1 -0
- package/build/cjs/ai/langgraph/utils.js +231 -0
- package/build/cjs/ai/langgraph/utils.js.map +1 -0
- package/build/cjs/ai/openai/constants.js +33 -0
- package/build/cjs/ai/openai/constants.js.map +1 -0
- package/build/cjs/ai/openai/index.js +173 -0
- package/build/cjs/ai/openai/index.js.map +1 -0
- package/build/cjs/ai/openai/streaming.js +126 -0
- package/build/cjs/ai/openai/streaming.js.map +1 -0
- package/build/cjs/ai/openai/utils.js +111 -0
- package/build/cjs/ai/openai/utils.js.map +1 -0
- package/build/cjs/ai/vercel-ai/constants.js +23 -0
- package/build/cjs/ai/vercel-ai/constants.js.map +1 -0
- package/build/cjs/ai/vercel-ai/index.js +343 -0
- package/build/cjs/ai/vercel-ai/index.js.map +1 -0
- package/build/cjs/ai/vercel-ai/utils.js +171 -0
- package/build/cjs/ai/vercel-ai/utils.js.map +1 -0
- package/build/cjs/ai/vercel-ai/vercel-ai-attributes.js +50 -0
- package/build/cjs/ai/vercel-ai/vercel-ai-attributes.js.map +1 -0
- package/build/cjs/ai/workers-ai/constants.js +10 -0
- package/build/cjs/ai/workers-ai/constants.js.map +1 -0
- package/build/cjs/ai/workers-ai/index.js +83 -0
- package/build/cjs/ai/workers-ai/index.js.map +1 -0
- package/build/cjs/ai/workers-ai/streaming.js +150 -0
- package/build/cjs/ai/workers-ai/streaming.js.map +1 -0
- package/build/cjs/ai/workers-ai/utils.js +132 -0
- package/build/cjs/ai/workers-ai/utils.js.map +1 -0
- package/build/cjs/async-context.js +64 -0
- package/build/cjs/async-context.js.map +1 -0
- package/build/cjs/debug-build.js.map +1 -1
- package/build/cjs/graphql/graphql-dc-subscriber.js.map +1 -1
- package/build/cjs/graphql/index.js +15 -2
- package/build/cjs/graphql/index.js.map +1 -1
- package/build/cjs/graphql/utils.js +2 -0
- package/build/cjs/graphql/utils.js.map +1 -1
- package/build/cjs/index.js +42 -17
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.no-diagnostic-channels.js +31 -0
- package/build/cjs/index.no-diagnostic-channels.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/amqplib.js +46 -35
- package/build/cjs/integrations/tracing-channel/amqplib.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/anthropic.js +53 -41
- package/build/cjs/integrations/tracing-channel/anthropic.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/constants.js +3 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/constants.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/index.js +114 -115
- package/build/cjs/integrations/tracing-channel/aws-sdk/index.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/MessageAttributes.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/ServicesExtensions.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/bedrock-runtime.js +8 -4
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/bedrock-runtime.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/dynamodb.js +0 -2
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/dynamodb.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/kinesis.js +1 -3
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/kinesis.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/lambda.js +0 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/lambda.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/s3.js +1 -3
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/s3.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/secretsmanager.js +1 -3
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/secretsmanager.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/sns.js +3 -4
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/sns.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/sqs.js +4 -5
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/sqs.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/stepfunctions.js +1 -3
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/stepfunctions.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/utils.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/dataloader.js +25 -12
- package/build/cjs/integrations/tracing-channel/dataloader.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/express/index.js +24 -11
- package/build/cjs/integrations/tracing-channel/express/index.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/express/instrumentation.js +11 -16
- package/build/cjs/integrations/tracing-channel/express/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/express/route.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/fastify/errors.js +14 -1
- package/build/cjs/integrations/tracing-channel/fastify/errors.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/fastify/index.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/fastify/instrumentation.js +25 -10
- package/build/cjs/integrations/tracing-channel/fastify/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/fastify/utils.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/firebase/firestore.js +16 -3
- package/build/cjs/integrations/tracing-channel/firebase/firestore.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/firebase/functions.js +6 -4
- package/build/cjs/integrations/tracing-channel/firebase/functions.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/firebase/index.js +8 -12
- package/build/cjs/integrations/tracing-channel/firebase/index.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/firebase/instrumentation.js +17 -14
- package/build/cjs/integrations/tracing-channel/firebase/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/generic-pool.js +22 -10
- package/build/cjs/integrations/tracing-channel/generic-pool.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/google-genai.js +54 -42
- package/build/cjs/integrations/tracing-channel/google-genai.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/graphql/constants.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/graphql/index.js +40 -36
- package/build/cjs/integrations/tracing-channel/graphql/index.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/graphql/resolvers.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/graphql/spans.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/hapi-types.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/hapi-utils.js +13 -21
- package/build/cjs/integrations/tracing-channel/hapi-utils.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/hapi.js +51 -36
- package/build/cjs/integrations/tracing-channel/hapi.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/ioredis.js +52 -41
- package/build/cjs/integrations/tracing-channel/ioredis.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/kafkajs/consumer.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/kafkajs/index.js +28 -15
- package/build/cjs/integrations/tracing-channel/kafkajs/index.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/kafkajs/semconv.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/kafkajs/spans.js +8 -7
- package/build/cjs/integrations/tracing-channel/kafkajs/spans.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/knex.js +24 -10
- package/build/cjs/integrations/tracing-channel/knex.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/koa.js +42 -39
- package/build/cjs/integrations/tracing-channel/koa.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/langchain.js +59 -40
- package/build/cjs/integrations/tracing-channel/langchain.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/langgraph.js +64 -64
- package/build/cjs/integrations/tracing-channel/langgraph.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/lru-memoizer.js +27 -16
- package/build/cjs/integrations/tracing-channel/lru-memoizer.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/mongodb.js +29 -16
- package/build/cjs/integrations/tracing-channel/mongodb.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/mongoose.js +25 -13
- package/build/cjs/integrations/tracing-channel/mongoose.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/mysql.js +65 -53
- package/build/cjs/integrations/tracing-channel/mysql.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/mysql2.js +27 -10
- package/build/cjs/integrations/tracing-channel/mysql2.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/openai.js +46 -34
- package/build/cjs/integrations/tracing-channel/openai.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/postgres-js.js +96 -84
- package/build/cjs/integrations/tracing-channel/postgres-js.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/postgres.js +35 -19
- package/build/cjs/integrations/tracing-channel/postgres.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/redis.js +52 -31
- package/build/cjs/integrations/tracing-channel/redis.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/tedious.js +35 -22
- package/build/cjs/integrations/tracing-channel/tedious.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/vercel-ai.js +23 -10
- package/build/cjs/integrations/tracing-channel/vercel-ai.js.map +1 -1
- package/build/cjs/mongodb/mongodb-span.js +15 -18
- package/build/cjs/mongodb/mongodb-span.js.map +1 -1
- package/build/cjs/mongoose/index.js +15 -2
- package/build/cjs/mongoose/index.js.map +1 -1
- package/build/cjs/mongoose/mongoose-dc-subscriber.js.map +1 -1
- package/build/cjs/mongoose/mongoose-legacy-span.js +4 -3
- package/build/cjs/mongoose/mongoose-legacy-span.js.map +1 -1
- package/build/cjs/mysql2/index.js +15 -2
- package/build/cjs/mysql2/index.js.map +1 -1
- package/build/cjs/mysql2/mysql2-dc-subscriber.js.map +1 -1
- package/build/cjs/orchestrion/bundler/esbuild.js +22 -6
- package/build/cjs/orchestrion/bundler/esbuild.js.map +1 -1
- package/build/cjs/orchestrion/bundler/moduleInjectedTransform.js +43 -0
- package/build/cjs/orchestrion/bundler/moduleInjectedTransform.js.map +1 -0
- package/build/cjs/orchestrion/bundler/options.js +5 -19
- package/build/cjs/orchestrion/bundler/options.js.map +1 -1
- package/build/cjs/orchestrion/bundler/resolve.js +23 -0
- package/build/cjs/orchestrion/bundler/resolve.js.map +1 -0
- package/build/cjs/orchestrion/bundler/rollup.js +21 -6
- package/build/cjs/orchestrion/bundler/rollup.js.map +1 -1
- package/build/cjs/orchestrion/bundler/vite.js +42 -7
- package/build/cjs/orchestrion/bundler/vite.js.map +1 -1
- package/build/cjs/orchestrion/bundler/webpack-loader.js +22 -0
- package/build/cjs/orchestrion/bundler/webpack-loader.js.map +1 -0
- package/build/cjs/orchestrion/bundler/webpack.js +45 -24
- package/build/cjs/orchestrion/bundler/webpack.js.map +1 -1
- package/build/cjs/orchestrion/channels.js.map +1 -1
- package/build/cjs/orchestrion/config/amqplib.js +3 -3
- package/build/cjs/orchestrion/config/amqplib.js.map +1 -1
- package/build/cjs/orchestrion/config/anthropic-ai.js +3 -3
- package/build/cjs/orchestrion/config/anthropic-ai.js.map +1 -1
- package/build/cjs/orchestrion/config/aws-sdk.js +3 -3
- package/build/cjs/orchestrion/config/aws-sdk.js.map +1 -1
- package/build/cjs/orchestrion/config/channel-integration-definitions.js +16 -16
- package/build/cjs/orchestrion/config/channel-integration-definitions.js.map +1 -1
- package/build/cjs/orchestrion/config/dataloader.js +0 -4
- package/build/cjs/orchestrion/config/dataloader.js.map +1 -1
- package/build/cjs/orchestrion/config/express.js +4 -4
- package/build/cjs/orchestrion/config/express.js.map +1 -1
- package/build/cjs/orchestrion/config/firebase.js +3 -3
- package/build/cjs/orchestrion/config/firebase.js.map +1 -1
- package/build/cjs/orchestrion/config/generic-pool.js +3 -3
- package/build/cjs/orchestrion/config/generic-pool.js.map +1 -1
- package/build/cjs/orchestrion/config/google-genai.js +8 -7
- package/build/cjs/orchestrion/config/google-genai.js.map +1 -1
- package/build/cjs/orchestrion/config/graphql.js +3 -3
- package/build/cjs/orchestrion/config/graphql.js.map +1 -1
- package/build/cjs/orchestrion/config/hapi.js +3 -3
- package/build/cjs/orchestrion/config/hapi.js.map +1 -1
- package/build/cjs/orchestrion/config/index.js +3 -32
- package/build/cjs/orchestrion/config/index.js.map +1 -1
- package/build/cjs/orchestrion/config/ioredis.js +3 -3
- package/build/cjs/orchestrion/config/ioredis.js.map +1 -1
- package/build/cjs/orchestrion/config/kafkajs.js +3 -3
- package/build/cjs/orchestrion/config/kafkajs.js.map +1 -1
- package/build/cjs/orchestrion/config/knex.js +0 -4
- package/build/cjs/orchestrion/config/knex.js.map +1 -1
- package/build/cjs/orchestrion/config/koa.js +3 -3
- package/build/cjs/orchestrion/config/koa.js.map +1 -1
- package/build/cjs/orchestrion/config/langchain.js +3 -3
- package/build/cjs/orchestrion/config/langchain.js.map +1 -1
- package/build/cjs/orchestrion/config/langgraph.js +3 -3
- package/build/cjs/orchestrion/config/langgraph.js.map +1 -1
- package/build/cjs/orchestrion/config/lru-memoizer.js +3 -3
- package/build/cjs/orchestrion/config/lru-memoizer.js.map +1 -1
- package/build/cjs/orchestrion/config/module-names.js +8 -0
- package/build/cjs/orchestrion/config/module-names.js.map +1 -0
- package/build/cjs/orchestrion/config/mongodb.js +3 -3
- package/build/cjs/orchestrion/config/mongodb.js.map +1 -1
- package/build/cjs/orchestrion/config/mongoose.js +3 -3
- package/build/cjs/orchestrion/config/mongoose.js.map +1 -1
- package/build/cjs/orchestrion/config/mysql.js +3 -3
- package/build/cjs/orchestrion/config/mysql.js.map +1 -1
- package/build/cjs/orchestrion/config/mysql2.js +3 -3
- package/build/cjs/orchestrion/config/mysql2.js.map +1 -1
- package/build/cjs/orchestrion/config/nestjs.js +0 -4
- package/build/cjs/orchestrion/config/nestjs.js.map +1 -1
- package/build/cjs/orchestrion/config/openai.js +3 -3
- package/build/cjs/orchestrion/config/openai.js.map +1 -1
- package/build/cjs/orchestrion/config/pg.js +3 -3
- package/build/cjs/orchestrion/config/pg.js.map +1 -1
- package/build/cjs/orchestrion/config/postgres.js +3 -3
- package/build/cjs/orchestrion/config/postgres.js.map +1 -1
- package/build/cjs/orchestrion/config/redis.js +3 -3
- package/build/cjs/orchestrion/config/redis.js.map +1 -1
- package/build/cjs/orchestrion/config/remix.js +0 -4
- package/build/cjs/orchestrion/config/remix.js.map +1 -1
- package/build/cjs/orchestrion/config/tedious.js +3 -3
- package/build/cjs/orchestrion/config/tedious.js.map +1 -1
- package/build/cjs/orchestrion/config/vercel-ai.js +3 -3
- package/build/cjs/orchestrion/config/vercel-ai.js.map +1 -1
- package/build/cjs/orchestrion/detect.js +7 -1
- package/build/cjs/orchestrion/detect.js.map +1 -1
- package/build/cjs/orchestrion/index.js +51 -50
- package/build/cjs/orchestrion/index.js.map +1 -1
- package/build/cjs/orchestrion/instrumentation.js +86 -0
- package/build/cjs/orchestrion/instrumentation.js.map +1 -0
- package/build/cjs/orchestrion/moduleInjected.js +21 -0
- package/build/cjs/orchestrion/moduleInjected.js.map +1 -0
- package/build/cjs/orchestrion/runtime/hook.js +17 -0
- package/build/cjs/orchestrion/runtime/hook.js.map +1 -0
- package/build/cjs/orchestrion/runtime/register.js +46 -43
- package/build/cjs/orchestrion/runtime/register.js.map +1 -1
- package/build/cjs/otlp.js +45 -0
- package/build/cjs/otlp.js.map +1 -0
- package/build/cjs/prisma/global.js.map +1 -1
- package/build/cjs/prisma/index.js.map +1 -1
- package/build/cjs/prisma/tracing-helper.js +18 -10
- package/build/cjs/prisma/tracing-helper.js.map +1 -1
- package/build/cjs/redis/index.js +15 -2
- package/build/cjs/redis/index.js.map +1 -1
- package/build/cjs/redis/redis-dc-subscriber.js +5 -3
- package/build/cjs/redis/redis-dc-subscriber.js.map +1 -1
- package/build/cjs/redis/redis-statement-serializer.js.map +1 -1
- package/build/cjs/tracing-channel.js +9 -0
- package/build/cjs/tracing-channel.js.map +1 -1
- package/build/cjs/utils/setHttpServerSpanRouteAttribute.js +26 -0
- package/build/cjs/utils/setHttpServerSpanRouteAttribute.js.map +1 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer/index.js +8 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer/index.js.map +1 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/index.js +12 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/index.js.map +1 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/matcher.js +86 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/matcher.js.map +1 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/transformer.js +316 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/transformer.js.map +1 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/transforms.js +442 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/transforms.js.map +1 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/core-dC9TN3Ev.js +219 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/core-dC9TN3Ev.js.map +1 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/esbuild.js +98 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/esbuild.js.map +1 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/instrumentation-serde-C-Xxv-jj.js +52 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/instrumentation-serde-C-Xxv-jj.js.map +1 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/rollup-OTS4ktWb.js +1069 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/rollup-OTS4ktWb.js.map +1 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/vite.js +14 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/vite.js.map +1 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack-loader-factory.js +117 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack-loader-factory.js.map +1 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack.js +104 -0
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack.js.map +1 -0
- package/build/cjs/vendored/@apm-js-collab/tracing-hooks/hook.js +166 -0
- package/build/cjs/vendored/@apm-js-collab/tracing-hooks/hook.js.map +1 -0
- package/build/cjs/vendored/@apm-js-collab/tracing-hooks/index.js +88 -0
- package/build/cjs/vendored/@apm-js-collab/tracing-hooks/index.js.map +1 -0
- package/build/cjs/vendored/@apm-js-collab/tracing-hooks/lib/diagnostics.js +15 -0
- package/build/cjs/vendored/@apm-js-collab/tracing-hooks/lib/diagnostics.js.map +1 -0
- package/build/cjs/vendored/@apm-js-collab/tracing-hooks/lib/get-package-version.js +30 -0
- package/build/cjs/vendored/@apm-js-collab/tracing-hooks/lib/get-package-version.js.map +1 -0
- package/build/cjs/vendored/astring/dist/astring.js +1068 -0
- package/build/cjs/vendored/astring/dist/astring.js.map +1 -0
- package/build/cjs/vendored/debug/src/common.js +178 -0
- package/build/cjs/vendored/debug/src/common.js.map +1 -0
- package/build/cjs/vendored/debug/src/node.js +186 -0
- package/build/cjs/vendored/debug/src/node.js.map +1 -0
- package/build/cjs/vendored/esquery/dist/esquery.esm.min.js +847 -0
- package/build/cjs/vendored/esquery/dist/esquery.esm.min.js.map +1 -0
- package/build/cjs/vendored/has-flag/index.js +11 -0
- package/build/cjs/vendored/has-flag/index.js.map +1 -0
- package/build/cjs/vendored/meriyah/dist/meriyah.js +9192 -0
- package/build/cjs/vendored/meriyah/dist/meriyah.js.map +1 -0
- package/build/cjs/vendored/meriyah/dist/meriyah2.js +9209 -0
- package/build/cjs/vendored/meriyah/dist/meriyah2.js.map +1 -0
- package/build/cjs/vendored/module-details-from-path/index.js +44 -0
- package/build/cjs/vendored/module-details-from-path/index.js.map +1 -0
- package/build/cjs/vendored/ms/index.js +115 -0
- package/build/cjs/vendored/ms/index.js.map +1 -0
- package/build/cjs/vendored/semifies/index.js +111 -0
- package/build/cjs/vendored/semifies/index.js.map +1 -0
- package/build/cjs/vendored/source-map/lib/array-set.js +73 -0
- package/build/cjs/vendored/source-map/lib/array-set.js.map +1 -0
- package/build/cjs/vendored/source-map/lib/base64-vlq.js +57 -0
- package/build/cjs/vendored/source-map/lib/base64-vlq.js.map +1 -0
- package/build/cjs/vendored/source-map/lib/base64.js +42 -0
- package/build/cjs/vendored/source-map/lib/base64.js.map +1 -0
- package/build/cjs/vendored/source-map/lib/binary-search.js +55 -0
- package/build/cjs/vendored/source-map/lib/binary-search.js.map +1 -0
- package/build/cjs/vendored/source-map/lib/mapping-list.js +42 -0
- package/build/cjs/vendored/source-map/lib/mapping-list.js.map +1 -0
- package/build/cjs/vendored/source-map/lib/quick-sort.js +36 -0
- package/build/cjs/vendored/source-map/lib/quick-sort.js.map +1 -0
- package/build/cjs/vendored/source-map/lib/source-map-consumer.js +612 -0
- package/build/cjs/vendored/source-map/lib/source-map-consumer.js.map +1 -0
- package/build/cjs/vendored/source-map/lib/source-map-generator.js +285 -0
- package/build/cjs/vendored/source-map/lib/source-map-generator.js.map +1 -0
- package/build/cjs/vendored/source-map/lib/source-node.js +270 -0
- package/build/cjs/vendored/source-map/lib/source-node.js.map +1 -0
- package/build/cjs/vendored/source-map/lib/util.js +300 -0
- package/build/cjs/vendored/source-map/lib/util.js.map +1 -0
- package/build/cjs/vendored/source-map/source-map.js +16 -0
- package/build/cjs/vendored/source-map/source-map.js.map +1 -0
- package/build/cjs/vendored/supports-color/index.js +104 -0
- package/build/cjs/vendored/supports-color/index.js.map +1 -0
- package/build/cjs/vercel-ai/index.js +15 -2
- package/build/cjs/vercel-ai/index.js.map +1 -1
- package/build/cjs/vercel-ai/util.js.map +1 -1
- package/build/cjs/vercel-ai/vercel-ai-dc-subscriber.js +19 -21
- package/build/cjs/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -1
- package/build/cjs/vercel-ai/vercel-ai-orchestrion-subscriber.js +1 -1
- package/build/cjs/vercel-ai/vercel-ai-orchestrion-subscriber.js.map +1 -1
- package/build/esm/_virtual/_commonjsHelpers.js +6 -0
- package/build/esm/_virtual/_commonjsHelpers.js.map +1 -0
- package/build/esm/_virtual/array-set.js +4 -0
- package/build/esm/_virtual/array-set.js.map +1 -0
- package/build/esm/_virtual/astring.js +4 -0
- package/build/esm/_virtual/astring.js.map +1 -0
- package/build/esm/_virtual/base64-vlq.js +4 -0
- package/build/esm/_virtual/base64-vlq.js.map +1 -0
- package/build/esm/_virtual/base64.js +4 -0
- package/build/esm/_virtual/base64.js.map +1 -0
- package/build/esm/_virtual/binary-search.js +4 -0
- package/build/esm/_virtual/binary-search.js.map +1 -0
- package/build/esm/_virtual/mapping-list.js +4 -0
- package/build/esm/_virtual/mapping-list.js.map +1 -0
- package/build/esm/_virtual/meriyah.js +4 -0
- package/build/esm/_virtual/meriyah.js.map +1 -0
- package/build/esm/_virtual/node.js +4 -0
- package/build/esm/_virtual/node.js.map +1 -0
- package/build/esm/_virtual/quick-sort.js +4 -0
- package/build/esm/_virtual/quick-sort.js.map +1 -0
- package/build/esm/_virtual/source-map-consumer.js +4 -0
- package/build/esm/_virtual/source-map-consumer.js.map +1 -0
- package/build/esm/_virtual/source-map-generator.js +4 -0
- package/build/esm/_virtual/source-map-generator.js.map +1 -0
- package/build/esm/_virtual/source-map.js +4 -0
- package/build/esm/_virtual/source-map.js.map +1 -0
- package/build/esm/_virtual/source-node.js +4 -0
- package/build/esm/_virtual/source-node.js.map +1 -0
- package/build/esm/_virtual/util.js +4 -0
- package/build/esm/_virtual/util.js.map +1 -0
- package/build/esm/ai/anthropic-ai/constants.js +13 -0
- package/build/esm/ai/anthropic-ai/constants.js.map +1 -0
- package/build/esm/ai/anthropic-ai/index.js +245 -0
- package/build/esm/ai/anthropic-ai/index.js.map +1 -0
- package/build/esm/ai/anthropic-ai/streaming.js +151 -0
- package/build/esm/ai/anthropic-ai/streaming.js.map +1 -0
- package/build/esm/ai/anthropic-ai/utils.js +56 -0
- package/build/esm/ai/anthropic-ai/utils.js.map +1 -0
- package/build/esm/ai/core/gen-ai-attributes.js +11 -0
- package/build/esm/ai/core/gen-ai-attributes.js.map +1 -0
- package/build/esm/ai/core/utils.js +126 -0
- package/build/esm/ai/core/utils.js.map +1 -0
- package/build/esm/ai/google-genai/constants.js +13 -0
- package/build/esm/ai/google-genai/constants.js.map +1 -0
- package/build/esm/ai/google-genai/index.js +245 -0
- package/build/esm/ai/google-genai/index.js.map +1 -0
- package/build/esm/ai/google-genai/streaming.js +69 -0
- package/build/esm/ai/google-genai/streaming.js.map +1 -0
- package/build/esm/ai/google-genai/utils.js +19 -0
- package/build/esm/ai/google-genai/utils.js.map +1 -0
- package/build/esm/ai/langchain/constants.js +13 -0
- package/build/esm/ai/langchain/constants.js.map +1 -0
- package/build/esm/ai/langchain/embeddings.js +81 -0
- package/build/esm/ai/langchain/embeddings.js.map +1 -0
- package/build/esm/ai/langchain/index.js +255 -0
- package/build/esm/ai/langchain/index.js.map +1 -0
- package/build/esm/ai/langchain/utils.js +263 -0
- package/build/esm/ai/langchain/utils.js.map +1 -0
- package/build/esm/ai/langgraph/constants.js +5 -0
- package/build/esm/ai/langgraph/constants.js.map +1 -0
- package/build/esm/ai/langgraph/index.js +171 -0
- package/build/esm/ai/langgraph/index.js.map +1 -0
- package/build/esm/ai/langgraph/utils.js +222 -0
- package/build/esm/ai/langgraph/utils.js.map +1 -0
- package/build/esm/ai/openai/constants.js +28 -0
- package/build/esm/ai/openai/constants.js.map +1 -0
- package/build/esm/ai/openai/index.js +169 -0
- package/build/esm/ai/openai/index.js.map +1 -0
- package/build/esm/ai/openai/streaming.js +124 -0
- package/build/esm/ai/openai/streaming.js.map +1 -0
- package/build/esm/ai/openai/utils.js +106 -0
- package/build/esm/ai/openai/utils.js.map +1 -0
- package/build/esm/ai/vercel-ai/constants.js +19 -0
- package/build/esm/ai/vercel-ai/constants.js.map +1 -0
- package/build/esm/ai/vercel-ai/index.js +339 -0
- package/build/esm/ai/vercel-ai/index.js.map +1 -0
- package/build/esm/ai/vercel-ai/utils.js +164 -0
- package/build/esm/ai/vercel-ai/utils.js.map +1 -0
- package/build/esm/ai/vercel-ai/vercel-ai-attributes.js +26 -0
- package/build/esm/ai/vercel-ai/vercel-ai-attributes.js.map +1 -0
- package/build/esm/ai/workers-ai/constants.js +6 -0
- package/build/esm/ai/workers-ai/constants.js.map +1 -0
- package/build/esm/ai/workers-ai/index.js +81 -0
- package/build/esm/ai/workers-ai/index.js.map +1 -0
- package/build/esm/ai/workers-ai/streaming.js +148 -0
- package/build/esm/ai/workers-ai/streaming.js.map +1 -0
- package/build/esm/ai/workers-ai/utils.js +126 -0
- package/build/esm/ai/workers-ai/utils.js.map +1 -0
- package/build/esm/async-context.js +62 -0
- package/build/esm/async-context.js.map +1 -0
- package/build/esm/debug-build.js.map +1 -1
- package/build/esm/graphql/graphql-dc-subscriber.js.map +1 -1
- package/build/esm/graphql/index.js.map +1 -1
- package/build/esm/graphql/utils.js +3 -1
- package/build/esm/graphql/utils.js.map +1 -1
- package/build/esm/index.js +11 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/index.no-diagnostic-channels.js +12 -0
- package/build/esm/index.no-diagnostic-channels.js.map +1 -0
- package/build/esm/integrations/tracing-channel/amqplib.js +25 -27
- package/build/esm/integrations/tracing-channel/amqplib.js.map +1 -1
- package/build/esm/integrations/tracing-channel/anthropic.js +35 -36
- package/build/esm/integrations/tracing-channel/anthropic.js.map +1 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/constants.js +3 -2
- package/build/esm/integrations/tracing-channel/aws-sdk/constants.js.map +1 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/index.js +105 -119
- package/build/esm/integrations/tracing-channel/aws-sdk/index.js.map +1 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/MessageAttributes.js.map +1 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/ServicesExtensions.js.map +1 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/bedrock-runtime.js +10 -6
- package/build/esm/integrations/tracing-channel/aws-sdk/services/bedrock-runtime.js.map +1 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/dynamodb.js +0 -2
- package/build/esm/integrations/tracing-channel/aws-sdk/services/dynamodb.js.map +1 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/kinesis.js +1 -3
- package/build/esm/integrations/tracing-channel/aws-sdk/services/kinesis.js.map +1 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/lambda.js +1 -2
- package/build/esm/integrations/tracing-channel/aws-sdk/services/lambda.js.map +1 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/s3.js +1 -3
- package/build/esm/integrations/tracing-channel/aws-sdk/services/s3.js.map +1 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/secretsmanager.js +1 -3
- package/build/esm/integrations/tracing-channel/aws-sdk/services/secretsmanager.js.map +1 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/sns.js +5 -6
- package/build/esm/integrations/tracing-channel/aws-sdk/services/sns.js.map +1 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/sqs.js +6 -7
- package/build/esm/integrations/tracing-channel/aws-sdk/services/sqs.js.map +1 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/stepfunctions.js +1 -3
- package/build/esm/integrations/tracing-channel/aws-sdk/services/stepfunctions.js.map +1 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/utils.js.map +1 -1
- package/build/esm/integrations/tracing-channel/dataloader.js +10 -10
- package/build/esm/integrations/tracing-channel/dataloader.js.map +1 -1
- package/build/esm/integrations/tracing-channel/express/index.js +11 -11
- package/build/esm/integrations/tracing-channel/express/index.js.map +1 -1
- package/build/esm/integrations/tracing-channel/express/instrumentation.js +13 -18
- package/build/esm/integrations/tracing-channel/express/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing-channel/express/route.js.map +1 -1
- package/build/esm/integrations/tracing-channel/fastify/errors.js.map +1 -1
- package/build/esm/integrations/tracing-channel/fastify/index.js.map +1 -1
- package/build/esm/integrations/tracing-channel/fastify/instrumentation.js +13 -11
- package/build/esm/integrations/tracing-channel/fastify/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing-channel/fastify/utils.js.map +1 -1
- package/build/esm/integrations/tracing-channel/firebase/firestore.js +4 -4
- package/build/esm/integrations/tracing-channel/firebase/firestore.js.map +1 -1
- package/build/esm/integrations/tracing-channel/firebase/functions.js +8 -6
- package/build/esm/integrations/tracing-channel/firebase/functions.js.map +1 -1
- package/build/esm/integrations/tracing-channel/firebase/index.js +8 -12
- package/build/esm/integrations/tracing-channel/firebase/index.js.map +1 -1
- package/build/esm/integrations/tracing-channel/firebase/instrumentation.js +3 -13
- package/build/esm/integrations/tracing-channel/firebase/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing-channel/generic-pool.js +9 -10
- package/build/esm/integrations/tracing-channel/generic-pool.js.map +1 -1
- package/build/esm/integrations/tracing-channel/google-genai.js +38 -39
- package/build/esm/integrations/tracing-channel/google-genai.js.map +1 -1
- package/build/esm/integrations/tracing-channel/graphql/constants.js.map +1 -1
- package/build/esm/integrations/tracing-channel/graphql/index.js +30 -39
- package/build/esm/integrations/tracing-channel/graphql/index.js.map +1 -1
- package/build/esm/integrations/tracing-channel/graphql/resolvers.js.map +1 -1
- package/build/esm/integrations/tracing-channel/graphql/spans.js.map +1 -1
- package/build/esm/integrations/tracing-channel/hapi-types.js.map +1 -1
- package/build/esm/integrations/tracing-channel/hapi-utils.js +14 -22
- package/build/esm/integrations/tracing-channel/hapi-utils.js.map +1 -1
- package/build/esm/integrations/tracing-channel/hapi.js +39 -37
- package/build/esm/integrations/tracing-channel/hapi.js.map +1 -1
- package/build/esm/integrations/tracing-channel/ioredis.js +40 -42
- package/build/esm/integrations/tracing-channel/ioredis.js.map +1 -1
- package/build/esm/integrations/tracing-channel/kafkajs/consumer.js.map +1 -1
- package/build/esm/integrations/tracing-channel/kafkajs/index.js +14 -14
- package/build/esm/integrations/tracing-channel/kafkajs/index.js.map +1 -1
- package/build/esm/integrations/tracing-channel/kafkajs/semconv.js.map +1 -1
- package/build/esm/integrations/tracing-channel/kafkajs/spans.js +10 -9
- package/build/esm/integrations/tracing-channel/kafkajs/spans.js.map +1 -1
- package/build/esm/integrations/tracing-channel/knex.js +10 -9
- package/build/esm/integrations/tracing-channel/knex.js.map +1 -1
- package/build/esm/integrations/tracing-channel/koa.js +30 -40
- package/build/esm/integrations/tracing-channel/koa.js.map +1 -1
- package/build/esm/integrations/tracing-channel/langchain.js +45 -39
- package/build/esm/integrations/tracing-channel/langchain.js.map +1 -1
- package/build/esm/integrations/tracing-channel/langgraph.js +50 -63
- package/build/esm/integrations/tracing-channel/langgraph.js.map +1 -1
- package/build/esm/integrations/tracing-channel/lru-memoizer.js +15 -17
- package/build/esm/integrations/tracing-channel/lru-memoizer.js.map +1 -1
- package/build/esm/integrations/tracing-channel/mongodb.js +14 -14
- package/build/esm/integrations/tracing-channel/mongodb.js.map +1 -1
- package/build/esm/integrations/tracing-channel/mongoose.js +11 -12
- package/build/esm/integrations/tracing-channel/mongoose.js.map +1 -1
- package/build/esm/integrations/tracing-channel/mysql.js +53 -54
- package/build/esm/integrations/tracing-channel/mysql.js.map +1 -1
- package/build/esm/integrations/tracing-channel/mysql2.js +14 -10
- package/build/esm/integrations/tracing-channel/mysql2.js.map +1 -1
- package/build/esm/integrations/tracing-channel/openai.js +32 -33
- package/build/esm/integrations/tracing-channel/openai.js.map +1 -1
- package/build/esm/integrations/tracing-channel/postgres-js.js +85 -86
- package/build/esm/integrations/tracing-channel/postgres-js.js.map +1 -1
- package/build/esm/integrations/tracing-channel/postgres.js +22 -19
- package/build/esm/integrations/tracing-channel/postgres.js.map +1 -1
- package/build/esm/integrations/tracing-channel/redis.js +37 -29
- package/build/esm/integrations/tracing-channel/redis.js.map +1 -1
- package/build/esm/integrations/tracing-channel/tedious.js +22 -22
- package/build/esm/integrations/tracing-channel/tedious.js.map +1 -1
- package/build/esm/integrations/tracing-channel/vercel-ai.js +13 -13
- package/build/esm/integrations/tracing-channel/vercel-ai.js.map +1 -1
- package/build/esm/mongodb/mongodb-span.js +13 -16
- package/build/esm/mongodb/mongodb-span.js.map +1 -1
- package/build/esm/mongoose/index.js.map +1 -1
- package/build/esm/mongoose/mongoose-dc-subscriber.js.map +1 -1
- package/build/esm/mongoose/mongoose-legacy-span.js +3 -2
- package/build/esm/mongoose/mongoose-legacy-span.js.map +1 -1
- package/build/esm/mysql2/index.js.map +1 -1
- package/build/esm/mysql2/mysql2-dc-subscriber.js.map +1 -1
- package/build/esm/orchestrion/bundler/esbuild.js +22 -2
- package/build/esm/orchestrion/bundler/esbuild.js.map +1 -1
- package/build/esm/orchestrion/bundler/moduleInjectedTransform.js +40 -0
- package/build/esm/orchestrion/bundler/moduleInjectedTransform.js.map +1 -0
- package/build/esm/orchestrion/bundler/options.js +5 -20
- package/build/esm/orchestrion/bundler/options.js.map +1 -1
- package/build/esm/orchestrion/bundler/resolve.js +20 -0
- package/build/esm/orchestrion/bundler/resolve.js.map +1 -0
- package/build/esm/orchestrion/bundler/rollup.js +21 -2
- package/build/esm/orchestrion/bundler/rollup.js.map +1 -1
- package/build/esm/orchestrion/bundler/vite.js +43 -4
- package/build/esm/orchestrion/bundler/vite.js.map +1 -1
- package/build/esm/orchestrion/bundler/webpack-loader.js +20 -0
- package/build/esm/orchestrion/bundler/webpack-loader.js.map +1 -0
- package/build/esm/orchestrion/bundler/webpack.js +43 -18
- package/build/esm/orchestrion/bundler/webpack.js.map +1 -1
- package/build/esm/orchestrion/channels.js.map +1 -1
- package/build/esm/orchestrion/config/amqplib.js +3 -3
- package/build/esm/orchestrion/config/amqplib.js.map +1 -1
- package/build/esm/orchestrion/config/anthropic-ai.js +3 -3
- package/build/esm/orchestrion/config/anthropic-ai.js.map +1 -1
- package/build/esm/orchestrion/config/aws-sdk.js +3 -3
- package/build/esm/orchestrion/config/aws-sdk.js.map +1 -1
- package/build/esm/orchestrion/config/channel-integration-definitions.js +16 -16
- package/build/esm/orchestrion/config/channel-integration-definitions.js.map +1 -1
- package/build/esm/orchestrion/config/dataloader.js +1 -4
- package/build/esm/orchestrion/config/dataloader.js.map +1 -1
- package/build/esm/orchestrion/config/express.js +4 -4
- package/build/esm/orchestrion/config/express.js.map +1 -1
- package/build/esm/orchestrion/config/firebase.js +3 -3
- package/build/esm/orchestrion/config/firebase.js.map +1 -1
- package/build/esm/orchestrion/config/generic-pool.js +3 -3
- package/build/esm/orchestrion/config/generic-pool.js.map +1 -1
- package/build/esm/orchestrion/config/google-genai.js +8 -7
- package/build/esm/orchestrion/config/google-genai.js.map +1 -1
- package/build/esm/orchestrion/config/graphql.js +3 -3
- package/build/esm/orchestrion/config/graphql.js.map +1 -1
- package/build/esm/orchestrion/config/hapi.js +3 -3
- package/build/esm/orchestrion/config/hapi.js.map +1 -1
- package/build/esm/orchestrion/config/index.js +31 -61
- package/build/esm/orchestrion/config/index.js.map +1 -1
- package/build/esm/orchestrion/config/ioredis.js +3 -3
- package/build/esm/orchestrion/config/ioredis.js.map +1 -1
- package/build/esm/orchestrion/config/kafkajs.js +3 -3
- package/build/esm/orchestrion/config/kafkajs.js.map +1 -1
- package/build/esm/orchestrion/config/knex.js +1 -4
- package/build/esm/orchestrion/config/knex.js.map +1 -1
- package/build/esm/orchestrion/config/koa.js +3 -3
- package/build/esm/orchestrion/config/koa.js.map +1 -1
- package/build/esm/orchestrion/config/langchain.js +3 -3
- package/build/esm/orchestrion/config/langchain.js.map +1 -1
- package/build/esm/orchestrion/config/langgraph.js +3 -3
- package/build/esm/orchestrion/config/langgraph.js.map +1 -1
- package/build/esm/orchestrion/config/lru-memoizer.js +3 -3
- package/build/esm/orchestrion/config/lru-memoizer.js.map +1 -1
- package/build/esm/orchestrion/config/module-names.js +6 -0
- package/build/esm/orchestrion/config/module-names.js.map +1 -0
- package/build/esm/orchestrion/config/mongodb.js +3 -3
- package/build/esm/orchestrion/config/mongodb.js.map +1 -1
- package/build/esm/orchestrion/config/mongoose.js +3 -3
- package/build/esm/orchestrion/config/mongoose.js.map +1 -1
- package/build/esm/orchestrion/config/mysql.js +3 -3
- package/build/esm/orchestrion/config/mysql.js.map +1 -1
- package/build/esm/orchestrion/config/mysql2.js +3 -3
- package/build/esm/orchestrion/config/mysql2.js.map +1 -1
- package/build/esm/orchestrion/config/nestjs.js +1 -4
- package/build/esm/orchestrion/config/nestjs.js.map +1 -1
- package/build/esm/orchestrion/config/openai.js +3 -3
- package/build/esm/orchestrion/config/openai.js.map +1 -1
- package/build/esm/orchestrion/config/pg.js +3 -3
- package/build/esm/orchestrion/config/pg.js.map +1 -1
- package/build/esm/orchestrion/config/postgres.js +3 -3
- package/build/esm/orchestrion/config/postgres.js.map +1 -1
- package/build/esm/orchestrion/config/redis.js +3 -3
- package/build/esm/orchestrion/config/redis.js.map +1 -1
- package/build/esm/orchestrion/config/remix.js +1 -4
- package/build/esm/orchestrion/config/remix.js.map +1 -1
- package/build/esm/orchestrion/config/tedious.js +3 -3
- package/build/esm/orchestrion/config/tedious.js.map +1 -1
- package/build/esm/orchestrion/config/vercel-ai.js +3 -3
- package/build/esm/orchestrion/config/vercel-ai.js.map +1 -1
- package/build/esm/orchestrion/detect.js +7 -2
- package/build/esm/orchestrion/detect.js.map +1 -1
- package/build/esm/orchestrion/index.js +51 -51
- package/build/esm/orchestrion/index.js.map +1 -1
- package/build/esm/orchestrion/instrumentation.js +71 -0
- package/build/esm/orchestrion/instrumentation.js.map +1 -0
- package/build/esm/orchestrion/moduleInjected.js +19 -0
- package/build/esm/orchestrion/moduleInjected.js.map +1 -0
- package/build/esm/orchestrion/runtime/hook.js +8 -0
- package/build/esm/orchestrion/runtime/hook.js.map +1 -0
- package/build/esm/orchestrion/runtime/register.js +34 -45
- package/build/esm/orchestrion/runtime/register.js.map +1 -1
- package/build/esm/otlp.js +42 -0
- package/build/esm/otlp.js.map +1 -0
- package/build/esm/package.json +1 -1
- package/build/esm/prisma/global.js.map +1 -1
- package/build/esm/prisma/index.js.map +1 -1
- package/build/esm/prisma/tracing-helper.js +14 -6
- package/build/esm/prisma/tracing-helper.js.map +1 -1
- package/build/esm/redis/index.js.map +1 -1
- package/build/esm/redis/redis-dc-subscriber.js +7 -5
- package/build/esm/redis/redis-dc-subscriber.js.map +1 -1
- package/build/esm/redis/redis-statement-serializer.js.map +1 -1
- package/build/esm/tracing-channel.js +9 -1
- package/build/esm/tracing-channel.js.map +1 -1
- package/build/esm/utils/setHttpServerSpanRouteAttribute.js +24 -0
- package/build/esm/utils/setHttpServerSpanRouteAttribute.js.map +1 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer/index.js +6 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer/index.js.map +1 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer/lib/index.js +10 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer/lib/index.js.map +1 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer/lib/matcher.js +84 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer/lib/matcher.js.map +1 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer/lib/transformer.js +314 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer/lib/transformer.js.map +1 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer/lib/transforms.js +440 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer/lib/transforms.js.map +1 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/core-dC9TN3Ev.js +213 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/core-dC9TN3Ev.js.map +1 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/esbuild.js +96 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/esbuild.js.map +1 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/instrumentation-serde-C-Xxv-jj.js +49 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/instrumentation-serde-C-Xxv-jj.js.map +1 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/rollup-OTS4ktWb.js +1067 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/rollup-OTS4ktWb.js.map +1 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/vite.js +12 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/vite.js.map +1 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack-loader-factory.js +116 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack-loader-factory.js.map +1 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack.js +101 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack.js.map +1 -0
- package/build/esm/vendored/@apm-js-collab/tracing-hooks/hook.js +157 -0
- package/build/esm/vendored/@apm-js-collab/tracing-hooks/hook.js.map +1 -0
- package/build/esm/vendored/@apm-js-collab/tracing-hooks/index.js +86 -0
- package/build/esm/vendored/@apm-js-collab/tracing-hooks/index.js.map +1 -0
- package/build/esm/vendored/@apm-js-collab/tracing-hooks/lib/diagnostics.js +13 -0
- package/build/esm/vendored/@apm-js-collab/tracing-hooks/lib/diagnostics.js.map +1 -0
- package/build/esm/vendored/@apm-js-collab/tracing-hooks/lib/get-package-version.js +27 -0
- package/build/esm/vendored/@apm-js-collab/tracing-hooks/lib/get-package-version.js.map +1 -0
- package/build/esm/vendored/astring/dist/astring.js +1066 -0
- package/build/esm/vendored/astring/dist/astring.js.map +1 -0
- package/build/esm/vendored/debug/src/common.js +176 -0
- package/build/esm/vendored/debug/src/common.js.map +1 -0
- package/build/esm/vendored/debug/src/node.js +183 -0
- package/build/esm/vendored/debug/src/node.js.map +1 -0
- package/build/esm/vendored/esquery/dist/esquery.esm.min.js +845 -0
- package/build/esm/vendored/esquery/dist/esquery.esm.min.js.map +1 -0
- package/build/esm/vendored/has-flag/index.js +9 -0
- package/build/esm/vendored/has-flag/index.js.map +1 -0
- package/build/esm/vendored/meriyah/dist/meriyah.js +9190 -0
- package/build/esm/vendored/meriyah/dist/meriyah.js.map +1 -0
- package/build/esm/vendored/meriyah/dist/meriyah2.js +9207 -0
- package/build/esm/vendored/meriyah/dist/meriyah2.js.map +1 -0
- package/build/esm/vendored/module-details-from-path/index.js +41 -0
- package/build/esm/vendored/module-details-from-path/index.js.map +1 -0
- package/build/esm/vendored/ms/index.js +113 -0
- package/build/esm/vendored/ms/index.js.map +1 -0
- package/build/esm/vendored/semifies/index.js +109 -0
- package/build/esm/vendored/semifies/index.js.map +1 -0
- package/build/esm/vendored/source-map/lib/array-set.js +71 -0
- package/build/esm/vendored/source-map/lib/array-set.js.map +1 -0
- package/build/esm/vendored/source-map/lib/base64-vlq.js +55 -0
- package/build/esm/vendored/source-map/lib/base64-vlq.js.map +1 -0
- package/build/esm/vendored/source-map/lib/base64.js +40 -0
- package/build/esm/vendored/source-map/lib/base64.js.map +1 -0
- package/build/esm/vendored/source-map/lib/binary-search.js +55 -0
- package/build/esm/vendored/source-map/lib/binary-search.js.map +1 -0
- package/build/esm/vendored/source-map/lib/mapping-list.js +40 -0
- package/build/esm/vendored/source-map/lib/mapping-list.js.map +1 -0
- package/build/esm/vendored/source-map/lib/quick-sort.js +34 -0
- package/build/esm/vendored/source-map/lib/quick-sort.js.map +1 -0
- package/build/esm/vendored/source-map/lib/source-map-consumer.js +610 -0
- package/build/esm/vendored/source-map/lib/source-map-consumer.js.map +1 -0
- package/build/esm/vendored/source-map/lib/source-map-generator.js +283 -0
- package/build/esm/vendored/source-map/lib/source-map-generator.js.map +1 -0
- package/build/esm/vendored/source-map/lib/source-node.js +268 -0
- package/build/esm/vendored/source-map/lib/source-node.js.map +1 -0
- package/build/esm/vendored/source-map/lib/util.js +300 -0
- package/build/esm/vendored/source-map/lib/util.js.map +1 -0
- package/build/esm/vendored/source-map/source-map.js +14 -0
- package/build/esm/vendored/source-map/source-map.js.map +1 -0
- package/build/esm/vendored/supports-color/index.js +102 -0
- package/build/esm/vendored/supports-color/index.js.map +1 -0
- package/build/esm/vercel-ai/index.js.map +1 -1
- package/build/esm/vercel-ai/util.js.map +1 -1
- package/build/esm/vercel-ai/vercel-ai-dc-subscriber.js +19 -21
- package/build/esm/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -1
- package/build/esm/vercel-ai/vercel-ai-orchestrion-subscriber.js +1 -1
- package/build/esm/vercel-ai/vercel-ai-orchestrion-subscriber.js.map +1 -1
- package/build/orchestrion/import-hook.mjs +1 -1
- package/build/types/ai/anthropic-ai/constants.d.ts +26 -0
- package/build/types/ai/anthropic-ai/constants.d.ts.map +1 -0
- package/build/types/ai/anthropic-ai/index.d.ts +26 -0
- package/build/types/ai/anthropic-ai/index.d.ts.map +1 -0
- package/build/types/ai/anthropic-ai/streaming.d.ts +15 -0
- package/build/types/ai/anthropic-ai/streaming.d.ts.map +1 -0
- package/build/types/ai/anthropic-ai/types.d.ts +127 -0
- package/build/types/ai/anthropic-ai/types.d.ts.map +1 -0
- package/build/types/ai/anthropic-ai/utils.d.ts +21 -0
- package/build/types/ai/anthropic-ai/utils.d.ts.map +1 -0
- package/build/types/ai/core/gen-ai-attributes.d.ts +44 -0
- package/build/types/ai/core/gen-ai-attributes.d.ts.map +1 -0
- package/build/types/ai/core/utils.d.ts +84 -0
- package/build/types/ai/core/utils.d.ts.map +1 -0
- package/build/types/ai/google-genai/constants.d.ts +25 -0
- package/build/types/ai/google-genai/constants.d.ts.map +1 -0
- package/build/types/ai/google-genai/index.d.ts +47 -0
- package/build/types/ai/google-genai/index.d.ts.map +1 -0
- package/build/types/ai/google-genai/streaming.d.ts +9 -0
- package/build/types/ai/google-genai/streaming.d.ts.map +1 -0
- package/build/types/ai/google-genai/types.d.ts +177 -0
- package/build/types/ai/google-genai/types.d.ts.map +1 -0
- package/build/types/ai/google-genai/utils.d.ts +26 -0
- package/build/types/ai/google-genai/utils.d.ts.map +1 -0
- package/build/types/ai/index.d.ts +13 -0
- package/build/types/ai/index.d.ts.map +1 -0
- package/build/types/ai/langchain/constants.d.ts +4 -0
- package/build/types/ai/langchain/constants.d.ts.map +1 -0
- package/build/types/ai/langchain/embeddings.d.ts +39 -0
- package/build/types/ai/langchain/embeddings.d.ts.map +1 -0
- package/build/types/ai/langchain/index.d.ts +10 -0
- package/build/types/ai/langchain/index.d.ts.map +1 -0
- package/build/types/ai/langchain/types.d.ts +155 -0
- package/build/types/ai/langchain/types.d.ts.map +1 -0
- package/build/types/ai/langchain/utils.d.ts +67 -0
- package/build/types/ai/langchain/utils.d.ts.map +1 -0
- package/build/types/ai/langgraph/constants.d.ts +3 -0
- package/build/types/ai/langgraph/constants.d.ts.map +1 -0
- package/build/types/ai/langgraph/index.d.ts +44 -0
- package/build/types/ai/langgraph/index.d.ts.map +1 -0
- package/build/types/ai/langgraph/types.d.ts +78 -0
- package/build/types/ai/langgraph/types.d.ts.map +1 -0
- package/build/types/ai/langgraph/utils.d.ts +45 -0
- package/build/types/ai/langgraph/utils.d.ts.map +1 -0
- package/build/types/ai/openai/constants.d.ts +18 -0
- package/build/types/ai/openai/constants.d.ts.map +1 -0
- package/build/types/ai/openai/index.d.ts +13 -0
- package/build/types/ai/openai/index.d.ts.map +1 -0
- package/build/types/ai/openai/streaming.d.ts +13 -0
- package/build/types/ai/openai/streaming.d.ts.map +1 -0
- package/build/types/ai/openai/types.d.ts +321 -0
- package/build/types/ai/openai/types.d.ts.map +1 -0
- package/build/types/ai/openai/utils.d.ts +20 -0
- package/build/types/ai/openai/utils.d.ts.map +1 -0
- package/build/types/ai/vercel-ai/constants.d.ts +6 -0
- package/build/types/ai/vercel-ai/constants.d.ts.map +1 -0
- package/build/types/ai/vercel-ai/index.d.ts +24 -0
- package/build/types/ai/vercel-ai/index.d.ts.map +1 -0
- package/build/types/ai/vercel-ai/types.d.ts +9 -0
- package/build/types/ai/vercel-ai/types.d.ts.map +1 -0
- package/build/types/ai/vercel-ai/utils.d.ts +47 -0
- package/build/types/ai/vercel-ai/utils.d.ts.map +1 -0
- package/build/types/ai/vercel-ai/vercel-ai-attributes.d.ts +432 -0
- package/build/types/ai/vercel-ai/vercel-ai-attributes.d.ts.map +1 -0
- package/build/types/ai/workers-ai/constants.d.ts +16 -0
- package/build/types/ai/workers-ai/constants.d.ts.map +1 -0
- package/build/types/ai/workers-ai/index.d.ts +18 -0
- package/build/types/ai/workers-ai/index.d.ts.map +1 -0
- package/build/types/ai/workers-ai/streaming.d.ts +9 -0
- package/build/types/ai/workers-ai/streaming.d.ts.map +1 -0
- package/build/types/ai/workers-ai/types.d.ts +50 -0
- package/build/types/ai/workers-ai/types.d.ts.map +1 -0
- package/build/types/ai/workers-ai/utils.d.ts +34 -0
- package/build/types/ai/workers-ai/utils.d.ts.map +1 -0
- package/build/types/async-context.d.ts +15 -0
- package/build/types/async-context.d.ts.map +1 -0
- package/build/types/exports.d.ts +5 -0
- package/build/types/exports.d.ts.map +1 -0
- package/build/types/graphql/utils.d.ts.map +1 -1
- package/build/types/index.d.ts +1 -5
- package/build/types/index.d.ts.map +1 -1
- package/build/types/index.no-diagnostic-channels.d.ts +2 -0
- package/build/types/index.no-diagnostic-channels.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/amqplib.d.ts +2 -2
- package/build/types/integrations/tracing-channel/amqplib.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/anthropic.d.ts +3 -3
- package/build/types/integrations/tracing-channel/anthropic.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/aws-sdk/constants.d.ts +3 -2
- package/build/types/integrations/tracing-channel/aws-sdk/constants.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/aws-sdk/index.d.ts +4 -7
- package/build/types/integrations/tracing-channel/aws-sdk/index.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/ServicesExtensions.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/bedrock-runtime.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/dynamodb.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/kinesis.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/lambda.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/s3.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/secretsmanager.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/sns.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/sqs.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/stepfunctions.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/aws-sdk/types.d.ts +0 -2
- package/build/types/integrations/tracing-channel/aws-sdk/types.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/dataloader.d.ts +2 -2
- package/build/types/integrations/tracing-channel/dataloader.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/express/index.d.ts +3 -4
- package/build/types/integrations/tracing-channel/express/index.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/express/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/fastify/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/fastify/utils.d.ts +1 -1
- package/build/types/integrations/tracing-channel/firebase/firestore.d.ts +1 -2
- package/build/types/integrations/tracing-channel/firebase/firestore.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/firebase/functions.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/firebase/index.d.ts +3 -6
- package/build/types/integrations/tracing-channel/firebase/index.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/firebase/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/generic-pool.d.ts +2 -2
- package/build/types/integrations/tracing-channel/generic-pool.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/google-genai.d.ts +3 -3
- package/build/types/integrations/tracing-channel/google-genai.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/graphql/index.d.ts +7 -8
- package/build/types/integrations/tracing-channel/graphql/index.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/hapi-types.d.ts +4 -4
- package/build/types/integrations/tracing-channel/hapi-types.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/hapi-utils.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/hapi.d.ts +2 -2
- package/build/types/integrations/tracing-channel/hapi.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/ioredis.d.ts +1 -1
- package/build/types/integrations/tracing-channel/ioredis.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/kafkajs/index.d.ts +3 -4
- package/build/types/integrations/tracing-channel/kafkajs/index.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/kafkajs/semconv.d.ts +9 -9
- package/build/types/integrations/tracing-channel/kafkajs/spans.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/knex.d.ts +2 -2
- package/build/types/integrations/tracing-channel/knex.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/koa.d.ts +3 -3
- package/build/types/integrations/tracing-channel/koa.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/langchain.d.ts +3 -3
- package/build/types/integrations/tracing-channel/langchain.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/langgraph.d.ts +3 -3
- package/build/types/integrations/tracing-channel/langgraph.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/lru-memoizer.d.ts +2 -2
- package/build/types/integrations/tracing-channel/lru-memoizer.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/mongodb.d.ts +2 -2
- package/build/types/integrations/tracing-channel/mongodb.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/mongoose.d.ts +2 -2
- package/build/types/integrations/tracing-channel/mongoose.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/mysql.d.ts +3 -3
- package/build/types/integrations/tracing-channel/mysql.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/mysql2.d.ts +9 -7
- package/build/types/integrations/tracing-channel/mysql2.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/openai.d.ts +3 -3
- package/build/types/integrations/tracing-channel/openai.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/postgres-js.d.ts +3 -3
- package/build/types/integrations/tracing-channel/postgres-js.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/postgres.d.ts +2 -2
- package/build/types/integrations/tracing-channel/postgres.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/redis.d.ts +1 -1
- package/build/types/integrations/tracing-channel/redis.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/tedious.d.ts +2 -2
- package/build/types/integrations/tracing-channel/tedious.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/vercel-ai.d.ts +1 -1
- package/build/types/integrations/tracing-channel/vercel-ai.d.ts.map +1 -1
- package/build/types/mongodb/mongodb-span.d.ts.map +1 -1
- package/build/types/mongoose/mongoose-legacy-span.d.ts +0 -1
- package/build/types/mongoose/mongoose-legacy-span.d.ts.map +1 -1
- package/build/types/orchestrion/apmTypes.d.ts +173 -0
- package/build/types/orchestrion/apmTypes.d.ts.map +1 -0
- package/build/types/orchestrion/bundler/esbuild.d.ts +2 -2
- package/build/types/orchestrion/bundler/esbuild.d.ts.map +1 -1
- package/build/types/orchestrion/bundler/moduleInjectedTransform.d.ts +27 -0
- package/build/types/orchestrion/bundler/moduleInjectedTransform.d.ts.map +1 -0
- package/build/types/orchestrion/bundler/options.d.ts +19 -29
- package/build/types/orchestrion/bundler/options.d.ts.map +1 -1
- package/build/types/orchestrion/bundler/resolve.d.ts +22 -0
- package/build/types/orchestrion/bundler/resolve.d.ts.map +1 -0
- package/build/types/orchestrion/bundler/rollup.d.ts +2 -2
- package/build/types/orchestrion/bundler/rollup.d.ts.map +1 -1
- package/build/types/orchestrion/bundler/vite.d.ts +2 -2
- package/build/types/orchestrion/bundler/vite.d.ts.map +1 -1
- package/build/types/orchestrion/bundler/webpack-loader.d.ts +28 -0
- package/build/types/orchestrion/bundler/webpack-loader.d.ts.map +1 -0
- package/build/types/orchestrion/bundler/webpack.d.ts +9 -13
- package/build/types/orchestrion/bundler/webpack.d.ts.map +1 -1
- package/build/types/orchestrion/channels.d.ts +125 -125
- package/build/types/orchestrion/config/amqplib.d.ts +21 -22
- package/build/types/orchestrion/config/amqplib.d.ts.map +1 -1
- package/build/types/orchestrion/config/anthropic-ai.d.ts +6 -7
- package/build/types/orchestrion/config/anthropic-ai.d.ts.map +1 -1
- package/build/types/orchestrion/config/aws-sdk.d.ts +4 -5
- package/build/types/orchestrion/config/aws-sdk.d.ts.map +1 -1
- package/build/types/orchestrion/config/channel-integration-definitions.d.ts +20 -20
- package/build/types/orchestrion/config/channel-integration-definitions.d.ts.map +1 -1
- package/build/types/orchestrion/config/dataloader.d.ts +17 -19
- package/build/types/orchestrion/config/dataloader.d.ts.map +1 -1
- package/build/types/orchestrion/config/express.d.ts +5 -6
- package/build/types/orchestrion/config/express.d.ts.map +1 -1
- package/build/types/orchestrion/config/firebase.d.ts +23 -24
- package/build/types/orchestrion/config/firebase.d.ts.map +1 -1
- package/build/types/orchestrion/config/generic-pool.d.ts +4 -5
- package/build/types/orchestrion/config/generic-pool.d.ts.map +1 -1
- package/build/types/orchestrion/config/google-genai.d.ts +6 -7
- package/build/types/orchestrion/config/google-genai.d.ts.map +1 -1
- package/build/types/orchestrion/config/graphql.d.ts +4 -5
- package/build/types/orchestrion/config/graphql.d.ts.map +1 -1
- package/build/types/orchestrion/config/hapi.d.ts +3 -4
- package/build/types/orchestrion/config/hapi.d.ts.map +1 -1
- package/build/types/orchestrion/config/index.d.ts +1 -12
- package/build/types/orchestrion/config/index.d.ts.map +1 -1
- package/build/types/orchestrion/config/ioredis.d.ts +3 -3
- package/build/types/orchestrion/config/ioredis.d.ts.map +1 -1
- package/build/types/orchestrion/config/kafkajs.d.ts +3 -4
- package/build/types/orchestrion/config/kafkajs.d.ts.map +1 -1
- package/build/types/orchestrion/config/knex.d.ts +4 -5
- package/build/types/orchestrion/config/knex.d.ts.map +1 -1
- package/build/types/orchestrion/config/koa.d.ts +2 -3
- package/build/types/orchestrion/config/koa.d.ts.map +1 -1
- package/build/types/orchestrion/config/langchain.d.ts +4 -5
- package/build/types/orchestrion/config/langchain.d.ts.map +1 -1
- package/build/types/orchestrion/config/langgraph.d.ts +7 -8
- package/build/types/orchestrion/config/langgraph.d.ts.map +1 -1
- package/build/types/orchestrion/config/lru-memoizer.d.ts +2 -3
- package/build/types/orchestrion/config/lru-memoizer.d.ts.map +1 -1
- package/build/types/orchestrion/config/module-names.d.ts +8 -0
- package/build/types/orchestrion/config/module-names.d.ts.map +1 -0
- package/build/types/orchestrion/config/mongodb.d.ts +20 -21
- package/build/types/orchestrion/config/mongodb.d.ts.map +1 -1
- package/build/types/orchestrion/config/mongoose.d.ts +12 -13
- package/build/types/orchestrion/config/mongoose.d.ts.map +1 -1
- package/build/types/orchestrion/config/mysql.d.ts +2 -3
- package/build/types/orchestrion/config/mysql.d.ts.map +1 -1
- package/build/types/orchestrion/config/mysql2.d.ts +3 -4
- package/build/types/orchestrion/config/mysql2.d.ts.map +1 -1
- package/build/types/orchestrion/config/nestjs.d.ts +9 -10
- package/build/types/orchestrion/config/nestjs.d.ts.map +1 -1
- package/build/types/orchestrion/config/openai.d.ts +4 -5
- package/build/types/orchestrion/config/openai.d.ts.map +1 -1
- package/build/types/orchestrion/config/pg.d.ts +7 -8
- package/build/types/orchestrion/config/pg.d.ts.map +1 -1
- package/build/types/orchestrion/config/postgres.d.ts +5 -5
- package/build/types/orchestrion/config/postgres.d.ts.map +1 -1
- package/build/types/orchestrion/config/redis.d.ts +10 -11
- package/build/types/orchestrion/config/redis.d.ts.map +1 -1
- package/build/types/orchestrion/config/remix.d.ts +4 -5
- package/build/types/orchestrion/config/remix.d.ts.map +1 -1
- package/build/types/orchestrion/config/tedious.d.ts +8 -8
- package/build/types/orchestrion/config/tedious.d.ts.map +1 -1
- package/build/types/orchestrion/config/vercel-ai.d.ts +8 -8
- package/build/types/orchestrion/config/vercel-ai.d.ts.map +1 -1
- package/build/types/orchestrion/detect.d.ts +14 -1
- package/build/types/orchestrion/detect.d.ts.map +1 -1
- package/build/types/orchestrion/index.d.ts +41 -48
- package/build/types/orchestrion/index.d.ts.map +1 -1
- package/build/types/orchestrion/instrumentation.d.ts +37 -0
- package/build/types/orchestrion/instrumentation.d.ts.map +1 -0
- package/build/types/orchestrion/moduleInjected.d.ts +25 -0
- package/build/types/orchestrion/moduleInjected.d.ts.map +1 -0
- package/build/types/orchestrion/runtime/register.d.ts +1 -12
- package/build/types/orchestrion/runtime/register.d.ts.map +1 -1
- package/build/types/otlp.d.ts +49 -0
- package/build/types/otlp.d.ts.map +1 -0
- package/build/types/prisma/index.d.ts +0 -4
- package/build/types/prisma/index.d.ts.map +1 -1
- package/build/types/prisma/tracing-helper.d.ts.map +1 -1
- package/build/types/prisma/types.d.ts +2 -2
- package/build/types/prisma/types.d.ts.map +1 -1
- package/build/types/redis/redis-dc-subscriber.d.ts.map +1 -1
- package/build/types/redis/redis-statement-serializer.d.ts.map +1 -1
- package/build/types/tracing-channel.d.ts +2 -0
- package/build/types/tracing-channel.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/vercel-ai/index.d.ts +2 -7
- package/build/types/vercel-ai/index.d.ts.map +1 -1
- package/build/types/vercel-ai/vercel-ai-dc-subscriber.d.ts +0 -1
- package/build/types/vercel-ai/vercel-ai-dc-subscriber.d.ts.map +1 -1
- package/package.json +22 -37
- package/build/cjs/orchestrion/bundler/subscribeInjection.js +0 -40
- package/build/cjs/orchestrion/bundler/subscribeInjection.js.map +0 -1
- package/build/cjs/orchestrion/config/subscribe-injection.js +0 -25
- package/build/cjs/orchestrion/config/subscribe-injection.js.map +0 -1
- package/build/cjs/orchestrion/registerChannelIntegration.js +0 -13
- package/build/cjs/orchestrion/registerChannelIntegration.js.map +0 -1
- package/build/esm/orchestrion/bundler/subscribeInjection.js +0 -38
- package/build/esm/orchestrion/bundler/subscribeInjection.js.map +0 -1
- package/build/esm/orchestrion/config/subscribe-injection.js +0 -22
- package/build/esm/orchestrion/config/subscribe-injection.js.map +0 -1
- package/build/esm/orchestrion/registerChannelIntegration.js +0 -11
- package/build/esm/orchestrion/registerChannelIntegration.js.map +0 -1
- package/build/types/orchestrion/bundler/subscribeInjection.d.ts +0 -13
- package/build/types/orchestrion/bundler/subscribeInjection.d.ts.map +0 -1
- package/build/types/orchestrion/config/subscribe-injection.d.ts +0 -31
- package/build/types/orchestrion/config/subscribe-injection.d.ts.map +0 -1
- package/build/types/orchestrion/registerChannelIntegration.d.ts +0 -33
- package/build/types/orchestrion/registerChannelIntegration.d.ts.map +0 -1
- package/build/types-ts3.8/debug-build.d.ts +0 -7
- package/build/types-ts3.8/graphql/graphql-dc-subscriber.d.ts +0 -94
- package/build/types-ts3.8/graphql/index.d.ts +0 -12
- package/build/types-ts3.8/graphql/utils.d.ts +0 -36
- package/build/types-ts3.8/index.d.ts +0 -23
- package/build/types-ts3.8/integrations/tracing-channel/amqplib.d.ts +0 -11
- package/build/types-ts3.8/integrations/tracing-channel/anthropic.d.ts +0 -10
- package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/aws-sdk.types.d.ts +0 -43
- package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/constants.d.ts +0 -15
- package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/index.d.ts +0 -15
- package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/MessageAttributes.d.ts +0 -23
- package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/ServiceExtension.d.ts +0 -9
- package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/ServicesExtensions.d.ts +0 -10
- package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/bedrock-runtime.d.ts +0 -14
- package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/dynamodb.d.ts +0 -8
- package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/index.d.ts +0 -2
- package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/kinesis.d.ts +0 -6
- package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/lambda.d.ts +0 -9
- package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/s3.d.ts +0 -6
- package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/secretsmanager.d.ts +0 -8
- package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/sns.d.ts +0 -9
- package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/sqs.d.ts +0 -9
- package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/services/stepfunctions.d.ts +0 -6
- package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/types.d.ts +0 -26
- package/build/types-ts3.8/integrations/tracing-channel/aws-sdk/utils.d.ts +0 -5
- package/build/types-ts3.8/integrations/tracing-channel/dataloader.d.ts +0 -11
- package/build/types-ts3.8/integrations/tracing-channel/express/index.d.ts +0 -18
- package/build/types-ts3.8/integrations/tracing-channel/express/instrumentation.d.ts +0 -4
- package/build/types-ts3.8/integrations/tracing-channel/express/route.d.ts +0 -28
- package/build/types-ts3.8/integrations/tracing-channel/express/types.d.ts +0 -64
- package/build/types-ts3.8/integrations/tracing-channel/fastify/errors.d.ts +0 -12
- package/build/types-ts3.8/integrations/tracing-channel/fastify/index.d.ts +0 -66
- package/build/types-ts3.8/integrations/tracing-channel/fastify/instrumentation.d.ts +0 -10
- package/build/types-ts3.8/integrations/tracing-channel/fastify/types.d.ts +0 -32
- package/build/types-ts3.8/integrations/tracing-channel/fastify/utils.d.ts +0 -9
- package/build/types-ts3.8/integrations/tracing-channel/firebase/firestore-types.d.ts +0 -38
- package/build/types-ts3.8/integrations/tracing-channel/firebase/firestore.d.ts +0 -18
- package/build/types-ts3.8/integrations/tracing-channel/firebase/functions.d.ts +0 -15
- package/build/types-ts3.8/integrations/tracing-channel/firebase/index.d.ts +0 -15
- package/build/types-ts3.8/integrations/tracing-channel/firebase/instrumentation.d.ts +0 -2
- package/build/types-ts3.8/integrations/tracing-channel/generic-pool.d.ts +0 -10
- package/build/types-ts3.8/integrations/tracing-channel/google-genai.d.ts +0 -12
- package/build/types-ts3.8/integrations/tracing-channel/graphql/constants.d.ts +0 -12
- package/build/types-ts3.8/integrations/tracing-channel/graphql/graphql-types.d.ts +0 -135
- package/build/types-ts3.8/integrations/tracing-channel/graphql/index.d.ts +0 -30
- package/build/types-ts3.8/integrations/tracing-channel/graphql/resolvers.d.ts +0 -13
- package/build/types-ts3.8/integrations/tracing-channel/graphql/spans.d.ts +0 -17
- package/build/types-ts3.8/integrations/tracing-channel/graphql/types.d.ts +0 -25
- package/build/types-ts3.8/integrations/tracing-channel/hapi-types.d.ts +0 -65
- package/build/types-ts3.8/integrations/tracing-channel/hapi-utils.d.ts +0 -25
- package/build/types-ts3.8/integrations/tracing-channel/hapi.d.ts +0 -9
- package/build/types-ts3.8/integrations/tracing-channel/ioredis.d.ts +0 -37
- package/build/types-ts3.8/integrations/tracing-channel/kafkajs/consumer.d.ts +0 -8
- package/build/types-ts3.8/integrations/tracing-channel/kafkajs/index.d.ts +0 -17
- package/build/types-ts3.8/integrations/tracing-channel/kafkajs/semconv.d.ts +0 -10
- package/build/types-ts3.8/integrations/tracing-channel/kafkajs/spans.d.ts +0 -38
- package/build/types-ts3.8/integrations/tracing-channel/kafkajs/types.d.ts +0 -40
- package/build/types-ts3.8/integrations/tracing-channel/knex.d.ts +0 -11
- package/build/types-ts3.8/integrations/tracing-channel/koa.d.ts +0 -14
- package/build/types-ts3.8/integrations/tracing-channel/langchain.d.ts +0 -10
- package/build/types-ts3.8/integrations/tracing-channel/langgraph.d.ts +0 -10
- package/build/types-ts3.8/integrations/tracing-channel/lru-memoizer.d.ts +0 -10
- package/build/types-ts3.8/integrations/tracing-channel/mongodb.d.ts +0 -12
- package/build/types-ts3.8/integrations/tracing-channel/mongoose.d.ts +0 -15
- package/build/types-ts3.8/integrations/tracing-channel/mysql.d.ts +0 -12
- package/build/types-ts3.8/integrations/tracing-channel/mysql2.d.ts +0 -15
- package/build/types-ts3.8/integrations/tracing-channel/openai.d.ts +0 -10
- package/build/types-ts3.8/integrations/tracing-channel/postgres-js.d.ts +0 -26
- package/build/types-ts3.8/integrations/tracing-channel/postgres.d.ts +0 -15
- package/build/types-ts3.8/integrations/tracing-channel/redis.d.ts +0 -16
- package/build/types-ts3.8/integrations/tracing-channel/tedious.d.ts +0 -11
- package/build/types-ts3.8/integrations/tracing-channel/vercel-ai.d.ts +0 -9
- package/build/types-ts3.8/mongodb/mongodb-span.d.ts +0 -66
- package/build/types-ts3.8/mongoose/index.d.ts +0 -13
- package/build/types-ts3.8/mongoose/mongoose-dc-subscriber.d.ts +0 -63
- package/build/types-ts3.8/mongoose/mongoose-legacy-span.d.ts +0 -29
- package/build/types-ts3.8/mysql2/index.d.ts +0 -11
- package/build/types-ts3.8/mysql2/mysql2-dc-subscriber.d.ts +0 -59
- package/build/types-ts3.8/node-diagnostics-channel.d.ts +0 -19
- package/build/types-ts3.8/orchestrion/bundler/esbuild.d.ts +0 -20
- package/build/types-ts3.8/orchestrion/bundler/options.d.ts +0 -63
- package/build/types-ts3.8/orchestrion/bundler/rollup.d.ts +0 -17
- package/build/types-ts3.8/orchestrion/bundler/subscribeInjection.d.ts +0 -13
- package/build/types-ts3.8/orchestrion/bundler/vite.d.ts +0 -18
- package/build/types-ts3.8/orchestrion/bundler/webpack.d.ts +0 -24
- package/build/types-ts3.8/orchestrion/channels.d.ts +0 -145
- package/build/types-ts3.8/orchestrion/config/amqplib.d.ts +0 -68
- package/build/types-ts3.8/orchestrion/config/anthropic-ai.d.ts +0 -33
- package/build/types-ts3.8/orchestrion/config/aws-sdk.d.ts +0 -21
- package/build/types-ts3.8/orchestrion/config/channel-integration-definitions.d.ts +0 -139
- package/build/types-ts3.8/orchestrion/config/dataloader.d.ts +0 -48
- package/build/types-ts3.8/orchestrion/config/express.d.ts +0 -32
- package/build/types-ts3.8/orchestrion/config/firebase.d.ts +0 -43
- package/build/types-ts3.8/orchestrion/config/generic-pool.d.ts +0 -33
- package/build/types-ts3.8/orchestrion/config/google-genai.d.ts +0 -32
- package/build/types-ts3.8/orchestrion/config/graphql.d.ts +0 -31
- package/build/types-ts3.8/orchestrion/config/hapi.d.ts +0 -19
- package/build/types-ts3.8/orchestrion/config/index.d.ts +0 -49
- package/build/types-ts3.8/orchestrion/config/ioredis.d.ts +0 -8
- package/build/types-ts3.8/orchestrion/config/kafkajs.d.ts +0 -19
- package/build/types-ts3.8/orchestrion/config/knex.d.ts +0 -10
- package/build/types-ts3.8/orchestrion/config/koa.d.ts +0 -19
- package/build/types-ts3.8/orchestrion/config/langchain.d.ts +0 -20
- package/build/types-ts3.8/orchestrion/config/langgraph.d.ts +0 -23
- package/build/types-ts3.8/orchestrion/config/lru-memoizer.d.ts +0 -18
- package/build/types-ts3.8/orchestrion/config/mongodb.d.ts +0 -61
- package/build/types-ts3.8/orchestrion/config/mongoose.d.ts +0 -42
- package/build/types-ts3.8/orchestrion/config/mysql.d.ts +0 -18
- package/build/types-ts3.8/orchestrion/config/mysql2.d.ts +0 -20
- package/build/types-ts3.8/orchestrion/config/nestjs.d.ts +0 -25
- package/build/types-ts3.8/orchestrion/config/openai.d.ts +0 -20
- package/build/types-ts3.8/orchestrion/config/pg.d.ts +0 -35
- package/build/types-ts3.8/orchestrion/config/postgres.d.ts +0 -10
- package/build/types-ts3.8/orchestrion/config/redis.d.ts +0 -39
- package/build/types-ts3.8/orchestrion/config/remix.d.ts +0 -10
- package/build/types-ts3.8/orchestrion/config/subscribe-injection.d.ts +0 -31
- package/build/types-ts3.8/orchestrion/config/tedious.d.ts +0 -13
- package/build/types-ts3.8/orchestrion/config/vercel-ai.d.ts +0 -13
- package/build/types-ts3.8/orchestrion/detect.d.ts +0 -26
- package/build/types-ts3.8/orchestrion/index.d.ts +0 -139
- package/build/types-ts3.8/orchestrion/registerChannelIntegration.d.ts +0 -33
- package/build/types-ts3.8/orchestrion/runtime/register.d.ts +0 -25
- package/build/types-ts3.8/prisma/global.d.ts +0 -5
- package/build/types-ts3.8/prisma/index.d.ts +0 -45
- package/build/types-ts3.8/prisma/tracing-helper.d.ts +0 -52
- package/build/types-ts3.8/prisma/types.d.ts +0 -40
- package/build/types-ts3.8/redis/index.d.ts +0 -18
- package/build/types-ts3.8/redis/redis-dc-subscriber.d.ts +0 -89
- package/build/types-ts3.8/redis/redis-statement-serializer.d.ts +0 -6
- package/build/types-ts3.8/tracing-channel.d.ts +0 -73
- package/build/types-ts3.8/vercel-ai/index.d.ts +0 -26
- package/build/types-ts3.8/vercel-ai/util.d.ts +0 -30
- package/build/types-ts3.8/vercel-ai/vercel-ai-dc-subscriber.d.ts +0 -72
- package/build/types-ts3.8/vercel-ai/vercel-ai-orchestrion-subscriber.d.ts +0 -12
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const core = require('@sentry/core');
|
|
4
|
+
const attributes = require('@sentry/conventions/attributes');
|
|
5
|
+
const utils = require('../core/utils.js');
|
|
6
|
+
const vercelAiAttributes = require('./vercel-ai-attributes.js');
|
|
7
|
+
|
|
8
|
+
function accumulateTokensForParent(span, tokenAccumulator) {
|
|
9
|
+
const parentSpanId = span.parent_span_id;
|
|
10
|
+
if (!parentSpanId) {
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
const inputTokens = span.data[attributes.GEN_AI_USAGE_INPUT_TOKENS];
|
|
14
|
+
const outputTokens = span.data[attributes.GEN_AI_USAGE_OUTPUT_TOKENS];
|
|
15
|
+
if (typeof inputTokens === "number" || typeof outputTokens === "number") {
|
|
16
|
+
const existing = tokenAccumulator.get(parentSpanId) || { inputTokens: 0, outputTokens: 0 };
|
|
17
|
+
if (typeof inputTokens === "number") {
|
|
18
|
+
existing.inputTokens += inputTokens;
|
|
19
|
+
}
|
|
20
|
+
if (typeof outputTokens === "number") {
|
|
21
|
+
existing.outputTokens += outputTokens;
|
|
22
|
+
}
|
|
23
|
+
tokenAccumulator.set(parentSpanId, existing);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function applyAccumulatedTokens(spanOrTrace, tokenAccumulator) {
|
|
27
|
+
const accumulated = tokenAccumulator.get(spanOrTrace.span_id);
|
|
28
|
+
if (!accumulated || !spanOrTrace.data) {
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
if (accumulated.inputTokens > 0) {
|
|
32
|
+
spanOrTrace.data[attributes.GEN_AI_USAGE_INPUT_TOKENS] = accumulated.inputTokens;
|
|
33
|
+
}
|
|
34
|
+
if (accumulated.outputTokens > 0) {
|
|
35
|
+
spanOrTrace.data[attributes.GEN_AI_USAGE_OUTPUT_TOKENS] = accumulated.outputTokens;
|
|
36
|
+
}
|
|
37
|
+
if (accumulated.inputTokens > 0 || accumulated.outputTokens > 0) {
|
|
38
|
+
spanOrTrace.data["gen_ai.usage.total_tokens"] = accumulated.inputTokens + accumulated.outputTokens;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function buildToolDescriptionMap(spans) {
|
|
42
|
+
const toolDescriptions = /* @__PURE__ */ new Map();
|
|
43
|
+
for (const span of spans) {
|
|
44
|
+
const availableTools = span.data[attributes.GEN_AI_TOOL_DEFINITIONS];
|
|
45
|
+
if (typeof availableTools !== "string") {
|
|
46
|
+
continue;
|
|
47
|
+
}
|
|
48
|
+
try {
|
|
49
|
+
const tools = JSON.parse(availableTools);
|
|
50
|
+
for (const tool of tools) {
|
|
51
|
+
if (tool.name && tool.description && !toolDescriptions.has(tool.name)) {
|
|
52
|
+
toolDescriptions.set(tool.name, tool.description);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
} catch {
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return toolDescriptions;
|
|
59
|
+
}
|
|
60
|
+
function applyToolDescriptionsAndTokens(spans, tokenAccumulator) {
|
|
61
|
+
const toolDescriptions = buildToolDescriptionMap(spans);
|
|
62
|
+
for (const span of spans) {
|
|
63
|
+
if (span.op === "gen_ai.execute_tool") {
|
|
64
|
+
const toolName = span.data[attributes.GEN_AI_TOOL_NAME];
|
|
65
|
+
if (typeof toolName === "string") {
|
|
66
|
+
const description = toolDescriptions.get(toolName);
|
|
67
|
+
if (description) {
|
|
68
|
+
span.data[attributes.GEN_AI_TOOL_DESCRIPTION] = description;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
if (span.op === "gen_ai.invoke_agent") {
|
|
73
|
+
applyAccumulatedTokens(span, tokenAccumulator);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
function convertAvailableToolsToJsonString(tools) {
|
|
78
|
+
const toolObjects = tools.map((tool) => {
|
|
79
|
+
if (typeof tool === "string") {
|
|
80
|
+
try {
|
|
81
|
+
return JSON.parse(tool);
|
|
82
|
+
} catch {
|
|
83
|
+
return tool;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return tool;
|
|
87
|
+
});
|
|
88
|
+
return JSON.stringify(toolObjects);
|
|
89
|
+
}
|
|
90
|
+
function filterMessagesArray(input) {
|
|
91
|
+
return input.filter(
|
|
92
|
+
(m) => !!m && typeof m === "object" && "role" in m && "content" in m
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
function convertUserInputToMessagesFormat(userInput) {
|
|
96
|
+
try {
|
|
97
|
+
const p = JSON.parse(userInput);
|
|
98
|
+
if (!!p && typeof p === "object") {
|
|
99
|
+
let { messages } = p;
|
|
100
|
+
const { prompt, system } = p;
|
|
101
|
+
const result = [];
|
|
102
|
+
if (typeof system === "string") {
|
|
103
|
+
result.push({ role: "system", content: system });
|
|
104
|
+
}
|
|
105
|
+
if (typeof messages === "string") {
|
|
106
|
+
try {
|
|
107
|
+
messages = JSON.parse(messages);
|
|
108
|
+
} catch {
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
if (Array.isArray(messages)) {
|
|
112
|
+
result.push(...filterMessagesArray(messages));
|
|
113
|
+
return result;
|
|
114
|
+
}
|
|
115
|
+
if (Array.isArray(prompt)) {
|
|
116
|
+
result.push(...filterMessagesArray(prompt));
|
|
117
|
+
return result;
|
|
118
|
+
}
|
|
119
|
+
if (typeof prompt === "string") {
|
|
120
|
+
result.push({ role: "user", content: prompt });
|
|
121
|
+
}
|
|
122
|
+
if (result.length > 0) {
|
|
123
|
+
return result;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
} catch {
|
|
127
|
+
}
|
|
128
|
+
return [];
|
|
129
|
+
}
|
|
130
|
+
function requestMessagesFromPrompt(span, attributes$1) {
|
|
131
|
+
if (typeof attributes$1[vercelAiAttributes.AI_PROMPT_ATTRIBUTE] === "string" && !attributes$1[attributes.GEN_AI_INPUT_MESSAGES] && !attributes$1[vercelAiAttributes.AI_PROMPT_MESSAGES_ATTRIBUTE]) {
|
|
132
|
+
const userInput = attributes$1[vercelAiAttributes.AI_PROMPT_ATTRIBUTE];
|
|
133
|
+
const messages = convertUserInputToMessagesFormat(userInput);
|
|
134
|
+
if (messages.length) {
|
|
135
|
+
const { systemInstructions, filteredMessages } = utils.extractSystemInstructions(messages);
|
|
136
|
+
if (systemInstructions) {
|
|
137
|
+
span.setAttribute(attributes.GEN_AI_SYSTEM_INSTRUCTIONS, systemInstructions);
|
|
138
|
+
}
|
|
139
|
+
const messagesJson = core.stringify(filteredMessages);
|
|
140
|
+
span.setAttributes({
|
|
141
|
+
[vercelAiAttributes.AI_PROMPT_ATTRIBUTE]: messagesJson,
|
|
142
|
+
[attributes.GEN_AI_INPUT_MESSAGES]: messagesJson
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
} else if (typeof attributes$1[vercelAiAttributes.AI_PROMPT_MESSAGES_ATTRIBUTE] === "string") {
|
|
146
|
+
const originalMessagesJson = attributes$1[vercelAiAttributes.AI_PROMPT_MESSAGES_ATTRIBUTE];
|
|
147
|
+
try {
|
|
148
|
+
const messages = JSON.parse(originalMessagesJson);
|
|
149
|
+
if (Array.isArray(messages)) {
|
|
150
|
+
const { systemInstructions, filteredMessages } = utils.extractSystemInstructions(messages);
|
|
151
|
+
if (systemInstructions) {
|
|
152
|
+
span.setAttribute(attributes.GEN_AI_SYSTEM_INSTRUCTIONS, systemInstructions);
|
|
153
|
+
}
|
|
154
|
+
const messagesJson = core.stringify(filteredMessages);
|
|
155
|
+
span.setAttributes({
|
|
156
|
+
[vercelAiAttributes.AI_PROMPT_MESSAGES_ATTRIBUTE]: messagesJson,
|
|
157
|
+
[attributes.GEN_AI_INPUT_MESSAGES]: messagesJson
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
} catch {
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
exports.accumulateTokensForParent = accumulateTokensForParent;
|
|
166
|
+
exports.applyAccumulatedTokens = applyAccumulatedTokens;
|
|
167
|
+
exports.applyToolDescriptionsAndTokens = applyToolDescriptionsAndTokens;
|
|
168
|
+
exports.convertAvailableToolsToJsonString = convertAvailableToolsToJsonString;
|
|
169
|
+
exports.convertUserInputToMessagesFormat = convertUserInputToMessagesFormat;
|
|
170
|
+
exports.requestMessagesFromPrompt = requestMessagesFromPrompt;
|
|
171
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../../src/ai/vercel-ai/utils.ts"],"sourcesContent":["/* eslint-disable typescript-eslint/no-deprecated */\nimport { stringify } from '@sentry/core';\nimport type { Span, SpanAttributes, SpanJSON, TraceContext } from '@sentry/core';\nimport {\n GEN_AI_INPUT_MESSAGES,\n GEN_AI_SYSTEM_INSTRUCTIONS,\n GEN_AI_TOOL_DEFINITIONS,\n GEN_AI_TOOL_DESCRIPTION,\n GEN_AI_TOOL_NAME,\n GEN_AI_USAGE_INPUT_TOKENS,\n GEN_AI_USAGE_OUTPUT_TOKENS,\n} from '@sentry/conventions/attributes';\nimport { extractSystemInstructions } from '../core/utils';\nimport { toolCallSpanContextMap } from './constants';\nimport type { TokenSummary, ToolCallSpanContext } from './types';\nimport { AI_PROMPT_ATTRIBUTE, AI_PROMPT_MESSAGES_ATTRIBUTE } from './vercel-ai-attributes';\n\n/**\n * Accumulates token data from a span to its parent in the token accumulator map.\n * This function extracts token usage from the current span and adds it to the\n * accumulated totals for its parent span.\n */\nexport function accumulateTokensForParent(span: SpanJSON, tokenAccumulator: Map<string, TokenSummary>): void {\n const parentSpanId = span.parent_span_id;\n if (!parentSpanId) {\n return;\n }\n\n const inputTokens = span.data[GEN_AI_USAGE_INPUT_TOKENS];\n const outputTokens = span.data[GEN_AI_USAGE_OUTPUT_TOKENS];\n\n if (typeof inputTokens === 'number' || typeof outputTokens === 'number') {\n const existing = tokenAccumulator.get(parentSpanId) || { inputTokens: 0, outputTokens: 0 };\n\n if (typeof inputTokens === 'number') {\n existing.inputTokens += inputTokens;\n }\n if (typeof outputTokens === 'number') {\n existing.outputTokens += outputTokens;\n }\n\n tokenAccumulator.set(parentSpanId, existing);\n }\n}\n\n/**\n * Applies accumulated token data to the `gen_ai.invoke_agent` span.\n * Only immediate children of the `gen_ai.invoke_agent` span are considered,\n * since aggregation will automatically occur for each parent span.\n */\nexport function applyAccumulatedTokens(\n spanOrTrace: SpanJSON | TraceContext,\n tokenAccumulator: Map<string, TokenSummary>,\n): void {\n const accumulated = tokenAccumulator.get(spanOrTrace.span_id);\n if (!accumulated || !spanOrTrace.data) {\n return;\n }\n\n if (accumulated.inputTokens > 0) {\n spanOrTrace.data[GEN_AI_USAGE_INPUT_TOKENS] = accumulated.inputTokens;\n }\n if (accumulated.outputTokens > 0) {\n spanOrTrace.data[GEN_AI_USAGE_OUTPUT_TOKENS] = accumulated.outputTokens;\n }\n if (accumulated.inputTokens > 0 || accumulated.outputTokens > 0) {\n spanOrTrace.data['gen_ai.usage.total_tokens'] = accumulated.inputTokens + accumulated.outputTokens;\n }\n}\n\n/**\n * Builds a map of tool name -> description from all spans with tool definitions.\n * This avoids O(n²) iteration and repeated JSON parsing.\n */\nfunction buildToolDescriptionMap(spans: SpanJSON[]): Map<string, string> {\n const toolDescriptions = new Map<string, string>();\n\n for (const span of spans) {\n const availableTools = span.data[GEN_AI_TOOL_DEFINITIONS];\n if (typeof availableTools !== 'string') {\n continue;\n }\n try {\n const tools = JSON.parse(availableTools) as Array<{ name?: string; description?: string }>;\n for (const tool of tools) {\n if (tool.name && tool.description && !toolDescriptions.has(tool.name)) {\n toolDescriptions.set(tool.name, tool.description);\n }\n }\n } catch {\n // ignore parse errors\n }\n }\n\n return toolDescriptions;\n}\n\n/**\n * Applies tool descriptions and accumulated tokens to spans in a single pass.\n *\n * - For `gen_ai.execute_tool` spans: looks up tool description from\n * `gen_ai.tool.definitions` on sibling spans\n * - For `gen_ai.invoke_agent` spans: applies accumulated token data from children\n */\nexport function applyToolDescriptionsAndTokens(spans: SpanJSON[], tokenAccumulator: Map<string, TokenSummary>): void {\n // Build lookup map once to avoid O(n²) iteration and repeated JSON parsing\n const toolDescriptions = buildToolDescriptionMap(spans);\n\n for (const span of spans) {\n if (span.op === 'gen_ai.execute_tool') {\n const toolName = span.data[GEN_AI_TOOL_NAME];\n if (typeof toolName === 'string') {\n const description = toolDescriptions.get(toolName);\n if (description) {\n span.data[GEN_AI_TOOL_DESCRIPTION] = description;\n }\n }\n }\n\n if (span.op === 'gen_ai.invoke_agent') {\n applyAccumulatedTokens(span, tokenAccumulator);\n }\n }\n}\n\n/**\n * Get the span context associated with a tool call ID.\n */\nexport function _INTERNAL_getSpanContextForToolCallId(toolCallId: string): ToolCallSpanContext | undefined {\n return toolCallSpanContextMap.get(toolCallId);\n}\n\n/**\n * Clean up the span mapping for a tool call ID\n */\nexport function _INTERNAL_cleanupToolCallSpanContext(toolCallId: string): void {\n toolCallSpanContextMap.delete(toolCallId);\n}\n\n/**\n * Convert an array of tool strings to a JSON string\n */\nexport function convertAvailableToolsToJsonString(tools: unknown[]): string {\n const toolObjects = tools.map(tool => {\n if (typeof tool === 'string') {\n try {\n return JSON.parse(tool);\n } catch {\n return tool;\n }\n }\n return tool;\n });\n return JSON.stringify(toolObjects);\n}\n\n/**\n * Filter out invalid entries in messages array\n * @param input - The input array to filter\n * @returns The filtered array\n */\nfunction filterMessagesArray(input: unknown[]): { role: string; content: string }[] {\n return input.filter(\n (m: unknown): m is { role: string; content: string } =>\n !!m && typeof m === 'object' && 'role' in m && 'content' in m,\n );\n}\n\n/**\n * Normalize the user input (stringified object with prompt, system, messages) to messages array\n */\nexport function convertUserInputToMessagesFormat(userInput: string): { role: string; content: string }[] {\n try {\n const p = JSON.parse(userInput);\n if (!!p && typeof p === 'object') {\n let { messages } = p;\n const { prompt, system } = p;\n const result: { role: string; content: string }[] = [];\n\n // prepend top-level system instruction if present\n if (typeof system === 'string') {\n result.push({ role: 'system', content: system });\n }\n\n // stringified messages array\n if (typeof messages === 'string') {\n try {\n messages = JSON.parse(messages);\n } catch {\n // ignore parse errors\n }\n }\n\n // messages array format: { messages: [...] }\n if (Array.isArray(messages)) {\n result.push(...filterMessagesArray(messages));\n return result;\n }\n\n // prompt array format: { prompt: [...] }\n if (Array.isArray(prompt)) {\n result.push(...filterMessagesArray(prompt));\n return result;\n }\n\n // prompt string format: { prompt: \"...\" }\n if (typeof prompt === 'string') {\n result.push({ role: 'user', content: prompt });\n }\n\n if (result.length > 0) {\n return result;\n }\n }\n // eslint-disable-next-line no-empty\n } catch {}\n return [];\n}\n\n/**\n * Generate a request.messages JSON array from the prompt field in the\n * invoke_agent op\n */\nexport function requestMessagesFromPrompt(span: Span, attributes: SpanAttributes): void {\n if (\n typeof attributes[AI_PROMPT_ATTRIBUTE] === 'string' &&\n !attributes[GEN_AI_INPUT_MESSAGES] &&\n !attributes[AI_PROMPT_MESSAGES_ATTRIBUTE]\n ) {\n // No messages array is present, so we need to convert the prompt to the proper messages format\n // This is the case for ai.generateText spans\n // The ai.prompt attribute is a stringified object with prompt, system, messages attributes\n // The format of these is described in the vercel docs, for instance: https://ai-sdk.dev/docs/reference/ai-sdk-core/stream-object#parameters\n const userInput = attributes[AI_PROMPT_ATTRIBUTE];\n const messages = convertUserInputToMessagesFormat(userInput);\n if (messages.length) {\n const { systemInstructions, filteredMessages } = extractSystemInstructions(messages);\n\n if (systemInstructions) {\n span.setAttribute(GEN_AI_SYSTEM_INSTRUCTIONS, systemInstructions);\n }\n\n const messagesJson = stringify(filteredMessages);\n\n span.setAttributes({\n [AI_PROMPT_ATTRIBUTE]: messagesJson,\n [GEN_AI_INPUT_MESSAGES]: messagesJson,\n });\n }\n } else if (typeof attributes[AI_PROMPT_MESSAGES_ATTRIBUTE] === 'string') {\n // In this case we already get a properly formatted messages array, this is the preferred way to get the messages\n // This is the case for ai.generateText.doGenerate spans\n const originalMessagesJson = attributes[AI_PROMPT_MESSAGES_ATTRIBUTE];\n try {\n const messages = JSON.parse(originalMessagesJson);\n if (Array.isArray(messages)) {\n const { systemInstructions, filteredMessages } = extractSystemInstructions(messages);\n\n if (systemInstructions) {\n span.setAttribute(GEN_AI_SYSTEM_INSTRUCTIONS, systemInstructions);\n }\n\n const messagesJson = stringify(filteredMessages);\n\n span.setAttributes({\n [AI_PROMPT_MESSAGES_ATTRIBUTE]: messagesJson,\n [GEN_AI_INPUT_MESSAGES]: messagesJson,\n });\n }\n // eslint-disable-next-line no-empty\n } catch {}\n }\n}\n"],"names":["GEN_AI_USAGE_INPUT_TOKENS","GEN_AI_USAGE_OUTPUT_TOKENS","GEN_AI_TOOL_DEFINITIONS","GEN_AI_TOOL_NAME","GEN_AI_TOOL_DESCRIPTION","attributes","AI_PROMPT_ATTRIBUTE","GEN_AI_INPUT_MESSAGES","AI_PROMPT_MESSAGES_ATTRIBUTE","extractSystemInstructions","GEN_AI_SYSTEM_INSTRUCTIONS","stringify"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AA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAA4B,CAAA,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAChC,CAACD,gCAAqB,CAAA,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAC1B,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACH;AAAA,CAAA,CAAA,CAAA,CAEF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ;AAAA,CAAA,CAAA,CAAA,CAAC;AAAA,CAAA,CACX;AACF;;;;;;;"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const OPERATION_NAME_ATTRIBUTE = "operation.name";
|
|
4
|
+
const AI_OPERATION_ID_ATTRIBUTE = "ai.operationId";
|
|
5
|
+
const AI_PROMPT_ATTRIBUTE = "ai.prompt";
|
|
6
|
+
const AI_SCHEMA_ATTRIBUTE = "ai.schema";
|
|
7
|
+
const AI_RESPONSE_OBJECT_ATTRIBUTE = "ai.response.object";
|
|
8
|
+
const AI_VALUES_ATTRIBUTE = "ai.values";
|
|
9
|
+
const AI_RESPONSE_TEXT_ATTRIBUTE = "ai.response.text";
|
|
10
|
+
const AI_RESPONSE_TOOL_CALLS_ATTRIBUTE = "ai.response.toolCalls";
|
|
11
|
+
const AI_RESPONSE_FINISH_REASON_ATTRIBUTE = "ai.response.finishReason";
|
|
12
|
+
const AI_PROMPT_MESSAGES_ATTRIBUTE = "ai.prompt.messages";
|
|
13
|
+
const AI_PROMPT_TOOLS_ATTRIBUTE = "ai.prompt.tools";
|
|
14
|
+
const AI_MODEL_ID_ATTRIBUTE = "ai.model.id";
|
|
15
|
+
const AI_RESPONSE_PROVIDER_METADATA_ATTRIBUTE = "ai.response.providerMetadata";
|
|
16
|
+
const AI_USAGE_CACHED_INPUT_TOKENS_ATTRIBUTE = "ai.usage.cachedInputTokens";
|
|
17
|
+
const AI_USAGE_INPUT_TOKEN_DETAILS_ATTRIBUTE_PREFIX = "ai.usage.inputTokenDetails.";
|
|
18
|
+
const AI_TELEMETRY_FUNCTION_ID_ATTRIBUTE = "ai.telemetry.functionId";
|
|
19
|
+
const AI_USAGE_COMPLETION_TOKENS_ATTRIBUTE = "ai.usage.completionTokens";
|
|
20
|
+
const AI_USAGE_PROMPT_TOKENS_ATTRIBUTE = "ai.usage.promptTokens";
|
|
21
|
+
const AI_USAGE_TOKENS_ATTRIBUTE = "ai.usage.tokens";
|
|
22
|
+
const AI_TOOL_CALL_NAME_ATTRIBUTE = "ai.toolCall.name";
|
|
23
|
+
const AI_TOOL_CALL_ID_ATTRIBUTE = "ai.toolCall.id";
|
|
24
|
+
const AI_TOOL_CALL_ARGS_ATTRIBUTE = "ai.toolCall.args";
|
|
25
|
+
const AI_TOOL_CALL_RESULT_ATTRIBUTE = "ai.toolCall.result";
|
|
26
|
+
|
|
27
|
+
exports.AI_MODEL_ID_ATTRIBUTE = AI_MODEL_ID_ATTRIBUTE;
|
|
28
|
+
exports.AI_OPERATION_ID_ATTRIBUTE = AI_OPERATION_ID_ATTRIBUTE;
|
|
29
|
+
exports.AI_PROMPT_ATTRIBUTE = AI_PROMPT_ATTRIBUTE;
|
|
30
|
+
exports.AI_PROMPT_MESSAGES_ATTRIBUTE = AI_PROMPT_MESSAGES_ATTRIBUTE;
|
|
31
|
+
exports.AI_PROMPT_TOOLS_ATTRIBUTE = AI_PROMPT_TOOLS_ATTRIBUTE;
|
|
32
|
+
exports.AI_RESPONSE_FINISH_REASON_ATTRIBUTE = AI_RESPONSE_FINISH_REASON_ATTRIBUTE;
|
|
33
|
+
exports.AI_RESPONSE_OBJECT_ATTRIBUTE = AI_RESPONSE_OBJECT_ATTRIBUTE;
|
|
34
|
+
exports.AI_RESPONSE_PROVIDER_METADATA_ATTRIBUTE = AI_RESPONSE_PROVIDER_METADATA_ATTRIBUTE;
|
|
35
|
+
exports.AI_RESPONSE_TEXT_ATTRIBUTE = AI_RESPONSE_TEXT_ATTRIBUTE;
|
|
36
|
+
exports.AI_RESPONSE_TOOL_CALLS_ATTRIBUTE = AI_RESPONSE_TOOL_CALLS_ATTRIBUTE;
|
|
37
|
+
exports.AI_SCHEMA_ATTRIBUTE = AI_SCHEMA_ATTRIBUTE;
|
|
38
|
+
exports.AI_TELEMETRY_FUNCTION_ID_ATTRIBUTE = AI_TELEMETRY_FUNCTION_ID_ATTRIBUTE;
|
|
39
|
+
exports.AI_TOOL_CALL_ARGS_ATTRIBUTE = AI_TOOL_CALL_ARGS_ATTRIBUTE;
|
|
40
|
+
exports.AI_TOOL_CALL_ID_ATTRIBUTE = AI_TOOL_CALL_ID_ATTRIBUTE;
|
|
41
|
+
exports.AI_TOOL_CALL_NAME_ATTRIBUTE = AI_TOOL_CALL_NAME_ATTRIBUTE;
|
|
42
|
+
exports.AI_TOOL_CALL_RESULT_ATTRIBUTE = AI_TOOL_CALL_RESULT_ATTRIBUTE;
|
|
43
|
+
exports.AI_USAGE_CACHED_INPUT_TOKENS_ATTRIBUTE = AI_USAGE_CACHED_INPUT_TOKENS_ATTRIBUTE;
|
|
44
|
+
exports.AI_USAGE_COMPLETION_TOKENS_ATTRIBUTE = AI_USAGE_COMPLETION_TOKENS_ATTRIBUTE;
|
|
45
|
+
exports.AI_USAGE_INPUT_TOKEN_DETAILS_ATTRIBUTE_PREFIX = AI_USAGE_INPUT_TOKEN_DETAILS_ATTRIBUTE_PREFIX;
|
|
46
|
+
exports.AI_USAGE_PROMPT_TOKENS_ATTRIBUTE = AI_USAGE_PROMPT_TOKENS_ATTRIBUTE;
|
|
47
|
+
exports.AI_USAGE_TOKENS_ATTRIBUTE = AI_USAGE_TOKENS_ATTRIBUTE;
|
|
48
|
+
exports.AI_VALUES_ATTRIBUTE = AI_VALUES_ATTRIBUTE;
|
|
49
|
+
exports.OPERATION_NAME_ATTRIBUTE = OPERATION_NAME_ATTRIBUTE;
|
|
50
|
+
//# sourceMappingURL=vercel-ai-attributes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vercel-ai-attributes.js","sources":["../../../../src/ai/vercel-ai/vercel-ai-attributes.ts"],"sourcesContent":["/**\n * AI SDK Telemetry Attributes\n * Based on https://ai-sdk.dev/docs/ai-sdk-core/telemetry#collected-data\n */\n\n// =============================================================================\n// COMMON ATTRIBUTES\n// =============================================================================\n\n/**\n * Common attribute for operation name across all functions and spans\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#collected-data\n */\nexport const OPERATION_NAME_ATTRIBUTE = 'operation.name';\n\n/**\n * Common attribute for AI operation ID across all functions and spans\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#collected-data\n */\nexport const AI_OPERATION_ID_ATTRIBUTE = 'ai.operationId';\n\n// =============================================================================\n// SHARED ATTRIBUTES\n// =============================================================================\n\n/**\n * `generateText` function - `ai.generateText` span\n * `streamText` function - `ai.streamText` span\n *\n * The prompt that was used when calling the function\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamtext-function\n */\nexport const AI_PROMPT_ATTRIBUTE = 'ai.prompt';\n\n/**\n * `generateObject` function - `ai.generateObject` span\n * `streamObject` function - `ai.streamObject` span\n *\n * The JSON schema version of the schema that was passed into the function\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generateobject-function\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamobject-function\n */\nexport const AI_SCHEMA_ATTRIBUTE = 'ai.schema';\n\n/**\n * `generateObject` function - `ai.generateObject` span\n * `streamObject` function - `ai.streamObject` span\n *\n * The object that was generated (stringified JSON)\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generateobject-function\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#streamobject-function\n */\nexport const AI_RESPONSE_OBJECT_ATTRIBUTE = 'ai.response.object';\n\n/**\n * `embed` function - `ai.embed.doEmbed` span\n * `embedMany` function - `ai.embedMany` span\n *\n * The values that were passed into the function (array)\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#embed-function\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#embedmany-function\n */\nexport const AI_VALUES_ATTRIBUTE = 'ai.values';\n\n// =============================================================================\n// GENERATETEXT FUNCTION - UNIQUE ATTRIBUTES\n// =============================================================================\n\n/**\n * `generateText` function - `ai.generateText` span\n *\n * The text that was generated\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function\n */\nexport const AI_RESPONSE_TEXT_ATTRIBUTE = 'ai.response.text';\n\n/**\n * `generateText` function - `ai.generateText` span\n *\n * The tool calls that were made as part of the generation (stringified JSON)\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function\n */\nexport const AI_RESPONSE_TOOL_CALLS_ATTRIBUTE = 'ai.response.toolCalls';\n\n/**\n * `generateText` function - `ai.generateText` span\n *\n * The reason why the generation finished\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function\n */\nexport const AI_RESPONSE_FINISH_REASON_ATTRIBUTE = 'ai.response.finishReason';\n\n/**\n * `generateText` function - `ai.generateText` span\n *\n * The maximum number of steps that were set\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function\n */\nexport const AI_SETTINGS_MAX_STEPS_ATTRIBUTE = 'ai.settings.maxSteps';\n\n/**\n * `generateText` function - `ai.generateText.doGenerate` span\n *\n * The messages that were passed into the provider\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function\n */\nexport const AI_PROMPT_MESSAGES_ATTRIBUTE = 'ai.prompt.messages';\n\n/**\n * `generateText` function - `ai.generateText.doGenerate` span\n *\n * Array of stringified tool definitions\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#generatetext-function\n */\nexport const AI_PROMPT_TOOLS_ATTRIBUTE = 'ai.prompt.tools';\n\n// =============================================================================\n// BASIC LLM SPAN INFORMATION\n// =============================================================================\n\n/**\n * Basic LLM span information\n * Multiple spans\n *\n * The id of the model\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information\n */\nexport const AI_MODEL_ID_ATTRIBUTE = 'ai.model.id';\n\n/**\n * Basic LLM span information\n * Multiple spans\n *\n * Provider specific metadata returned with the generation response\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information\n */\nexport const AI_RESPONSE_PROVIDER_METADATA_ATTRIBUTE = 'ai.response.providerMetadata';\n\n/**\n * Basic LLM span information\n * Multiple spans\n *\n * The number of cached input tokens that were used\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information\n */\nexport const AI_USAGE_CACHED_INPUT_TOKENS_ATTRIBUTE = 'ai.usage.cachedInputTokens';\n\n/**\n * Prefix for the per-category breakdown of input tokens (AI SDK v6+), e.g.\n * `noCacheTokens`, `cacheReadTokens`, `cacheWriteTokens`. Only emitted by v6, where\n * `ai.usage.inputTokens` is already cache-inclusive.\n */\nexport const AI_USAGE_INPUT_TOKEN_DETAILS_ATTRIBUTE_PREFIX = 'ai.usage.inputTokenDetails.';\n\n/**\n * Basic LLM span information\n * Multiple spans\n *\n * The functionId that was set through `telemetry.functionId`\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information\n */\nexport const AI_TELEMETRY_FUNCTION_ID_ATTRIBUTE = 'ai.telemetry.functionId';\n\n/**\n * Basic LLM span information\n * Multiple spans\n *\n * The number of completion tokens that were used\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information\n */\nexport const AI_USAGE_COMPLETION_TOKENS_ATTRIBUTE = 'ai.usage.completionTokens';\n\n/**\n * Basic LLM span information\n * Multiple spans\n *\n * The number of prompt tokens that were used\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-llm-span-information\n */\nexport const AI_USAGE_PROMPT_TOKENS_ATTRIBUTE = 'ai.usage.promptTokens';\n\n// =============================================================================\n// CALL LLM SPAN INFORMATION\n// =============================================================================\n\n/**\n * Call LLM span information\n * Individual LLM call spans\n *\n * The model that was used to generate the response\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information\n */\nexport const AI_RESPONSE_MODEL_ATTRIBUTE = 'ai.response.model';\n\n/**\n * Call LLM span information\n * Individual LLM call spans\n *\n * The id of the response\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information\n */\nexport const AI_RESPONSE_ID_ATTRIBUTE = 'ai.response.id';\n\n/**\n * Call LLM span information\n * Individual LLM call spans\n *\n * The timestamp of the response\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#call-llm-span-information\n */\nexport const AI_RESPONSE_TIMESTAMP_ATTRIBUTE = 'ai.response.timestamp';\n\n// =============================================================================\n// BASIC EMBEDDING SPAN INFORMATION\n// =============================================================================\n\n/**\n * Basic embedding span information\n * Embedding spans\n *\n * The number of tokens that were used\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#basic-embedding-span-information\n */\nexport const AI_USAGE_TOKENS_ATTRIBUTE = 'ai.usage.tokens';\n\n// =============================================================================\n// TOOL CALL SPANS\n// =============================================================================\n\n/**\n * Tool call spans\n * `ai.toolCall` span\n *\n * The name of the tool\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#tool-call-spans\n */\nexport const AI_TOOL_CALL_NAME_ATTRIBUTE = 'ai.toolCall.name';\n\n/**\n * Tool call spans\n * `ai.toolCall` span\n *\n * The id of the tool call\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#tool-call-spans\n */\nexport const AI_TOOL_CALL_ID_ATTRIBUTE = 'ai.toolCall.id';\n\n/**\n * Tool call spans\n * `ai.toolCall` span\n *\n * The parameters of the tool call\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#tool-call-spans\n */\nexport const AI_TOOL_CALL_ARGS_ATTRIBUTE = 'ai.toolCall.args';\n\n/**\n * Tool call spans\n * `ai.toolCall` span\n *\n * The result of the tool call\n * @see https://ai-sdk.dev/docs/ai-sdk-core/telemetry#tool-call-spans\n */\nexport const AI_TOOL_CALL_RESULT_ATTRIBUTE = 'ai.toolCall.result';\n\n// =============================================================================\n// PROVIDER METADATA\n// =============================================================================\n\n/**\n * OpenAI Provider Metadata\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/openai\n * @see https://github.com/vercel/ai/blob/65e042afde6aad4da9d7a62526ece839eb34f9a5/packages/openai/src/openai-chat-language-model.ts#L397-L416\n * @see https://github.com/vercel/ai/blob/65e042afde6aad4da9d7a62526ece839eb34f9a5/packages/openai/src/responses/openai-responses-language-model.ts#L377C7-L384\n */\nexport interface OpenAiProviderMetadata {\n /**\n * The number of predicted output tokens that were accepted.\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/openai#predicted-outputs\n */\n acceptedPredictionTokens?: number;\n\n /**\n * The number of predicted output tokens that were rejected.\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/openai#predicted-outputs\n */\n rejectedPredictionTokens?: number;\n\n /**\n * The number of reasoning tokens that the model generated.\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/openai#responses-models\n */\n reasoningTokens?: number;\n\n /**\n * The number of prompt tokens that were a cache hit.\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/openai#responses-models\n */\n cachedPromptTokens?: number;\n\n /**\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/openai#responses-models\n *\n * The ID of the response. Can be used to continue a conversation.\n */\n responseId?: string;\n}\n\n/**\n * Anthropic Provider Metadata\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/anthropic\n * @see https://github.com/vercel/ai/blob/65e042afde6aad4da9d7a62526ece839eb34f9a5/packages/anthropic/src/anthropic-messages-language-model.ts#L346-L352\n */\ninterface AnthropicProviderMetadata {\n /**\n * The number of tokens that were used to create the cache.\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/anthropic#cache-control\n */\n cacheCreationInputTokens?: number;\n\n /**\n * The number of tokens that were read from the cache.\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/anthropic#cache-control\n */\n cacheReadInputTokens?: number;\n\n /**\n * Usage metrics for the Anthropic model.\n */\n usage?: {\n input_tokens: number;\n cache_creation_input_tokens?: number;\n cache_read_input_tokens?: number;\n cache_creation?: {\n ephemeral_5m_input_tokens?: number;\n ephemeral_1h_input_tokens?: number;\n };\n output_tokens?: number;\n service_tier?: string;\n };\n}\n\n/**\n * Amazon Bedrock Provider Metadata\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock\n * @see https://github.com/vercel/ai/blob/65e042afde6aad4da9d7a62526ece839eb34f9a5/packages/amazon-bedrock/src/bedrock-chat-language-model.ts#L263-L280\n */\ninterface AmazonBedrockProviderMetadata {\n /**\n * @see https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_ConverseTrace.html\n */\n trace?: {\n /**\n * The guardrail trace object.\n * @see https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_GuardrailTraceAssessment.html\n *\n * This was purposely left as unknown as it's a complex object. This can be typed in the future\n * if the SDK decides to support bedrock in a more advanced way.\n */\n guardrail?: unknown;\n /**\n * The request's prompt router.\n * @see https://docs.aws.amazon.com/bedrock/latest/APIReference/API_runtime_PromptRouterTrace.html\n */\n promptRouter?: {\n /**\n * The ID of the invoked model.\n */\n invokedModelId?: string;\n };\n };\n usage?: {\n /**\n * The number of tokens that were read from the cache.\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock#cache-points\n */\n cacheReadInputTokens?: number;\n\n /**\n * The number of tokens that were written to the cache.\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/amazon-bedrock#cache-points\n */\n cacheWriteInputTokens?: number;\n };\n}\n\n/**\n * Google Generative AI Provider Metadata\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai\n */\nexport interface GoogleGenerativeAIProviderMetadata {\n /**\n * @see https://github.com/vercel/ai/blob/65e042afde6aad4da9d7a62526ece839eb34f9a5/packages/google/src/google-generative-ai-prompt.ts#L28-L30\n */\n groundingMetadata: null | {\n /**\n * Array of search queries used to retrieve information\n * @example [\"What's the weather in Chicago this weekend?\"]\n *\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai#search-grounding\n */\n webSearchQueries: string[] | null;\n /**\n * Contains the main search result content used as an entry point\n * The `renderedContent` field contains the formatted content\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai#search-grounding\n */\n searchEntryPoint?: {\n renderedContent: string;\n } | null;\n /**\n * Contains details about how specific response parts are supported by search results\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/google-generative-ai#search-grounding\n */\n groundingSupports: Array<{\n /**\n * Information about the grounded text segment.\n */\n segment: {\n /**\n * The start index of the text segment.\n */\n startIndex?: number | null;\n /**\n * The end index of the text segment.\n */\n endIndex?: number | null;\n /**\n * The actual text segment.\n */\n text?: string | null;\n };\n /**\n * References to supporting search result chunks.\n */\n groundingChunkIndices?: number[] | null;\n /**\n * Confidence scores (0-1) for each supporting chunk.\n */\n confidenceScores?: number[] | null;\n }> | null;\n };\n /**\n * @see https://github.com/vercel/ai/blob/65e042afde6aad4da9d7a62526ece839eb34f9a5/packages/google/src/google-generative-ai-language-model.ts#L620-L627\n * @see https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/configure-safety-filters\n */\n safetyRatings?: null | unknown;\n}\n\n/**\n * DeepSeek Provider Metadata\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/deepseek\n */\ninterface DeepSeekProviderMetadata {\n /**\n * The number of tokens that were cache hits.\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/deepseek#cache-token-usage\n */\n promptCacheHitTokens?: number;\n\n /**\n * The number of tokens that were cache misses.\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/deepseek#cache-token-usage\n */\n promptCacheMissTokens?: number;\n}\n\n/**\n * Perplexity Provider Metadata\n * @see https://ai-sdk.dev/providers/ai-sdk-providers/perplexity\n */\ninterface PerplexityProviderMetadata {\n /**\n * Object containing citationTokens and numSearchQueries metrics\n */\n usage?: {\n citationTokens?: number;\n numSearchQueries?: number;\n };\n /**\n * Array of image URLs when return_images is enabled.\n *\n * You can enable image responses by setting return_images: true in the provider options.\n * This feature is only available to Perplexity Tier-2 users and above.\n */\n images?: Array<{\n imageUrl?: string;\n originUrl?: string;\n height?: number;\n width?: number;\n }>;\n}\n\nexport interface ProviderMetadata {\n openai?: OpenAiProviderMetadata;\n azure?: OpenAiProviderMetadata; // v6: Azure Responses API uses 'azure' key instead of 'openai'\n anthropic?: AnthropicProviderMetadata;\n bedrock?: AmazonBedrockProviderMetadata;\n google?: GoogleGenerativeAIProviderMetadata;\n vertex?: GoogleGenerativeAIProviderMetadata; // v6: Google Vertex uses 'vertex' key instead of 'google'\n deepseek?: DeepSeekProviderMetadata;\n perplexity?: PerplexityProviderMetadata;\n}\n"],"names":[],"mappings":";;AAaO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,wBAAA,CAAA,CAAA,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAMjC,CAAA,CAAA,CAAA,CAAA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AAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AASlC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,2BAAA,CAAA,CAAA,CAA8B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AASpC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,6BAAA,CAAA,CAAA,CAAgC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const WORKERS_AI_PROVIDER_NAME = "cloudflare.workers_ai";
|
|
4
|
+
const WORKERS_AI_ORIGIN = "auto.ai.cloudflare.workers_ai";
|
|
5
|
+
const WORKERS_AI_INTEGRATION_NAME = "WorkersAI";
|
|
6
|
+
|
|
7
|
+
exports.WORKERS_AI_INTEGRATION_NAME = WORKERS_AI_INTEGRATION_NAME;
|
|
8
|
+
exports.WORKERS_AI_ORIGIN = WORKERS_AI_ORIGIN;
|
|
9
|
+
exports.WORKERS_AI_PROVIDER_NAME = WORKERS_AI_PROVIDER_NAME;
|
|
10
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/ai/workers-ai/constants.ts"],"sourcesContent":["/**\n * The provider value for the `gen_ai.provider.name` attribute.\n * @see https://developers.cloudflare.com/workers-ai/\n */\nexport const WORKERS_AI_PROVIDER_NAME = 'cloudflare.workers_ai';\n\n/**\n * The Sentry origin for spans created by the Workers AI instrumentation.\n */\nexport const WORKERS_AI_ORIGIN = 'auto.ai.cloudflare.workers_ai';\n\n/**\n * The key used to register this provider in the AI provider skip registry.\n *\n * @see `_INTERNAL_skipAiProviderWrapping`\n */\nexport const WORKERS_AI_INTEGRATION_NAME = 'WorkersAI' as const;\n"],"names":[],"mappings":";;AAIO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,wBAAA,CAAA,CAAA,CAA2B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAKjC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,iBAAA,CAAA,CAAA,CAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAO1B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,2BAAA,CAAA,CAAA,CAA8B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const core = require('@sentry/core');
|
|
4
|
+
const utils = require('../core/utils.js');
|
|
5
|
+
const constants = require('./constants.js');
|
|
6
|
+
const streaming = require('./streaming.js');
|
|
7
|
+
const utils$1 = require('./utils.js');
|
|
8
|
+
|
|
9
|
+
function isReadableStream(value) {
|
|
10
|
+
return core.isObjectLike(value) && typeof value.pipeThrough === "function" && typeof value.getReader === "function";
|
|
11
|
+
}
|
|
12
|
+
function instrumentRun(originalRun, context, options) {
|
|
13
|
+
return function instrumentedRun(...args) {
|
|
14
|
+
if (core._INTERNAL_shouldSkipAiProviderWrapping(constants.WORKERS_AI_INTEGRATION_NAME)) {
|
|
15
|
+
return originalRun.apply(context, args);
|
|
16
|
+
}
|
|
17
|
+
const [model, inputs, runOptions] = args;
|
|
18
|
+
const operationName = utils$1.getOperationName(inputs);
|
|
19
|
+
const requestAttributes = utils$1.extractRequestAttributes(model, inputs, operationName);
|
|
20
|
+
const modelName = typeof model === "string" ? model : "unknown";
|
|
21
|
+
const isStreamRequested = !!inputs && typeof inputs === "object" && inputs.stream === true;
|
|
22
|
+
const returnsRawResponse = !!runOptions && typeof runOptions === "object" && (runOptions.returnRawResponse === true || runOptions.websocket === true);
|
|
23
|
+
const spanConfig = {
|
|
24
|
+
name: `${operationName} ${modelName}`,
|
|
25
|
+
op: `gen_ai.${operationName}`,
|
|
26
|
+
attributes: requestAttributes
|
|
27
|
+
};
|
|
28
|
+
if (isStreamRequested && !returnsRawResponse) {
|
|
29
|
+
return core.startSpanManual(spanConfig, (span) => {
|
|
30
|
+
const handleError = (error) => {
|
|
31
|
+
span.setStatus({ code: core.SPAN_STATUS_ERROR, message: "internal_error" });
|
|
32
|
+
span.end();
|
|
33
|
+
throw error;
|
|
34
|
+
};
|
|
35
|
+
let originalResult;
|
|
36
|
+
try {
|
|
37
|
+
originalResult = originalRun.apply(context, args);
|
|
38
|
+
} catch (error) {
|
|
39
|
+
return handleError(error);
|
|
40
|
+
}
|
|
41
|
+
if (options.recordInputs) {
|
|
42
|
+
utils$1.addRequestAttributes(span, inputs, operationName);
|
|
43
|
+
}
|
|
44
|
+
return originalResult.then((result) => {
|
|
45
|
+
if (isReadableStream(result)) {
|
|
46
|
+
return streaming.instrumentWorkersAiStream(result, span, options.recordOutputs);
|
|
47
|
+
}
|
|
48
|
+
utils$1.addResponseAttributes(span, result, options.recordOutputs);
|
|
49
|
+
span.end();
|
|
50
|
+
return result;
|
|
51
|
+
}, handleError);
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
return core.startSpan(spanConfig, (span) => {
|
|
55
|
+
const originalResult = originalRun.apply(context, args);
|
|
56
|
+
if (options.recordInputs) {
|
|
57
|
+
utils$1.addRequestAttributes(span, inputs, operationName);
|
|
58
|
+
}
|
|
59
|
+
return originalResult.then((result) => {
|
|
60
|
+
if (!returnsRawResponse) {
|
|
61
|
+
utils$1.addResponseAttributes(span, result, options.recordOutputs);
|
|
62
|
+
}
|
|
63
|
+
return result;
|
|
64
|
+
});
|
|
65
|
+
});
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
function instrumentWorkersAiClient(client, options) {
|
|
69
|
+
const resolvedOptions = utils.resolveAIRecordingOptions(options);
|
|
70
|
+
const instrumented = new Proxy(client, {
|
|
71
|
+
get(target, prop, receiver) {
|
|
72
|
+
const value = Reflect.get(target, prop, receiver);
|
|
73
|
+
if (prop === "run" && typeof value === "function") {
|
|
74
|
+
return instrumentRun(value, target, resolvedOptions);
|
|
75
|
+
}
|
|
76
|
+
return typeof value === "function" ? value.bind(target) : value;
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
return instrumented;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
exports.instrumentWorkersAiClient = instrumentWorkersAiClient;
|
|
83
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/ai/workers-ai/index.ts"],"sourcesContent":["import {\n _INTERNAL_shouldSkipAiProviderWrapping,\n isObjectLike,\n SPAN_STATUS_ERROR,\n startSpan,\n startSpanManual,\n} from '@sentry/core';\nimport type { Span } from '@sentry/core';\nimport { resolveAIRecordingOptions } from '../core/utils';\nimport { WORKERS_AI_INTEGRATION_NAME } from './constants';\nimport { instrumentWorkersAiStream } from './streaming';\nimport type { WorkersAiOptions } from './types';\nimport { addRequestAttributes, addResponseAttributes, extractRequestAttributes, getOperationName } from './utils';\n\n// Adapted from /server-utils/src/vercel-ai/util.ts\n// TODO(v11): Reuse this function once this gets moved to @sentry/server-utils\n// Workers AI streaming responses are SSE byte streams, so we narrow to `Uint8Array`.\nfunction isReadableStream(value: unknown): value is ReadableStream<Uint8Array> {\n return (\n isObjectLike(value) &&\n typeof (value as { pipeThrough?: unknown }).pipeThrough === 'function' &&\n typeof (value as { getReader?: unknown }).getReader === 'function'\n );\n}\n\n/**\n * Wrap the `run` method of the Workers AI binding with Sentry tracing.\n */\nfunction instrumentRun(\n originalRun: (...args: unknown[]) => Promise<unknown>,\n context: unknown,\n options: WorkersAiOptions & Required<Pick<WorkersAiOptions, 'recordInputs' | 'recordOutputs'>>,\n): (...args: unknown[]) => Promise<unknown> {\n return function instrumentedRun(...args: unknown[]): Promise<unknown> {\n // When another integration (e.g. Vercel AI via `workers-ai-provider`) is driving this binding,\n // it records the spans itself and marks this provider as skipped; skip here to avoid double spans.\n if (_INTERNAL_shouldSkipAiProviderWrapping(WORKERS_AI_INTEGRATION_NAME)) {\n return originalRun.apply(context, args);\n }\n\n const [model, inputs, runOptions] = args as [unknown, unknown, Record<string, unknown> | undefined];\n\n const operationName = getOperationName(inputs);\n const requestAttributes = extractRequestAttributes(model, inputs, operationName);\n const modelName = typeof model === 'string' ? model : 'unknown';\n\n const isStreamRequested =\n !!inputs && typeof inputs === 'object' && (inputs as { stream?: unknown }).stream === true;\n const returnsRawResponse =\n !!runOptions &&\n typeof runOptions === 'object' &&\n (runOptions.returnRawResponse === true || runOptions.websocket === true);\n\n const spanConfig = {\n name: `${operationName} ${modelName}`,\n op: `gen_ai.${operationName}`,\n attributes: requestAttributes,\n };\n\n if (isStreamRequested && !returnsRawResponse) {\n return startSpanManual(spanConfig, (span: Span) => {\n // `startSpanManual` does not auto-end the span, so we must end it on every exit path,\n // including a synchronous throw from `run`.\n const handleError = (error: unknown): never => {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n span.end();\n throw error;\n };\n\n let originalResult: Promise<unknown>;\n\n try {\n originalResult = originalRun.apply(context, args) as Promise<unknown>;\n } catch (error) {\n return handleError(error);\n }\n\n if (options.recordInputs) {\n addRequestAttributes(span, inputs, operationName);\n }\n\n return originalResult.then(result => {\n if (isReadableStream(result)) {\n return instrumentWorkersAiStream(result, span, options.recordOutputs);\n }\n\n // The model did not actually return a stream — finalize the span eagerly.\n addResponseAttributes(span, result, options.recordOutputs);\n span.end();\n return result;\n }, handleError);\n });\n }\n\n return startSpan(spanConfig, (span: Span) => {\n const originalResult = originalRun.apply(context, args) as Promise<unknown>;\n\n if (options.recordInputs) {\n addRequestAttributes(span, inputs, operationName);\n }\n\n return originalResult.then(result => {\n if (!returnsRawResponse) {\n addResponseAttributes(span, result, options.recordOutputs);\n }\n return result;\n });\n });\n };\n}\n\n/**\n * Instrument a Cloudflare Workers AI binding (`env.AI`) with Sentry tracing.\n *\n * This wraps the binding's `run` method to create `gen_ai` spans following the\n * Sentry AI Agents conventions. All other methods are passed through untouched.\n *\n * In `@sentry/cloudflare`, the `env.AI` binding is instrumented automatically —\n * wrapping manually is only needed to pass custom options.\n *\n * @example\n * ```javascript\n * const ai = Sentry.instrumentWorkersAiClient(env.AI, { recordInputs: true, recordOutputs: true });\n * const result = await ai.run('@cf/meta/llama-3.1-8b-instruct', { prompt: 'Hello' });\n * ```\n */\nexport function instrumentWorkersAiClient<T extends object>(client: T, options?: WorkersAiOptions): T {\n const resolvedOptions = resolveAIRecordingOptions(options);\n\n const instrumented = new Proxy(client, {\n get(target: object, prop: string | symbol, receiver: unknown): unknown {\n const value = Reflect.get(target, prop, receiver);\n\n if (prop === 'run' && typeof value === 'function') {\n return instrumentRun(value as (...args: unknown[]) => Promise<unknown>, target, resolvedOptions);\n }\n\n // Bind passed-through functions to the original target to preserve `this` (e.g. private fields).\n return typeof value === 'function' ? (value as (...args: unknown[]) => unknown).bind(target) : value;\n },\n }) as T;\n\n return instrumented;\n}\n"],"names":["isObjectLike","_INTERNAL_shouldSkipAiProviderWrapping","WORKERS_AI_INTEGRATION_NAME","getOperationName","extractRequestAttributes","startSpanManual","SPAN_STATUS_ERROR","addRequestAttributes","instrumentWorkersAiStream","addResponseAtt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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACT;;"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
+
|
|
3
|
+
const core = require('@sentry/core');
|
|
4
|
+
const utils$1 = require('../core/utils.js');
|
|
5
|
+
const utils = require('./utils.js');
|
|
6
|
+
|
|
7
|
+
function accumulateStreamingToolCalls(toolCalls, accumulator) {
|
|
8
|
+
for (const toolCall of toolCalls) {
|
|
9
|
+
const name = toolCall.function?.name ?? toolCall.name;
|
|
10
|
+
const args = toolCall.function?.arguments ?? toolCall.arguments;
|
|
11
|
+
if (name == null && args == null) {
|
|
12
|
+
continue;
|
|
13
|
+
}
|
|
14
|
+
const index = toolCall.index ?? 0;
|
|
15
|
+
const existing = accumulator[index];
|
|
16
|
+
if (!existing) {
|
|
17
|
+
accumulator[index] = {
|
|
18
|
+
index,
|
|
19
|
+
id: toolCall.id,
|
|
20
|
+
type: toolCall.type,
|
|
21
|
+
function: {
|
|
22
|
+
name,
|
|
23
|
+
arguments: args ?? ""
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
} else if (existing.function) {
|
|
27
|
+
if (name && !existing.function.name) {
|
|
28
|
+
existing.function.name = name;
|
|
29
|
+
}
|
|
30
|
+
if (args) {
|
|
31
|
+
existing.function.arguments = `${existing.function.arguments ?? ""}${args}`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
function processLine(line, state, recordOutputs, toolCallAccumulator) {
|
|
37
|
+
const trimmed = line.trim();
|
|
38
|
+
if (!trimmed.startsWith("data:")) {
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
const data = trimmed.slice("data:".length).trim();
|
|
42
|
+
if (!data || data === "[DONE]") {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
let parsed;
|
|
46
|
+
try {
|
|
47
|
+
parsed = JSON.parse(data);
|
|
48
|
+
} catch {
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
if (parsed.usage) {
|
|
52
|
+
if (typeof parsed.usage.prompt_tokens === "number") {
|
|
53
|
+
state.promptTokens = parsed.usage.prompt_tokens;
|
|
54
|
+
}
|
|
55
|
+
if (typeof parsed.usage.completion_tokens === "number") {
|
|
56
|
+
state.completionTokens = parsed.usage.completion_tokens;
|
|
57
|
+
}
|
|
58
|
+
if (typeof parsed.usage.total_tokens === "number") {
|
|
59
|
+
state.totalTokens = parsed.usage.total_tokens;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
if (recordOutputs && typeof parsed.response === "string") {
|
|
63
|
+
state.responseTexts.push(parsed.response);
|
|
64
|
+
}
|
|
65
|
+
if (recordOutputs && Array.isArray(parsed.tool_calls) && parsed.tool_calls.length > 0) {
|
|
66
|
+
state.toolCalls.push(...parsed.tool_calls);
|
|
67
|
+
}
|
|
68
|
+
if (Array.isArray(parsed.choices)) {
|
|
69
|
+
for (const choice of parsed.choices) {
|
|
70
|
+
if (recordOutputs && typeof choice.delta?.content === "string" && choice.delta.content) {
|
|
71
|
+
state.responseTexts.push(choice.delta.content);
|
|
72
|
+
}
|
|
73
|
+
if (recordOutputs && Array.isArray(choice.delta?.tool_calls)) {
|
|
74
|
+
accumulateStreamingToolCalls(choice.delta.tool_calls, toolCallAccumulator);
|
|
75
|
+
}
|
|
76
|
+
if (typeof choice.finish_reason === "string") {
|
|
77
|
+
state.finishReasons.push(choice.finish_reason);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function instrumentWorkersAiStream(stream, span, recordOutputs) {
|
|
83
|
+
const reader = stream.getReader();
|
|
84
|
+
const decoder = new TextDecoder();
|
|
85
|
+
const state = {
|
|
86
|
+
responseId: "",
|
|
87
|
+
responseModel: "",
|
|
88
|
+
finishReasons: [],
|
|
89
|
+
responseTexts: [],
|
|
90
|
+
toolCalls: [],
|
|
91
|
+
promptTokens: void 0,
|
|
92
|
+
completionTokens: void 0,
|
|
93
|
+
totalTokens: void 0
|
|
94
|
+
};
|
|
95
|
+
const toolCallAccumulator = {};
|
|
96
|
+
let buffer = "";
|
|
97
|
+
let spanEnded = false;
|
|
98
|
+
const finish = () => {
|
|
99
|
+
if (spanEnded) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
spanEnded = true;
|
|
103
|
+
if (recordOutputs) {
|
|
104
|
+
const accumulatedToolCalls = Object.values(toolCallAccumulator);
|
|
105
|
+
if (accumulatedToolCalls.length > 0) {
|
|
106
|
+
state.toolCalls.push(...accumulatedToolCalls);
|
|
107
|
+
}
|
|
108
|
+
utils.setOutputMessagesAttribute(span, {
|
|
109
|
+
responseText: state.responseTexts.join(""),
|
|
110
|
+
toolCalls: state.toolCalls
|
|
111
|
+
});
|
|
112
|
+
}
|
|
113
|
+
utils$1.endStreamSpan(span, state, recordOutputs);
|
|
114
|
+
};
|
|
115
|
+
const flushBuffer = (isDone) => {
|
|
116
|
+
const lines = buffer.split("\n");
|
|
117
|
+
buffer = isDone ? "" : lines.pop() ?? "";
|
|
118
|
+
for (const line of lines) {
|
|
119
|
+
processLine(line, state, recordOutputs, toolCallAccumulator);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
return new ReadableStream({
|
|
123
|
+
async pull(controller) {
|
|
124
|
+
try {
|
|
125
|
+
const { done, value } = await reader.read();
|
|
126
|
+
if (done) {
|
|
127
|
+
buffer += decoder.decode();
|
|
128
|
+
flushBuffer(true);
|
|
129
|
+
finish();
|
|
130
|
+
controller.close();
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
buffer += decoder.decode(value, { stream: true });
|
|
134
|
+
flushBuffer(false);
|
|
135
|
+
controller.enqueue(value);
|
|
136
|
+
} catch (error) {
|
|
137
|
+
span.setStatus({ code: core.SPAN_STATUS_ERROR, message: "internal_error" });
|
|
138
|
+
finish();
|
|
139
|
+
controller.error(error);
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
async cancel(reason) {
|
|
143
|
+
finish();
|
|
144
|
+
await reader.cancel(reason);
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
exports.instrumentWorkersAiStream = instrumentWorkersAiStream;
|
|
150
|
+
//# sourceMappingURL=streaming.js.map
|