@sentry/server-utils 11.0.0-beta.1 → 11.0.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/THIRD-PARTY-LICENSES.txt +32 -32
- package/build/cjs/ai/anthropic-ai/index.js +3 -3
- package/build/cjs/ai/anthropic-ai/index.js.map +1 -1
- package/build/cjs/ai/core/utils.js +41 -0
- package/build/cjs/ai/core/utils.js.map +1 -1
- package/build/cjs/ai/flue/constants.js +16 -0
- package/build/cjs/ai/flue/constants.js.map +1 -0
- package/build/cjs/ai/flue/index.js +115 -0
- package/build/cjs/ai/flue/index.js.map +1 -0
- package/build/cjs/ai/flue/utils.js +202 -0
- package/build/cjs/ai/flue/utils.js.map +1 -0
- package/build/cjs/ai/google-genai/index.js +18 -11
- package/build/cjs/ai/google-genai/index.js.map +1 -1
- package/build/cjs/ai/google-genai/streaming.js +11 -3
- package/build/cjs/ai/google-genai/streaming.js.map +1 -1
- package/build/cjs/ai/google-genai/utils.js +120 -10
- package/build/cjs/ai/google-genai/utils.js.map +1 -1
- package/build/cjs/ai/langchain/index.js +1 -1
- package/build/cjs/ai/langchain/index.js.map +1 -1
- package/build/cjs/ai/langgraph/index.js +5 -4
- package/build/cjs/ai/langgraph/index.js.map +1 -1
- package/build/cjs/ai/mastra/constants.js +40 -0
- package/build/cjs/ai/mastra/constants.js.map +1 -0
- package/build/cjs/ai/mastra/index.js +176 -0
- package/build/cjs/ai/mastra/index.js.map +1 -0
- package/build/cjs/ai/mastra/span-registry.js +20 -0
- package/build/cjs/ai/mastra/span-registry.js.map +1 -0
- package/build/cjs/ai/mastra/utils.js +159 -0
- package/build/cjs/ai/mastra/utils.js.map +1 -0
- package/build/cjs/ai/mistral/constants.js +20 -0
- package/build/cjs/ai/mistral/constants.js.map +1 -0
- package/build/cjs/ai/mistral/index.js +130 -0
- package/build/cjs/ai/mistral/index.js.map +1 -0
- package/build/cjs/ai/mistral/streaming.js +208 -0
- package/build/cjs/ai/mistral/streaming.js.map +1 -0
- package/build/cjs/ai/mistral/utils.js +87 -0
- package/build/cjs/ai/mistral/utils.js.map +1 -0
- package/build/cjs/ai/openai/index.js +3 -3
- package/build/cjs/ai/openai/index.js.map +1 -1
- package/build/cjs/ai/vercel-ai/index.js +13 -0
- package/build/cjs/ai/vercel-ai/index.js.map +1 -1
- package/build/cjs/ai/workers-ai/index.js +1 -4
- package/build/cjs/ai/workers-ai/index.js.map +1 -1
- package/build/cjs/ai/workers-ai/streaming.js +2 -3
- package/build/cjs/ai/workers-ai/streaming.js.map +1 -1
- package/build/cjs/ai/workers-ai/utils.js +2 -27
- package/build/cjs/ai/workers-ai/utils.js.map +1 -1
- package/build/cjs/eve.js +20 -0
- package/build/cjs/eve.js.map +1 -0
- package/build/cjs/index.js +66 -46
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.no-diagnostic-channels.js +26 -14
- package/build/cjs/index.no-diagnostic-channels.js.map +1 -1
- package/build/cjs/integrations/anthropic.js +1 -1
- package/build/cjs/integrations/anthropic.js.map +1 -1
- package/build/cjs/integrations/aws-sdk/constants.js +0 -2
- package/build/cjs/integrations/aws-sdk/constants.js.map +1 -1
- package/build/cjs/integrations/aws-sdk/services/lambda.js +1 -1
- package/build/cjs/integrations/aws-sdk/services/lambda.js.map +1 -1
- package/build/cjs/integrations/aws-sdk/services/sns.js +1 -1
- package/build/cjs/integrations/aws-sdk/services/sns.js.map +1 -1
- package/build/cjs/integrations/fastify/index.js.map +1 -1
- package/build/cjs/integrations/fastify/instrumentation.js.map +1 -1
- package/build/cjs/integrations/firebase/functions.js +13 -3
- package/build/cjs/integrations/firebase/functions.js.map +1 -1
- package/build/cjs/integrations/google-genai.js +1 -1
- package/build/cjs/integrations/google-genai.js.map +1 -1
- package/build/cjs/integrations/index.js +8 -0
- package/build/cjs/integrations/index.js.map +1 -1
- package/build/cjs/integrations/kafkajs/spans.js +8 -2
- package/build/cjs/integrations/kafkajs/spans.js.map +1 -1
- package/build/cjs/integrations/knex.js +6 -4
- package/build/cjs/integrations/knex.js.map +1 -1
- package/build/cjs/integrations/koa/index.js +2 -8
- package/build/cjs/integrations/koa/index.js.map +1 -1
- package/build/cjs/integrations/langchain.js +7 -1
- package/build/cjs/integrations/langchain.js.map +1 -1
- package/build/cjs/integrations/mastra.js +258 -0
- package/build/cjs/integrations/mastra.js.map +1 -0
- package/build/cjs/integrations/mistral.js +81 -0
- package/build/cjs/integrations/mistral.js.map +1 -0
- package/build/cjs/integrations/mysql.js +5 -5
- package/build/cjs/integrations/mysql.js.map +1 -1
- package/build/cjs/integrations/mysql2/index.js +4 -4
- package/build/cjs/integrations/mysql2/index.js.map +1 -1
- package/build/cjs/integrations/mysql2/mysql2-dc-subscriber.js +2 -3
- package/build/cjs/integrations/mysql2/mysql2-dc-subscriber.js.map +1 -1
- package/build/cjs/integrations/openai.js +1 -1
- package/build/cjs/integrations/openai.js.map +1 -1
- package/build/cjs/integrations/postgres-js.js +9 -8
- package/build/cjs/integrations/postgres-js.js.map +1 -1
- package/build/cjs/integrations/postgres.js +4 -4
- package/build/cjs/integrations/postgres.js.map +1 -1
- package/build/cjs/integrations/postgresjs.js +226 -0
- package/build/cjs/integrations/postgresjs.js.map +1 -0
- package/build/cjs/integrations/prisma/tracing-helper.js +6 -2
- package/build/cjs/integrations/prisma/tracing-helper.js.map +1 -1
- package/build/cjs/integrations/tedious.js +6 -5
- package/build/cjs/integrations/tedious.js.map +1 -1
- package/build/cjs/integrations/vercel-ai/util.js +0 -4
- package/build/cjs/integrations/vercel-ai/util.js.map +1 -1
- package/build/cjs/integrations/vercel-ai/vercel-ai-dc-subscriber.js +36 -1
- package/build/cjs/integrations/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -1
- package/build/cjs/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.js +2 -1
- package/build/cjs/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.js.map +1 -1
- package/build/cjs/orchestrion/bundler/options.js +1 -0
- package/build/cjs/orchestrion/bundler/options.js.map +1 -1
- package/build/cjs/orchestrion/bundler/rollup.js +6 -2
- package/build/cjs/orchestrion/bundler/rollup.js.map +1 -1
- package/build/cjs/orchestrion/channels.js +4 -0
- package/build/cjs/orchestrion/channels.js.map +1 -1
- package/build/cjs/orchestrion/config/channel-integration-definitions.js +2 -0
- package/build/cjs/orchestrion/config/channel-integration-definitions.js.map +1 -1
- package/build/cjs/orchestrion/config/index.js +12 -0
- package/build/cjs/orchestrion/config/index.js.map +1 -1
- package/build/cjs/orchestrion/config/mastra.js +38 -0
- package/build/cjs/orchestrion/config/mastra.js.map +1 -0
- package/build/cjs/orchestrion/config/mistral.js +57 -0
- package/build/cjs/orchestrion/config/mistral.js.map +1 -0
- package/build/cjs/tracing-channel.js +1 -0
- package/build/cjs/tracing-channel.js.map +1 -1
- package/build/cjs/utils/sql.js +236 -0
- package/build/cjs/utils/sql.js.map +1 -0
- package/build/esm/ai/anthropic-ai/index.js +4 -4
- package/build/esm/ai/anthropic-ai/index.js.map +1 -1
- package/build/esm/ai/core/utils.js +42 -3
- package/build/esm/ai/core/utils.js.map +1 -1
- package/build/esm/ai/flue/constants.js +11 -0
- package/build/esm/ai/flue/constants.js.map +1 -0
- package/build/esm/ai/flue/index.js +113 -0
- package/build/esm/ai/flue/index.js.map +1 -0
- package/build/esm/ai/flue/utils.js +193 -0
- package/build/esm/ai/flue/utils.js.map +1 -0
- package/build/esm/ai/google-genai/index.js +20 -13
- package/build/esm/ai/google-genai/index.js.map +1 -1
- package/build/esm/ai/google-genai/streaming.js +9 -1
- package/build/esm/ai/google-genai/streaming.js.map +1 -1
- package/build/esm/ai/google-genai/utils.js +117 -11
- package/build/esm/ai/google-genai/utils.js.map +1 -1
- package/build/esm/ai/langchain/index.js +1 -1
- package/build/esm/ai/langchain/index.js.map +1 -1
- package/build/esm/ai/langgraph/index.js +5 -4
- package/build/esm/ai/langgraph/index.js.map +1 -1
- package/build/esm/ai/mastra/constants.js +29 -0
- package/build/esm/ai/mastra/constants.js.map +1 -0
- package/build/esm/ai/mastra/index.js +174 -0
- package/build/esm/ai/mastra/index.js.map +1 -0
- package/build/esm/ai/mastra/span-registry.js +16 -0
- package/build/esm/ai/mastra/span-registry.js.map +1 -0
- package/build/esm/ai/mastra/utils.js +152 -0
- package/build/esm/ai/mastra/utils.js.map +1 -0
- package/build/esm/ai/mistral/constants.js +15 -0
- package/build/esm/ai/mistral/constants.js.map +1 -0
- package/build/esm/ai/mistral/index.js +126 -0
- package/build/esm/ai/mistral/index.js.map +1 -0
- package/build/esm/ai/mistral/streaming.js +205 -0
- package/build/esm/ai/mistral/streaming.js.map +1 -0
- package/build/esm/ai/mistral/utils.js +82 -0
- package/build/esm/ai/mistral/utils.js.map +1 -0
- package/build/esm/ai/openai/index.js +3 -3
- package/build/esm/ai/openai/index.js.map +1 -1
- package/build/esm/ai/vercel-ai/index.js +14 -2
- package/build/esm/ai/vercel-ai/index.js.map +1 -1
- package/build/esm/ai/workers-ai/index.js +2 -5
- package/build/esm/ai/workers-ai/index.js.map +1 -1
- package/build/esm/ai/workers-ai/streaming.js +1 -2
- package/build/esm/ai/workers-ai/streaming.js.map +1 -1
- package/build/esm/ai/workers-ai/utils.js +2 -27
- package/build/esm/ai/workers-ai/utils.js.map +1 -1
- package/build/esm/eve.js +18 -0
- package/build/esm/eve.js.map +1 -0
- package/build/esm/index.js +9 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/index.no-diagnostic-channels.js +5 -0
- package/build/esm/index.no-diagnostic-channels.js.map +1 -1
- package/build/esm/integrations/anthropic.js +1 -1
- package/build/esm/integrations/anthropic.js.map +1 -1
- package/build/esm/integrations/aws-sdk/constants.js +1 -2
- package/build/esm/integrations/aws-sdk/constants.js.map +1 -1
- package/build/esm/integrations/aws-sdk/services/lambda.js +2 -2
- package/build/esm/integrations/aws-sdk/services/lambda.js.map +1 -1
- package/build/esm/integrations/aws-sdk/services/sns.js +3 -3
- package/build/esm/integrations/aws-sdk/services/sns.js.map +1 -1
- package/build/esm/integrations/fastify/index.js.map +1 -1
- package/build/esm/integrations/fastify/instrumentation.js.map +1 -1
- package/build/esm/integrations/firebase/functions.js +15 -5
- package/build/esm/integrations/firebase/functions.js.map +1 -1
- package/build/esm/integrations/google-genai.js +1 -1
- package/build/esm/integrations/google-genai.js.map +1 -1
- package/build/esm/integrations/index.js +8 -0
- package/build/esm/integrations/index.js.map +1 -1
- package/build/esm/integrations/kafkajs/spans.js +8 -2
- package/build/esm/integrations/kafkajs/spans.js.map +1 -1
- package/build/esm/integrations/knex.js +6 -4
- package/build/esm/integrations/knex.js.map +1 -1
- package/build/esm/integrations/koa/index.js +3 -9
- package/build/esm/integrations/koa/index.js.map +1 -1
- package/build/esm/integrations/langchain.js +7 -1
- package/build/esm/integrations/langchain.js.map +1 -1
- package/build/esm/integrations/mastra.js +243 -0
- package/build/esm/integrations/mastra.js.map +1 -0
- package/build/esm/integrations/mistral.js +66 -0
- package/build/esm/integrations/mistral.js.map +1 -0
- package/build/esm/integrations/mysql.js +4 -4
- package/build/esm/integrations/mysql.js.map +1 -1
- package/build/esm/integrations/mysql2/index.js +4 -4
- package/build/esm/integrations/mysql2/index.js.map +1 -1
- package/build/esm/integrations/mysql2/mysql2-dc-subscriber.js +2 -3
- package/build/esm/integrations/mysql2/mysql2-dc-subscriber.js.map +1 -1
- package/build/esm/integrations/openai.js +1 -1
- package/build/esm/integrations/openai.js.map +1 -1
- package/build/esm/integrations/postgres-js.js +9 -8
- package/build/esm/integrations/postgres-js.js.map +1 -1
- package/build/esm/integrations/postgres.js +4 -4
- package/build/esm/integrations/postgres.js.map +1 -1
- package/build/esm/integrations/postgresjs.js +220 -0
- package/build/esm/integrations/postgresjs.js.map +1 -0
- package/build/esm/integrations/prisma/tracing-helper.js +6 -2
- package/build/esm/integrations/prisma/tracing-helper.js.map +1 -1
- package/build/esm/integrations/tedious.js +5 -4
- package/build/esm/integrations/tedious.js.map +1 -1
- package/build/esm/integrations/vercel-ai/util.js +1 -4
- package/build/esm/integrations/vercel-ai/util.js.map +1 -1
- package/build/esm/integrations/vercel-ai/vercel-ai-dc-subscriber.js +38 -3
- package/build/esm/integrations/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -1
- package/build/esm/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.js +2 -1
- package/build/esm/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.js.map +1 -1
- package/build/esm/orchestrion/bundler/options.js +1 -0
- package/build/esm/orchestrion/bundler/options.js.map +1 -1
- package/build/esm/orchestrion/bundler/rollup.js +6 -2
- package/build/esm/orchestrion/bundler/rollup.js.map +1 -1
- package/build/esm/orchestrion/channels.js +4 -0
- package/build/esm/orchestrion/channels.js.map +1 -1
- package/build/esm/orchestrion/config/channel-integration-definitions.js +2 -0
- package/build/esm/orchestrion/config/channel-integration-definitions.js.map +1 -1
- package/build/esm/orchestrion/config/index.js +11 -1
- package/build/esm/orchestrion/config/index.js.map +1 -1
- package/build/esm/orchestrion/config/mastra.js +34 -0
- package/build/esm/orchestrion/config/mastra.js.map +1 -0
- package/build/esm/orchestrion/config/mistral.js +53 -0
- package/build/esm/orchestrion/config/mistral.js.map +1 -0
- package/build/esm/package.json +1 -1
- package/build/esm/tracing-channel.js +1 -1
- package/build/esm/tracing-channel.js.map +1 -1
- package/build/esm/utils/sql.js +231 -0
- package/build/esm/utils/sql.js.map +1 -0
- package/build/types/ai/anthropic-ai/index.d.ts +1 -1
- package/build/types/ai/anthropic-ai/index.d.ts.map +1 -1
- package/build/types/ai/core/utils.d.ts +28 -0
- package/build/types/ai/core/utils.d.ts.map +1 -1
- package/build/types/ai/flue/constants.d.ts +35 -0
- package/build/types/ai/flue/constants.d.ts.map +1 -0
- package/build/types/ai/flue/index.d.ts +18 -0
- package/build/types/ai/flue/index.d.ts.map +1 -0
- package/build/types/ai/flue/types.d.ts +118 -0
- package/build/types/ai/flue/types.d.ts.map +1 -0
- package/build/types/ai/flue/utils.d.ts +38 -0
- package/build/types/ai/flue/utils.d.ts.map +1 -0
- package/build/types/ai/google-genai/index.d.ts +1 -1
- package/build/types/ai/google-genai/index.d.ts.map +1 -1
- package/build/types/ai/google-genai/streaming.d.ts.map +1 -1
- package/build/types/ai/google-genai/utils.d.ts +28 -4
- package/build/types/ai/google-genai/utils.d.ts.map +1 -1
- package/build/types/ai/index.d.ts +4 -0
- package/build/types/ai/index.d.ts.map +1 -1
- package/build/types/ai/langgraph/index.d.ts +1 -1
- package/build/types/ai/langgraph/index.d.ts.map +1 -1
- package/build/types/ai/mastra/constants.d.ts +32 -0
- package/build/types/ai/mastra/constants.d.ts.map +1 -0
- package/build/types/ai/mastra/index.d.ts +43 -0
- package/build/types/ai/mastra/index.d.ts.map +1 -0
- package/build/types/ai/mastra/span-registry.d.ts +5 -0
- package/build/types/ai/mastra/span-registry.d.ts.map +1 -0
- package/build/types/ai/mastra/types.d.ts +84 -0
- package/build/types/ai/mastra/types.d.ts.map +1 -0
- package/build/types/ai/mastra/utils.d.ts +23 -0
- package/build/types/ai/mastra/utils.d.ts.map +1 -0
- package/build/types/ai/mistral/constants.d.ts +30 -0
- package/build/types/ai/mistral/constants.d.ts.map +1 -0
- package/build/types/ai/mistral/index.d.ts +20 -0
- package/build/types/ai/mistral/index.d.ts.map +1 -0
- package/build/types/ai/mistral/streaming.d.ts +24 -0
- package/build/types/ai/mistral/streaming.d.ts.map +1 -0
- package/build/types/ai/mistral/types.d.ts +39 -0
- package/build/types/ai/mistral/types.d.ts.map +1 -0
- package/build/types/ai/mistral/utils.d.ts +20 -0
- package/build/types/ai/mistral/utils.d.ts.map +1 -0
- package/build/types/ai/openai/index.d.ts +1 -1
- package/build/types/ai/openai/index.d.ts.map +1 -1
- package/build/types/ai/vercel-ai/index.d.ts +6 -0
- package/build/types/ai/vercel-ai/index.d.ts.map +1 -1
- package/build/types/ai/vercel-ai/vercel-ai-attributes.d.ts +13 -0
- package/build/types/ai/vercel-ai/vercel-ai-attributes.d.ts.map +1 -1
- package/build/types/ai/workers-ai/index.d.ts.map +1 -1
- package/build/types/ai/workers-ai/utils.d.ts +2 -14
- package/build/types/ai/workers-ai/utils.d.ts.map +1 -1
- package/build/types/eve.d.ts +47 -0
- package/build/types/eve.d.ts.map +1 -0
- package/build/types/exports.d.ts +4 -0
- package/build/types/exports.d.ts.map +1 -1
- package/build/types/index.d.ts +7 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/aws-sdk/constants.d.ts +2 -3
- package/build/types/integrations/aws-sdk/constants.d.ts.map +1 -1
- package/build/types/integrations/aws-sdk/services/lambda.d.ts.map +1 -1
- package/build/types/integrations/aws-sdk/services/sns.d.ts.map +1 -1
- package/build/types/integrations/fastify/index.d.ts +1 -1
- package/build/types/integrations/fastify/instrumentation.d.ts +1 -1
- package/build/types/integrations/firebase/functions.d.ts.map +1 -1
- package/build/types/integrations/index.d.ts.map +1 -1
- package/build/types/integrations/kafkajs/spans.d.ts.map +1 -1
- package/build/types/integrations/koa/index.d.ts.map +1 -1
- package/build/types/integrations/langchain.d.ts.map +1 -1
- package/build/types/integrations/mastra.d.ts +18 -0
- package/build/types/integrations/mastra.d.ts.map +1 -0
- package/build/types/integrations/mistral.d.ts +7 -0
- package/build/types/integrations/mistral.d.ts.map +1 -0
- package/build/types/integrations/mysql2/index.d.ts.map +1 -1
- package/build/types/integrations/postgres-js.d.ts +1 -1
- package/build/types/integrations/postgres-js.d.ts.map +1 -1
- package/build/types/integrations/postgres.d.ts.map +1 -1
- package/build/types/integrations/postgresjs.d.ts +75 -0
- package/build/types/integrations/postgresjs.d.ts.map +1 -0
- package/build/types/integrations/prisma/tracing-helper.d.ts.map +1 -1
- package/build/types/integrations/vercel-ai/util.d.ts +2 -2
- package/build/types/integrations/vercel-ai/util.d.ts.map +1 -1
- package/build/types/integrations/vercel-ai/vercel-ai-dc-subscriber.d.ts.map +1 -1
- package/build/types/orchestrion/bundler/options.d.ts +9 -0
- package/build/types/orchestrion/bundler/options.d.ts.map +1 -1
- package/build/types/orchestrion/bundler/rollup.d.ts.map +1 -1
- package/build/types/orchestrion/channels.d.ts +10 -3
- package/build/types/orchestrion/channels.d.ts.map +1 -1
- package/build/types/orchestrion/config/channel-integration-definitions.d.ts +6 -0
- package/build/types/orchestrion/config/channel-integration-definitions.d.ts.map +1 -1
- package/build/types/orchestrion/config/index.d.ts +41 -0
- package/build/types/orchestrion/config/index.d.ts.map +1 -1
- package/build/types/orchestrion/config/mastra.d.ts +8 -0
- package/build/types/orchestrion/config/mastra.d.ts.map +1 -0
- package/build/types/orchestrion/config/mistral.d.ts +46 -0
- package/build/types/orchestrion/config/mistral.d.ts.map +1 -0
- package/build/types/orchestrion/config/pg.d.ts +1 -1
- package/build/types/tracing-channel.d.ts +8 -0
- package/build/types/tracing-channel.d.ts.map +1 -1
- package/build/types/utils/sql.d.ts +53 -0
- package/build/types/utils/sql.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { LRUMap, Span } from '@sentry/core';
|
|
2
|
+
import type { FlueModelRequestInfo, FlueObservation, FlueUsage } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Flue persists the incoming W3C `traceparent` at admission and replays it on the agent operation.
|
|
5
|
+
* Sentry's own propagation uses `sentry-trace`, so the carrier has to be converted before it can
|
|
6
|
+
* continue the trace. Kept local until something else needs a W3C parser.
|
|
7
|
+
*/
|
|
8
|
+
export declare function sentryTraceFromTraceparent(traceparent: string): string | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Turn and tool spans, keyed by the id of the work they cover. Bounded, because the key is only
|
|
11
|
+
* removed when the matching end observation arrives and an abandoned stream never emits one.
|
|
12
|
+
*/
|
|
13
|
+
export type SpanTracker = LRUMap<string, Span>;
|
|
14
|
+
export declare function startTurnSpan(observation: FlueObservation, turnSpans: SpanTracker): void;
|
|
15
|
+
export declare function endTurnSpan(observation: FlueObservation, turnSpans: SpanTracker, recordOutputs: boolean): void;
|
|
16
|
+
/**
|
|
17
|
+
* Flue reports token counts and its own computed costs on the same `usage` object, so both are set
|
|
18
|
+
* here. The cost figures have no equivalent in the provider SDKs' own instrumentation.
|
|
19
|
+
*/
|
|
20
|
+
export declare function setUsageAttributes(span: Span, usage: FlueUsage | undefined, isError?: boolean): void;
|
|
21
|
+
/**
|
|
22
|
+
* Tool spans hang off the agent invocation rather than the turn, matching how Flue's own
|
|
23
|
+
* OpenTelemetry adapter projects them: siblings of `chat`, correlated to model output by tool call
|
|
24
|
+
* id. Keyed by `toolCallId` so concurrent tool calls in one turn cannot cross-attribute.
|
|
25
|
+
*/
|
|
26
|
+
export declare function startToolSpan(observation: FlueObservation, toolSpans: SpanTracker, recordInputs: boolean): void;
|
|
27
|
+
export declare function endToolSpan(observation: FlueObservation, toolSpans: SpanTracker, recordOutputs: boolean): void;
|
|
28
|
+
/**
|
|
29
|
+
* `turn_request` is the only event carrying the request's content — the settled `turn` reports
|
|
30
|
+
* metadata alone — so input messages, system prompt and tool definitions are read from it.
|
|
31
|
+
*/
|
|
32
|
+
export declare function recordRequestContent(observation: FlueObservation, turnSpans: SpanTracker): void;
|
|
33
|
+
/**
|
|
34
|
+
* Model-call tuning and the provider endpoint, all on the settled turn's `ModelRequestInfo`. These
|
|
35
|
+
* are the conventional attributes the other AI integrations in this package set.
|
|
36
|
+
*/
|
|
37
|
+
export declare function setRequestAttributes(span: Span, request: FlueModelRequestInfo | undefined): void;
|
|
38
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/ai/flue/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AA0CjD,OAAO,KAAK,EAAiB,oBAAoB,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE/F;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAOlF;AAED;;;GAGG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAkD/C,wBAAgB,aAAa,CAAC,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,GAAG,IAAI,CAsBxF;AAED,wBAAgB,WAAW,CAAC,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,GAAG,IAAI,CAkD9G;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,GAAG,SAAS,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,IAAI,CA2BpG;AAED;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,YAAY,EAAE,OAAO,GAAG,IAAI,CAuB/G;AAED,wBAAgB,WAAW,CAAC,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,EAAE,aAAa,EAAE,OAAO,GAAG,IAAI,CAiB9G;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,eAAe,EAAE,SAAS,EAAE,WAAW,GAAG,IAAI,CAiB/F;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,oBAAoB,GAAG,SAAS,GAAG,IAAI,CAmBhG"}
|
|
@@ -9,7 +9,7 @@ export declare function extractModel(params: Record<string, unknown>, context?:
|
|
|
9
9
|
* Extract request attributes from method arguments
|
|
10
10
|
* Builds the base attributes for span creation including system info, model, and config
|
|
11
11
|
*/
|
|
12
|
-
export declare function extractRequestAttributes(operationName: string, params?: Record<string, unknown>, context?: unknown): Record<string, SpanAttributeValue>;
|
|
12
|
+
export declare function extractRequestAttributes(operationName: string, params?: Record<string, unknown>, context?: unknown, recordInputs?: boolean): Record<string, SpanAttributeValue>;
|
|
13
13
|
/**
|
|
14
14
|
* Add private request attributes to spans.
|
|
15
15
|
* This is only recorded if recordInputs is true.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/google-genai/index.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AA0B7D,OAAO,KAAK,EAA0B,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/google-genai/index.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,IAAI,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AA0B7D,OAAO,KAAK,EAA0B,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAS/F;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,OAAO,CAAC,EAAE,OAAO,GAAG,MAAM,CAqBvF;AA8BD;;;GAGG;AACH,wBAAgB,wBAAwB,CACtC,aAAa,EAAE,MAAM,EACrB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChC,OAAO,CAAC,EAAE,OAAO,EACjB,YAAY,UAAO,GAClB,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CA4BpC;AAED;;;;GAIG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CA6CpH;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,mBAAmB,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,IAAI,CA6D9G;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,iBAAiB,CAC/B,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,EAC3C,OAAO,EAAE,OAAO,GACf,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAYrC;AA2ID;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,CAAC,CAExG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../../../../src/ai/google-genai/streaming.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../../../../src/ai/google-genai/streaming.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AA+GnD;;;;GAIG;AACH,wBAAuB,gBAAgB,CACrC,MAAM,EAAE,aAAa,CAAC,mBAAmB,CAAC,EAC1C,IAAI,EAAE,IAAI,EACV,aAAa,EAAE,OAAO,GACrB,cAAc,CAAC,mBAAmB,EAAE,IAAI,EAAE,OAAO,CAAC,CAmBpD"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { Span } from '@sentry/core';
|
|
1
2
|
export type ContentListUnion = Content | Content[] | PartListUnion;
|
|
2
3
|
export type ContentUnion = Content | PartUnion[] | PartUnion;
|
|
3
4
|
export type Content = {
|
|
@@ -14,13 +15,36 @@ export type Part = Record<string, unknown> & {
|
|
|
14
15
|
text?: string;
|
|
15
16
|
};
|
|
16
17
|
export type PartListUnion = PartUnion[] | PartUnion;
|
|
17
|
-
|
|
18
|
+
/**
|
|
19
|
+
* A message part as described in https://develop.sentry.dev/sdk/telemetry/traces/modules/ai-agents/.
|
|
20
|
+
* Parts Sentry cannot type are dropped when the message is rendered, so Google's own `Part` shape
|
|
21
|
+
* (`{ text }`, `{ functionCall }`, ...) has to be translated into this one.
|
|
22
|
+
*/
|
|
23
|
+
export type MessagePart = Record<string, unknown> & {
|
|
24
|
+
type: string;
|
|
25
|
+
};
|
|
26
|
+
export type Message = {
|
|
18
27
|
role: string;
|
|
19
|
-
|
|
20
|
-
parts?: PartListUnion;
|
|
28
|
+
parts: MessagePart[];
|
|
21
29
|
};
|
|
22
30
|
/**
|
|
23
|
-
*
|
|
31
|
+
* Binary payloads are reported by media type only: `inlineData.data` is base64 bytes, which the
|
|
32
|
+
* conventions require to be dropped rather than recorded.
|
|
33
|
+
*/
|
|
34
|
+
export declare function partToMessagePart(part: unknown): MessagePart | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* Bare parts are collected into one message rather than one message each: `[{ text }, { inlineData }]`
|
|
37
|
+
* is a single multimodal turn in Google's API, not two turns.
|
|
24
38
|
*/
|
|
25
39
|
export declare function contentUnionToMessages(content: ContentListUnion, role?: string): Message[];
|
|
40
|
+
/** Collect the message parts of every candidate in a response. */
|
|
41
|
+
export declare function candidatesToMessageParts(candidates: unknown): MessagePart[];
|
|
42
|
+
/**
|
|
43
|
+
* Set alongside the deprecated `gen_ai.response.text` / `gen_ai.response.tool_calls`: Relay migrates
|
|
44
|
+
* those into `gen_ai.output.messages`, but the tool-calls half of that migration is lossy, so a turn
|
|
45
|
+
* that only calls a tool would otherwise render an empty Output.
|
|
46
|
+
*/
|
|
47
|
+
export declare function setOutputMessagesAttribute(span: Span, parts: MessagePart[]): void;
|
|
48
|
+
/** Flatten a `ContentUnion` instruction into the plain text `gen_ai.system_instructions` expects. */
|
|
49
|
+
export declare function systemInstructionToText(systemInstruction: unknown): string | undefined;
|
|
26
50
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/ai/google-genai/utils.ts"],"names":[],"mappings":"AACA,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,aAAa,CAAC;AACnE,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,SAAS,EAAE,GAAG,SAAS,CAAC;AAC7D,MAAM,MAAM,OAAO,GAAG;IACpB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AACF,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,MAAM,CAAC;AACtC,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAC3C,UAAU,CAAC,EAAE;QACX,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AACF,MAAM,MAAM,aAAa,GAAG,SAAS,EAAE,GAAG,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/ai/google-genai/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAIzC,MAAM,MAAM,gBAAgB,GAAG,OAAO,GAAG,OAAO,EAAE,GAAG,aAAa,CAAC;AACnE,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,SAAS,EAAE,GAAG,SAAS,CAAC;AAC7D,MAAM,MAAM,OAAO,GAAG;IACpB,KAAK,CAAC,EAAE,IAAI,EAAE,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AACF,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,MAAM,CAAC;AACtC,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAC3C,UAAU,CAAC,EAAE;QACX,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AACF,MAAM,MAAM,aAAa,GAAG,SAAS,EAAE,GAAG,SAAS,CAAC;AAEpD;;;;GAIG;AACH,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAErE,MAAM,MAAM,OAAO,GAAG;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,WAAW,EAAE,CAAC;CACtB,CAAC;AAWF;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW,GAAG,SAAS,CA2CxE;AAkBD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,gBAAgB,EAAE,IAAI,SAAS,GAAG,OAAO,EAAE,CAsC1F;AAED,kEAAkE;AAClE,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,OAAO,GAAG,WAAW,EAAE,CAU3E;AAuBD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,GAAG,IAAI,CAKjF;AAED,qGAAqG;AACrG,wBAAgB,uBAAuB,CAAC,iBAAiB,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAOtF"}
|
|
@@ -6,7 +6,11 @@
|
|
|
6
6
|
export { instrumentOpenAiClient } from './openai';
|
|
7
7
|
export { instrumentAnthropicAiClient } from './anthropic-ai';
|
|
8
8
|
export { instrumentGoogleGenAIClient } from './google-genai';
|
|
9
|
+
export { instrumentMistralAiClient } from './mistral';
|
|
9
10
|
export { instrumentWorkersAiClient } from './workers-ai';
|
|
10
11
|
export { createLangChainCallbackHandler, instrumentLangChainEmbeddings } from './langchain';
|
|
11
12
|
export { instrumentStateGraph, instrumentStateGraphCompile, instrumentCreateReactAgent } from './langgraph';
|
|
13
|
+
export { SentryMastraExporter } from './mastra';
|
|
14
|
+
export { createFlueInstrumentation } from './flue';
|
|
15
|
+
export type { FlueOptions } from './flue';
|
|
12
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ai/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,8BAA8B,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ai/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,8BAA8B,EAAE,6BAA6B,EAAE,MAAM,aAAa,CAAC;AAC5F,OAAO,EAAE,oBAAoB,EAAE,2BAA2B,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAC5G,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,yBAAyB,EAAE,MAAM,QAAQ,CAAC;AACnD,YAAY,EAAE,WAAW,EAAE,MAAM,QAAQ,CAAC"}
|
|
@@ -4,7 +4,7 @@ import type { CompiledGraph, LangGraphOptions } from './types';
|
|
|
4
4
|
* Instruments StateGraph's compile method to wrap the returned compiled graph's invoke() with a
|
|
5
5
|
* `gen_ai.invoke_agent` span.
|
|
6
6
|
*/
|
|
7
|
-
export declare function instrumentStateGraphCompile(originalCompile: (...args: unknown[]) => CompiledGraph,
|
|
7
|
+
export declare function instrumentStateGraphCompile(originalCompile: (...args: unknown[]) => CompiledGraph, rawOptions: LangGraphOptions): (...args: unknown[]) => CompiledGraph;
|
|
8
8
|
/**
|
|
9
9
|
* Instruments CompiledGraph's invoke method to create spans for agent invocation
|
|
10
10
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/langgraph/index.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,aAAa,EAAoB,MAAM,oBAAoB,CAAC;AAG1E,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAc/D;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,eAAe,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,aAAa,EACtD,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/langgraph/index.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,aAAa,EAAoB,MAAM,oBAAoB,CAAC;AAG1E,OAAO,KAAK,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAc/D;;;GAGG;AACH,wBAAgB,2BAA2B,CACzC,eAAe,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,aAAa,EACtD,UAAU,EAAE,gBAAgB,GAC3B,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,aAAa,CAuCvC;AAED;;;;GAIG;AACH,wBAAgB,6BAA6B,CAC3C,cAAc,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,EACxD,aAAa,EAAE,aAAa,EAC5B,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACvC,OAAO,EAAE,gBAAgB,EACzB,GAAG,CAAC,EAAE,aAAa,GAAG,IAAI,EAC1B,qBAAqB,CAAC,EAAE,OAAO,GAC9B,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAkG1C;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CACxC,wBAAwB,EAAE,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,aAAa,EAC/D,OAAO,CAAC,EAAE,gBAAgB,GACzB,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,aAAa,CAoDvC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS;IAAE,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;CAAE,EACjF,UAAU,EAAE,CAAC,EACb,OAAO,CAAC,EAAE,gBAAgB,GACzB,CAAC,CAIH"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const MASTRA_INTEGRATION_NAME: 'Mastra';
|
|
2
|
+
/** Cap on tracked spans, matching `MAX_TRACKED_PRISMA_SPANS`. Spans that never end would otherwise leak. */
|
|
3
|
+
export declare const MAX_TRACKED_MASTRA_SPANS = 1000;
|
|
4
|
+
export declare const MASTRA_ORIGIN = "auto.ai.mastra";
|
|
5
|
+
/** Not `sentry` — that is the community `@mastra/sentry` exporter name. */
|
|
6
|
+
export declare const MASTRA_EXPORTER_NAME = "sentry-sdk";
|
|
7
|
+
/** Name used by the community `@mastra/sentry` package. */
|
|
8
|
+
export declare const COMMUNITY_MASTRA_SENTRY_EXPORTER_NAME = "sentry";
|
|
9
|
+
/**
|
|
10
|
+
* Distinguishes our exporter from the community one. `Symbol.for` so the check still matches if
|
|
11
|
+
* two copies of `@sentry/server-utils` are loaded (`instanceof` would not).
|
|
12
|
+
*/
|
|
13
|
+
export declare const MASTRA_EXPORTER_BRAND: unique symbol;
|
|
14
|
+
/**
|
|
15
|
+
* Only conventional `gen_ai` ops. Unmapped Mastra types (workflow steps, processors, scorers, …)
|
|
16
|
+
* are dropped; their children re-parent onto the nearest mapped ancestor.
|
|
17
|
+
*
|
|
18
|
+
* `op` comes from `@sentry/conventions/op`. `operationName` is a `gen_ai.operation.name` literal —
|
|
19
|
+
* the conventions package has no constants for those.
|
|
20
|
+
*/
|
|
21
|
+
export declare const SPAN_TYPE_OPS: Readonly<Record<string, {
|
|
22
|
+
op: string;
|
|
23
|
+
operationName: string;
|
|
24
|
+
}>>;
|
|
25
|
+
export declare const TOOL_SPAN_TYPES: ReadonlySet<string>;
|
|
26
|
+
/**
|
|
27
|
+
* `model_inference` is omitted: Mastra nests `model_generation > model_step > model_inference`,
|
|
28
|
+
* and the inference span repeats the generation — mapping both to `gen_ai.chat` duplicates it.
|
|
29
|
+
*/
|
|
30
|
+
export declare const MODEL_SPAN_TYPES: ReadonlySet<string>;
|
|
31
|
+
export declare const AGENT_SPAN_TYPES: ReadonlySet<string>;
|
|
32
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/ai/mastra/constants.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,uBAAuB,EAAG,QAAiB,CAAC;AAEzD,4GAA4G;AAC5G,eAAO,MAAM,wBAAwB,OAAO,CAAC;AAE7C,eAAO,MAAM,aAAa,mBAAmB,CAAC;AAE9C,2EAA2E;AAC3E,eAAO,MAAM,oBAAoB,eAAe,CAAC;AAEjD,2DAA2D;AAC3D,eAAO,MAAM,qCAAqC,WAAW,CAAC;AAE9D;;;GAGG;AACH,eAAO,MAAM,qBAAqB,eAAuC,CAAC;AAE1E;;;;;;GAMG;AACH,eAAO,MAAM,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,CAAC,CASzF,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,WAAW,CAAC,MAAM,CAK9C,CAAC;AAEH;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAAiD,CAAC;AAEnG,eAAO,MAAM,gBAAgB,EAAE,WAAW,CAAC,MAAM,CAA0D,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { GenAiOptions } from '../core/utils';
|
|
2
|
+
import { MASTRA_EXPORTER_BRAND } from './constants';
|
|
3
|
+
import type { MastraObservabilityExporter, MastraTracingEvent } from './types';
|
|
4
|
+
export type MastraExporterOptions = GenAiOptions;
|
|
5
|
+
/**
|
|
6
|
+
* Mastra `ObservabilityExporter` that turns tracing events into Sentry spans.
|
|
7
|
+
*
|
|
8
|
+
* Never calls `Sentry.init()` / `Sentry.close()` — the community `@mastra/sentry` package does both
|
|
9
|
+
* and replaces the app's client. No `@mastra/*` or `node:` imports.
|
|
10
|
+
*/
|
|
11
|
+
export declare class SentryMastraExporter implements MastraObservabilityExporter {
|
|
12
|
+
name: string;
|
|
13
|
+
readonly [MASTRA_EXPORTER_BRAND] = true;
|
|
14
|
+
private readonly _spans;
|
|
15
|
+
/**
|
|
16
|
+
* Dropped span id -> parent id, for re-parenting descendants. A dropped span with no parent maps to
|
|
17
|
+
* its own id: `LRUMap.remove` only deletes truthy values, so an empty-string sentinel would never be
|
|
18
|
+
* evicted and would eventually fill the map, while a self-reference can never be a real parent id.
|
|
19
|
+
*/
|
|
20
|
+
private readonly _skipped;
|
|
21
|
+
private readonly _options;
|
|
22
|
+
constructor(options?: MastraExporterOptions);
|
|
23
|
+
/** Mastra's interface is async; the work is synchronous. */
|
|
24
|
+
exportTracingEvent(event: MastraTracingEvent): Promise<void>;
|
|
25
|
+
/** Flush without closing the client — the app still owns it. */
|
|
26
|
+
flush(): Promise<void>;
|
|
27
|
+
/** End open spans, then flush. Does not close the Sentry client. */
|
|
28
|
+
shutdown(): Promise<void>;
|
|
29
|
+
private _handleEvent;
|
|
30
|
+
private _onSpanStarted;
|
|
31
|
+
/** Track a started span, ending any Sentry span that would otherwise be dropped without `end()`. */
|
|
32
|
+
private _trackSpan;
|
|
33
|
+
/** Remove a tracked span and keep the id→span registry in lockstep. */
|
|
34
|
+
private _removeTracked;
|
|
35
|
+
private _onSpanUpdated;
|
|
36
|
+
private _onSpanEnded;
|
|
37
|
+
/** Copy model/usage onto the parent agent so the AI Agents view shows totals. */
|
|
38
|
+
private _rollUpToParentAgent;
|
|
39
|
+
/** Nearest exported ancestor of a dropped span. */
|
|
40
|
+
private _resolveParentId;
|
|
41
|
+
private _attributesFor;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/mastra/index.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAWlD,OAAO,EAEL,qBAAqB,EAKtB,MAAM,aAAa,CAAC;AAErB,OAAO,KAAK,EAAsB,2BAA2B,EAAkB,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEnH,MAAM,MAAM,qBAAqB,GAAG,YAAY,CAAC;AAajD;;;;;GAKG;AACH,qBAAa,oBAAqB,YAAW,2BAA2B;IAC/D,IAAI,SAAwB;IAEnC,SAAgB,CAAC,qBAAqB,CAAC,QAAQ;IAE/C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA6D;IACpF;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwD;IACjF,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAwB;IAEjD,YAAmB,OAAO,GAAE,qBAA0B,EAErD;IAED,4DAA4D;IAC/C,kBAAkB,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAUxE;IAED,gEAAgE;IACnD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAElC;IAED,oEAAoE;IACvD,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAUrC;IAED,OAAO,CAAC,YAAY;IA8BpB,OAAO,CAAC,cAAc;IAoBtB,oGAAoG;IACpG,OAAO,CAAC,UAAU;IAiBlB,uEAAuE;IACvE,OAAO,CAAC,cAAc;IAKtB,OAAO,CAAC,cAAc;IAOtB,OAAO,CAAC,YAAY;IAwBpB,iFAAiF;IACjF,OAAO,CAAC,oBAAoB;IAiB5B,mDAAmD;IACnD,OAAO,CAAC,gBAAgB;IAiBxB,OAAO,CAAC,cAAc;CAIvB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { Span } from '@sentry/core';
|
|
2
|
+
export declare function registerMastraSpan(mastraId: string, span: Span): void;
|
|
3
|
+
export declare function unregisterMastraSpan(mastraId: string): void;
|
|
4
|
+
export declare function getSentrySpanForMastraId(mastraId: string): Span | undefined;
|
|
5
|
+
//# sourceMappingURL=span-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"span-registry.d.ts","sourceRoot":"","sources":["../../../../src/ai/mastra/span-registry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAezC,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,GAAG,IAAI,CAErE;AAED,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAE3D;AAED,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAE3E"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Duck-typed copies of the `@mastra/core/observability` shapes we read. No `@mastra/*` dependency.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Span types this exporter maps onto a `gen_ai` op. Everything else — present or future — arrives
|
|
6
|
+
* as the open `string` arm and is dropped.
|
|
7
|
+
*/
|
|
8
|
+
export type MastraSpanType = 'agent_run' | 'workflow_run' | 'model_generation' | 'tool_call' | 'mcp_tool_call' | 'provider_tool_call' | 'client_tool_call' | 'rag_embedding' | (string & {});
|
|
9
|
+
export type MastraTracingEventType = 'span_started' | 'span_updated' | 'span_ended';
|
|
10
|
+
export interface MastraUsageStats {
|
|
11
|
+
inputTokens?: number;
|
|
12
|
+
outputTokens?: number;
|
|
13
|
+
totalTokens?: number;
|
|
14
|
+
inputDetails?: {
|
|
15
|
+
cacheRead?: number;
|
|
16
|
+
cacheWrite?: number;
|
|
17
|
+
};
|
|
18
|
+
outputDetails?: {
|
|
19
|
+
reasoning?: number;
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
export interface MastraErrorInfo {
|
|
23
|
+
id?: string;
|
|
24
|
+
name?: string;
|
|
25
|
+
message: string;
|
|
26
|
+
}
|
|
27
|
+
/** Fields that map onto a Sentry convention attribute. Everything else Mastra sets is ignored. */
|
|
28
|
+
export interface MastraSpanAttributes {
|
|
29
|
+
model?: string;
|
|
30
|
+
provider?: string;
|
|
31
|
+
responseModel?: string;
|
|
32
|
+
responseId?: string;
|
|
33
|
+
finishReason?: string;
|
|
34
|
+
streaming?: boolean;
|
|
35
|
+
usage?: MastraUsageStats;
|
|
36
|
+
parameters?: {
|
|
37
|
+
temperature?: number;
|
|
38
|
+
maxOutputTokens?: number;
|
|
39
|
+
topP?: number;
|
|
40
|
+
topK?: number;
|
|
41
|
+
presencePenalty?: number;
|
|
42
|
+
frequencyPenalty?: number;
|
|
43
|
+
stopSequences?: string[];
|
|
44
|
+
seed?: number;
|
|
45
|
+
};
|
|
46
|
+
toolDescription?: string;
|
|
47
|
+
instructions?: string;
|
|
48
|
+
prompt?: string;
|
|
49
|
+
conversationId?: string;
|
|
50
|
+
availableTools?: unknown;
|
|
51
|
+
}
|
|
52
|
+
export interface MastraExportedSpan {
|
|
53
|
+
id: string;
|
|
54
|
+
parentSpanId?: string;
|
|
55
|
+
/** Mastra's own name; unused for Sentry span names. */
|
|
56
|
+
name: string;
|
|
57
|
+
type: MastraSpanType;
|
|
58
|
+
startTime: Date;
|
|
59
|
+
endTime?: Date;
|
|
60
|
+
/** Point-in-time marker with no duration; dropped. */
|
|
61
|
+
isEvent?: boolean;
|
|
62
|
+
entityId?: string;
|
|
63
|
+
entityName?: string;
|
|
64
|
+
input?: unknown;
|
|
65
|
+
output?: unknown;
|
|
66
|
+
attributes?: MastraSpanAttributes;
|
|
67
|
+
metadata?: {
|
|
68
|
+
threadId?: string;
|
|
69
|
+
runId?: string;
|
|
70
|
+
};
|
|
71
|
+
errorInfo?: MastraErrorInfo;
|
|
72
|
+
}
|
|
73
|
+
export interface MastraTracingEvent {
|
|
74
|
+
type: MastraTracingEventType;
|
|
75
|
+
exportedSpan: MastraExportedSpan;
|
|
76
|
+
}
|
|
77
|
+
/** Subset of Mastra's `ObservabilityExporter`. The rest of that interface is optional. */
|
|
78
|
+
export interface MastraObservabilityExporter {
|
|
79
|
+
name: string;
|
|
80
|
+
exportTracingEvent(event: MastraTracingEvent): Promise<void>;
|
|
81
|
+
flush(): Promise<void>;
|
|
82
|
+
shutdown(): Promise<void>;
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","s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AC,IAAI,CAAC,CAAC;IACvB,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3B"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { SpanAttributeValue } from '@sentry/core';
|
|
2
|
+
import type { MastraExportedSpan, MastraSpanType, MastraUsageStats } from './types';
|
|
3
|
+
export interface AttributeRecordingOptions {
|
|
4
|
+
recordInputs: boolean;
|
|
5
|
+
recordOutputs: boolean;
|
|
6
|
+
}
|
|
7
|
+
export type SpanAttributes = Record<string, SpanAttributeValue | undefined>;
|
|
8
|
+
export declare function isExportedSpanType(spanType: MastraSpanType): boolean;
|
|
9
|
+
export declare function getOperation(spanType: MastraSpanType): {
|
|
10
|
+
op: string;
|
|
11
|
+
operationName: string;
|
|
12
|
+
} | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* `{operation} {identifier}` per the gen_ai name templates. Mastra's own span name is never used.
|
|
15
|
+
* https://getsentry.github.io/sentry-conventions/names/
|
|
16
|
+
*/
|
|
17
|
+
export declare function getSpanName(span: MastraExportedSpan): string;
|
|
18
|
+
export declare function getUsageAttributes(usage: MastraUsageStats | undefined): SpanAttributes;
|
|
19
|
+
/** Sum usage across generations. `setAttributes(undefined)` would drop the previous total. */
|
|
20
|
+
export declare function mergeUsageAttributes(existing: SpanAttributes, incoming: SpanAttributes): SpanAttributes;
|
|
21
|
+
/** Convention attributes only. Called on start and end — Mastra fills fields progressively. */
|
|
22
|
+
export declare function getSpanAttributes(span: MastraExportedSpan, options: AttributeRecordingOptions): SpanAttributes;
|
|
23
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/ai/mastra/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAuCvD,OAAO,KAAK,EAAE,kBAAkB,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEpF,MAAM,WAAW,yBAAyB;IACxC,YAAY,EAAE,OAAO,CAAC;IACtB,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,SAAS,CAAC,CAAC;AAE5E,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,cAAc,GAAG,OAAO,CAGpE;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,cAAc,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAExG;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,kBAAkB,GAAG,MAAM,CAQ5D;AAaD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,gBAAgB,GAAG,SAAS,GAAG,cAAc,CAqBtF;AAuBD,8FAA8F;AAC9F,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,cAAc,EAAE,QAAQ,EAAE,cAAc,GAAG,cAAc,CASvG;AAED,+FAA+F;AAC/F,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,kBAAkB,EAAE,OAAO,EAAE,yBAAyB,GAAG,cAAc,CAyB9G"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const MISTRAL_INTEGRATION_NAME: 'Mistral';
|
|
2
|
+
export declare const MISTRAL_PROVIDER_NAME: 'mistralai';
|
|
3
|
+
export declare const MISTRAL_ORIGIN: 'auto.ai.mistralai';
|
|
4
|
+
export declare const MISTRAL_METHOD_REGISTRY: {
|
|
5
|
+
readonly 'chat.complete': {
|
|
6
|
+
readonly operation: 'chat';
|
|
7
|
+
};
|
|
8
|
+
readonly 'chat.stream': {
|
|
9
|
+
readonly operation: 'chat';
|
|
10
|
+
readonly streaming: true;
|
|
11
|
+
};
|
|
12
|
+
readonly 'chat.parse': {
|
|
13
|
+
readonly operation: 'chat';
|
|
14
|
+
};
|
|
15
|
+
readonly 'chat.parseStream': {
|
|
16
|
+
readonly operation: 'chat';
|
|
17
|
+
readonly streaming: true;
|
|
18
|
+
};
|
|
19
|
+
readonly 'embeddings.create': {
|
|
20
|
+
readonly operation: 'embeddings';
|
|
21
|
+
};
|
|
22
|
+
readonly 'agents.complete': {
|
|
23
|
+
readonly operation: 'invoke_agent';
|
|
24
|
+
};
|
|
25
|
+
readonly 'agents.stream': {
|
|
26
|
+
readonly operation: 'invoke_agent';
|
|
27
|
+
readonly streaming: true;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../src/ai/mistral/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wBAAwB,EAAG,SAAkB,CAAC;AAI3D,eAAO,MAAM,qBAAqB,EAAG,WAAoB,CAAC;AAE1D,eAAO,MAAM,cAAc,EAAG,mBAA4B,CAAC;AAO3D,eAAO,MAAM,uBAAuB;;iBACf,SAAS,EAAE,MAAM;;;iBACnB,SAAS,EAAE,MAAM;iBAAE,SAAS;;;iBAC7B,SAAS,EAAE,MAAM;;;iBACX,SAAS,EAAE,MAAM;iBAAE,SAAS;;;iBAC3B,SAAS,EAAE,YAAY;;;iBACzB,SAAS,EAAE,cAAc;;;iBAC3B,SAAS,EAAE,cAAc;iBAAE,SAAS;;CACV,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Span } from '@sentry/core';
|
|
2
|
+
import type { MistralOptions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Extract request attributes from method arguments.
|
|
5
|
+
*
|
|
6
|
+
* `streaming` comes from the called method, not the request: v2 streams only through the dedicated
|
|
7
|
+
* `*.stream` methods, and their `stream` request field is optional, so a params-derived value would
|
|
8
|
+
* be missing on most streaming calls.
|
|
9
|
+
*/
|
|
10
|
+
export declare function extractRequestAttributes(args: unknown[], operationName: string, recordInputs: boolean, streaming: boolean): Record<string, unknown>;
|
|
11
|
+
/**
|
|
12
|
+
* Record AI request inputs on the span, if recording is enabled.
|
|
13
|
+
*/
|
|
14
|
+
export declare function addRequestAttributes(span: Span, params: Record<string, unknown>, operationName: string): void;
|
|
15
|
+
/**
|
|
16
|
+
* Instrument a Mistral client with Sentry tracing.
|
|
17
|
+
* Can be used across Node.js, Cloudflare Workers, and Vercel Edge.
|
|
18
|
+
*/
|
|
19
|
+
export declare function instrumentMistralAiClient<T extends object>(client: T, options?: MistralOptions): T;
|
|
20
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/mistral/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,IAAI,EAAsB,MAAM,cAAc,CAAC;AAqB7D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAa9C;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,OAAO,EAAE,EACf,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,OAAO,EACrB,SAAS,EAAE,OAAO,GACjB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAwBzB;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAoB7G;AAsGD;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,CAAC,CAElG"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Span } from '@sentry/core';
|
|
2
|
+
type AsyncIterableStream = {
|
|
3
|
+
[Symbol.asyncIterator]: () => AsyncIterator<unknown>;
|
|
4
|
+
};
|
|
5
|
+
/** Whether a value can be drained with `for await`. */
|
|
6
|
+
export declare function isAsyncIterable(value: unknown): value is AsyncIterableStream;
|
|
7
|
+
/**
|
|
8
|
+
* Instrument a Mistral event stream in place: accumulate response attributes as it is drained and
|
|
9
|
+
* end `span` when it finishes.
|
|
10
|
+
*
|
|
11
|
+
* The stream is patched rather than replaced because `EventStream` extends `ReadableStream`, so
|
|
12
|
+
* handing back a bare async generator would drop `getReader`, `tee`, `pipeTo` and the rest of the
|
|
13
|
+
* `ReadableStream` API the caller is entitled to.
|
|
14
|
+
*
|
|
15
|
+
* Both `for await` and `getReader()` are valid ways to drain a `ReadableStream`, and the SDK's
|
|
16
|
+
* iterator polyfill reads through `getReader()`, so both are wrapped. The first path to see a chunk
|
|
17
|
+
* claims accumulation and the other stays a pass-through, which keeps a chunk from being counted
|
|
18
|
+
* twice when one path drives the other.
|
|
19
|
+
*
|
|
20
|
+
* Returns `false` for a value that is not a stream, leaving it untouched.
|
|
21
|
+
*/
|
|
22
|
+
export declare function instrumentEventStream(stream: unknown, span: Span, recordOutputs: boolean): boolean;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=streaming.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming.d.ts","sourceRoot":"","sources":["../../../../src/ai/mistral/streaming.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAwBzC,KAAK,mBAAmB,GAAG;IAAE,CAAC,MAAM,CAAC,aAAa,CAAC,EAAE,MAAM,aAAa,CAAC,OAAO,CAAC,CAAA;CAAE,CAAC;AAepF,uDAAuD;AACvD,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,mBAAmB,CAE5E;AAmLD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,GAAG,OAAO,CA4FlG"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import type { GenAiOptions } from '../core/utils';
|
|
2
|
+
/** Options for the Mistral integration. */
|
|
3
|
+
export type MistralOptions = GenAiOptions;
|
|
4
|
+
/**
|
|
5
|
+
* A tool call as it appears in a response/stream delta. During streaming the `function.arguments`
|
|
6
|
+
* string arrives fragmented and is accumulated by `index`.
|
|
7
|
+
*/
|
|
8
|
+
export interface MistralToolCall {
|
|
9
|
+
id?: string;
|
|
10
|
+
type?: string;
|
|
11
|
+
index?: number;
|
|
12
|
+
function?: {
|
|
13
|
+
name?: string;
|
|
14
|
+
arguments?: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* A single streaming chunk. Field names are camelCase because the SDK deserializes the snake_case
|
|
19
|
+
* wire payload into typed objects before instrumentation sees them. Streaming APIs actually yield
|
|
20
|
+
* `CompletionEvent` objects that wrap this under `data`.
|
|
21
|
+
* @see https://docs.mistral.ai/api/#tag/chat/operation/stream_chat
|
|
22
|
+
*/
|
|
23
|
+
export interface MistralCompletionChunk {
|
|
24
|
+
id: string;
|
|
25
|
+
model: string;
|
|
26
|
+
choices?: Array<{
|
|
27
|
+
delta?: {
|
|
28
|
+
content?: string | Array<unknown> | null;
|
|
29
|
+
toolCalls?: MistralToolCall[] | null;
|
|
30
|
+
};
|
|
31
|
+
finishReason?: string | null;
|
|
32
|
+
}>;
|
|
33
|
+
usage?: {
|
|
34
|
+
promptTokens?: number;
|
|
35
|
+
completionTokens?: number;
|
|
36
|
+
totalTokens?: number;
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/ai/mistral/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,2CAA2C;AAC3C,MAAM,MAAM,cAAc,GAAG,YAAY,CAAC;AAE1C;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE;QACT,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH;AAED;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,KAAK,CAAC;QACd,KAAK,CAAC,EAAE;YAAE,OAAO,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;YAAC,SAAS,CAAC,EAAE,eAAe,EAAE,GAAG,IAAI,CAAA;SAAE,CAAC;QAC3F,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC9B,CAAC,CAAC;IACH,KAAK,CAAC,EAAE;QACN,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,gBAAgB,CAAC,EAAE,MAAM,CAAC;QAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;CACH"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Span } from '@sentry/core';
|
|
2
|
+
/**
|
|
3
|
+
* Turn a Mistral message content (string or content-chunk array) into a plain string.
|
|
4
|
+
*/
|
|
5
|
+
export declare function contentToString(content: unknown): string;
|
|
6
|
+
/**
|
|
7
|
+
* Build the span name for an instrumented Mistral call. Agent ids and a missing model are left out
|
|
8
|
+
* to keep the name low cardinality.
|
|
9
|
+
*/
|
|
10
|
+
export declare function getSpanName(operationName: string, attributes: Record<string, unknown>): string;
|
|
11
|
+
/**
|
|
12
|
+
* Extract request parameters. Mistral request fields are camelCase.
|
|
13
|
+
*/
|
|
14
|
+
export declare function extractRequestParameters(params: Record<string, unknown>): Record<string, unknown>;
|
|
15
|
+
/**
|
|
16
|
+
* Add response attributes to a span using duck-typing. Mistral responses are camelCase
|
|
17
|
+
* (`choices[].message`, `usage.promptTokens`), matching the SDK's deserialized objects.
|
|
18
|
+
*/
|
|
19
|
+
export declare function addResponseAttributes(span: Span, result: unknown, recordOutputs?: boolean): void;
|
|
20
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/ai/mistral/utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAsB,MAAM,cAAc,CAAC;AAqB7D;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAcxD;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAQ9F;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAYjG;AAED;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,CAAC,EAAE,OAAO,GAAG,IAAI,CA8DhG"}
|
|
@@ -3,7 +3,7 @@ import type { OpenAiOptions } from './types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Extract request attributes from method arguments
|
|
5
5
|
*/
|
|
6
|
-
export declare function extractRequestAttributes(args: unknown[], operationName: string): Record<string, unknown>;
|
|
6
|
+
export declare function extractRequestAttributes(args: unknown[], operationName: string, recordInputs: boolean): Record<string, unknown>;
|
|
7
7
|
export declare function addRequestAttributes(span: Span, params: Record<string, unknown>, operationName: string): void;
|
|
8
8
|
/**
|
|
9
9
|
* Instrument an OpenAI client with Sentry tracing
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/openai/index.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,IAAI,EAAsB,MAAM,cAAc,CAAC;AAoB7D,OAAO,KAAK,EAAuB,aAAa,EAAwC,MAAM,SAAS,CAAC;AA0BxG;;GAEG;AACH,wBAAgB,wBAAwB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/openai/index.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,IAAI,EAAsB,MAAM,cAAc,CAAC;AAoB7D,OAAO,KAAK,EAAuB,aAAa,EAAwC,MAAM,SAAS,CAAC;AA0BxG;;GAEG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,OAAO,EAAE,EACf,aAAa,EAAE,MAAM,EACrB,YAAY,EAAE,OAAO,GACpB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAqBzB;AAGD,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAyC7G;AAuHD;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,aAAa,GAAG,CAAC,CAE9F"}
|
|
@@ -6,4 +6,10 @@
|
|
|
6
6
|
* the channel result. Pass the already-parsed object; unknown/empty input yields `{}`.
|
|
7
7
|
*/
|
|
8
8
|
export declare function getProviderMetadataAttributes(providerMetadata: unknown): Record<string, number | string>;
|
|
9
|
+
/**
|
|
10
|
+
* Usage attributes derived from `providerMetadata`, which describes only the last step of a call.
|
|
11
|
+
* They must not be written onto a span that reports usage aggregated across steps
|
|
12
|
+
* (`gen_ai.invoke_agent`), where they would replace the aggregate with one step's figures.
|
|
13
|
+
*/
|
|
14
|
+
export declare const LAST_STEP_ONLY_USAGE_KEYS: Set<string>;
|
|
9
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/vercel-ai/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/vercel-ai/index.ts"],"names":[],"mappings":"AAWA;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CAAC,gBAAgB,EAAE,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,CAqExG;AAED;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,aAKpC,CAAC"}
|
|
@@ -170,6 +170,19 @@ export interface GoogleGenerativeAIProviderMetadata {
|
|
|
170
170
|
* @see https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/configure-safety-filters
|
|
171
171
|
*/
|
|
172
172
|
safetyRatings?: null | unknown;
|
|
173
|
+
/**
|
|
174
|
+
* Raw token usage returned by the Gemini API. Reasoning ("thoughts") tokens are reported here in
|
|
175
|
+
* `thoughtsTokenCount`, separately from the candidate output count, so they have to be added back
|
|
176
|
+
* into `gen_ai.usage.output_tokens`.
|
|
177
|
+
* @see https://ai.google.dev/api/generate-content#UsageMetadata
|
|
178
|
+
* @see https://github.com/vercel/ai/blob/main/packages/google/src/google-language-model.ts
|
|
179
|
+
*/
|
|
180
|
+
usageMetadata?: null | {
|
|
181
|
+
promptTokenCount?: number;
|
|
182
|
+
candidatesTokenCount?: number;
|
|
183
|
+
thoughtsTokenCount?: number;
|
|
184
|
+
totalTokenCount?: number;
|
|
185
|
+
};
|
|
173
186
|
}
|
|
174
187
|
/**
|
|
175
188
|
* DeepSeek Provider Metadata
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vercel-ai-attributes.d.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AAC;CACH;AAED;;;GAGG;AACH,MAAM,WAAW,kCAAkC;IACjD;;OAEG;IACH,iBAAiB,EAAE,IAAI,GAAG;QACxB;;;;;WAKG;QACH,gBAAgB,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;QAClC;;;;WAIG;QACH,gBAAgB,CAAC,EAAE;YACjB,eAAe,EAAE,MAAM,CAAC;SACzB,GAAG,IAAI,CAAC;QACT;;;WAGG;QACH,iBAAiB,EAAE,KAAK,CAAC;YACvB;;eAEG;YACH,OAAO,EAAE;gBACP;;mBAEG;gBACH,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;gBAC3B;;mBAEG;gBACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;gBACzB;;mBAEG;gBACH,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;aACtB,CAAC;YACF;;eAEG;YACH,qBAAqB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;YACxC;;eAEG;YACH,gBAAgB,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;SACpC,CAAC,GAAG,IAAI,CAAC;KACX,CAAC;IACF;;;OAGG;IACH,aAAa,CAAC,EAAE,IAAI,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"vercel-ai-attributes.d.ts","sourceRoot":"","sources":["../../../../src/ai/vercel-ai/vercel-ai-attributes.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;;GAKG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC;;;OAGG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAE5B;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED;;;;GAIG;AACH,UAAU,yBAAy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AAC;IACtC,OAAO,CAAC,EAAE,6BAA6B,CAAC;IACxC,MAAM,CAAC,EAAE,kCAAkC,CAAC;IAC5C,MAAM,CAAC,EAAE,kCAAkC,CAAC;IAC5C,QAAQ,CAAC,EAAE,wBAAwB,CAAC;IACpC,UAAU,CAAC,EAAE,0BAA0B,CAAC;CACzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/workers-ai/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ai/workers-ai/index.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAsGhD;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,MAAM,EAAE,MAAM,EAAE,CAAC,EAAE,OAAO,CAAC,EAAE,gBAAgB,GAAG,CAAC,CAiBpG"}
|