@sentry/server-utils 11.0.0-alpha.1 → 11.0.0-alpha.2
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 +30 -59
- package/build/cjs/ai/anthropic-ai/index.js.map +1 -1
- package/build/cjs/ai/anthropic-ai/streaming.js +0 -6
- package/build/cjs/ai/anthropic-ai/streaming.js.map +1 -1
- package/build/cjs/ai/anthropic-ai/utils.js +3 -2
- package/build/cjs/ai/anthropic-ai/utils.js.map +1 -1
- package/build/cjs/ai/core/utils.js +5 -15
- package/build/cjs/ai/core/utils.js.map +1 -1
- package/build/cjs/ai/google-genai/index.js +6 -14
- package/build/cjs/ai/google-genai/index.js.map +1 -1
- package/build/cjs/ai/langchain/embeddings.js +4 -7
- package/build/cjs/ai/langchain/embeddings.js.map +1 -1
- package/build/cjs/ai/langchain/index.js +21 -31
- package/build/cjs/ai/langchain/index.js.map +1 -1
- package/build/cjs/ai/langgraph/index.js +0 -6
- package/build/cjs/ai/langgraph/index.js.map +1 -1
- package/build/cjs/ai/langgraph/utils.js +0 -6
- package/build/cjs/ai/langgraph/utils.js.map +1 -1
- package/build/cjs/ai/openai/index.js +9 -26
- package/build/cjs/ai/openai/index.js.map +1 -1
- package/build/cjs/ai/vercel-ai/index.js +0 -281
- package/build/cjs/ai/vercel-ai/index.js.map +1 -1
- package/build/cjs/ai/workers-ai/index.js +4 -2
- package/build/cjs/ai/workers-ai/index.js.map +1 -1
- package/build/cjs/index.js +84 -41
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.no-diagnostic-channels.js +14 -16
- package/build/cjs/index.no-diagnostic-channels.js.map +1 -1
- package/build/cjs/integrations/amqplib.js +392 -0
- package/build/cjs/integrations/amqplib.js.map +1 -0
- package/build/cjs/integrations/anthropic.js +113 -0
- package/build/cjs/integrations/anthropic.js.map +1 -0
- package/build/cjs/integrations/aws-sdk/constants.js.map +1 -0
- package/build/cjs/integrations/aws-sdk/index.js +153 -0
- package/build/cjs/integrations/aws-sdk/index.js.map +1 -0
- package/build/cjs/integrations/aws-sdk/services/MessageAttributes.js +46 -0
- package/build/cjs/integrations/aws-sdk/services/MessageAttributes.js.map +1 -0
- package/build/cjs/integrations/aws-sdk/services/ServicesExtensions.js.map +1 -0
- package/build/cjs/integrations/aws-sdk/services/bedrock-runtime.js +423 -0
- package/build/cjs/integrations/aws-sdk/services/bedrock-runtime.js.map +1 -0
- package/build/cjs/integrations/aws-sdk/services/dynamodb.js +129 -0
- package/build/cjs/integrations/aws-sdk/services/dynamodb.js.map +1 -0
- package/build/cjs/integrations/aws-sdk/services/kinesis.js.map +1 -0
- package/build/cjs/integrations/aws-sdk/services/lambda.js +63 -0
- package/build/cjs/integrations/aws-sdk/services/lambda.js.map +1 -0
- package/build/cjs/integrations/aws-sdk/services/s3.js.map +1 -0
- package/build/cjs/integrations/aws-sdk/services/secretsmanager.js.map +1 -0
- package/build/cjs/integrations/aws-sdk/services/sns.js.map +1 -0
- package/build/cjs/integrations/aws-sdk/services/sqs.js.map +1 -0
- package/build/cjs/integrations/aws-sdk/services/stepfunctions.js.map +1 -0
- package/build/cjs/integrations/aws-sdk/utils.js.map +1 -0
- package/build/cjs/integrations/dataloader.js +126 -0
- package/build/cjs/integrations/dataloader.js.map +1 -0
- package/build/cjs/integrations/express/error-handled.js +17 -0
- package/build/cjs/integrations/express/error-handled.js.map +1 -0
- package/build/cjs/integrations/express/error-handler.js +44 -0
- package/build/cjs/integrations/express/error-handler.js.map +1 -0
- package/build/cjs/integrations/express/index.js +37 -0
- package/build/cjs/integrations/express/index.js.map +1 -0
- package/build/cjs/integrations/express/instrumentation.js +198 -0
- package/build/cjs/integrations/express/instrumentation.js.map +1 -0
- package/build/cjs/integrations/express/route.js.map +1 -0
- package/build/cjs/integrations/express/utils.js +12 -0
- package/build/cjs/integrations/express/utils.js.map +1 -0
- package/build/cjs/integrations/fastify/errors.js +49 -0
- package/build/cjs/integrations/fastify/errors.js.map +1 -0
- package/build/cjs/integrations/fastify/index.js +28 -0
- package/build/cjs/integrations/fastify/index.js.map +1 -0
- package/build/cjs/integrations/fastify/instrumentation.js +263 -0
- package/build/cjs/integrations/fastify/instrumentation.js.map +1 -0
- package/build/cjs/integrations/fastify/utils.js.map +1 -0
- package/build/cjs/integrations/firebase/firestore.js.map +1 -0
- package/build/cjs/integrations/firebase/functions.js +69 -0
- package/build/cjs/integrations/firebase/functions.js.map +1 -0
- package/build/cjs/integrations/firebase/index.js +20 -0
- package/build/cjs/integrations/firebase/index.js.map +1 -0
- package/build/cjs/integrations/firebase/instrumentation.js +69 -0
- package/build/cjs/integrations/firebase/instrumentation.js.map +1 -0
- package/build/cjs/integrations/generic-pool.js +49 -0
- package/build/cjs/integrations/generic-pool.js.map +1 -0
- package/build/cjs/integrations/google-genai.js +112 -0
- package/build/cjs/integrations/google-genai.js.map +1 -0
- package/build/cjs/integrations/graphql/constants.js +38 -0
- package/build/cjs/integrations/graphql/constants.js.map +1 -0
- package/build/cjs/integrations/graphql/graphql-dc-subscriber.js +122 -0
- package/build/cjs/integrations/graphql/graphql-dc-subscriber.js.map +1 -0
- package/build/cjs/integrations/graphql/index.js +73 -0
- package/build/cjs/integrations/graphql/index.js.map +1 -0
- package/build/cjs/integrations/graphql/resolvers.js +174 -0
- package/build/cjs/integrations/graphql/resolvers.js.map +1 -0
- package/build/cjs/integrations/graphql/spans.js +114 -0
- package/build/cjs/integrations/graphql/spans.js.map +1 -0
- package/build/cjs/integrations/graphql/utils.js +98 -0
- package/build/cjs/integrations/graphql/utils.js.map +1 -0
- package/build/cjs/integrations/hapi/hapi-error-handler.js +46 -0
- package/build/cjs/integrations/hapi/hapi-error-handler.js.map +1 -0
- package/build/cjs/integrations/hapi/hapi-types.js.map +1 -0
- package/build/cjs/integrations/hapi/hapi-utils.js +196 -0
- package/build/cjs/integrations/hapi/hapi-utils.js.map +1 -0
- package/build/cjs/integrations/hapi/index.js +86 -0
- package/build/cjs/integrations/hapi/index.js.map +1 -0
- package/build/cjs/integrations/index.js +64 -0
- package/build/cjs/integrations/index.js.map +1 -0
- package/build/cjs/integrations/kafkajs/consumer.js.map +1 -0
- package/build/cjs/integrations/kafkajs/index.js +83 -0
- package/build/cjs/integrations/kafkajs/index.js.map +1 -0
- package/build/cjs/integrations/kafkajs/semconv.js.map +1 -0
- package/build/cjs/integrations/kafkajs/spans.js +120 -0
- package/build/cjs/integrations/kafkajs/spans.js.map +1 -0
- package/build/cjs/integrations/knex.js +202 -0
- package/build/cjs/integrations/knex.js.map +1 -0
- package/build/cjs/integrations/koa/index.js +175 -0
- package/build/cjs/integrations/koa/index.js.map +1 -0
- package/build/cjs/integrations/koa/koa-error-handler.js +33 -0
- package/build/cjs/integrations/koa/koa-error-handler.js.map +1 -0
- package/build/cjs/integrations/langchain.js +81 -0
- package/build/cjs/integrations/langchain.js.map +1 -0
- package/build/cjs/integrations/langgraph.js +100 -0
- package/build/cjs/integrations/langgraph.js.map +1 -0
- package/build/cjs/integrations/lru-memoizer.js +42 -0
- package/build/cjs/integrations/lru-memoizer.js.map +1 -0
- package/build/cjs/integrations/mongodb/index.js +117 -0
- package/build/cjs/integrations/mongodb/index.js.map +1 -0
- package/build/cjs/integrations/mongodb/mongodb-span.js +129 -0
- package/build/cjs/integrations/mongodb/mongodb-span.js.map +1 -0
- package/build/cjs/integrations/mongoose/index.js +122 -0
- package/build/cjs/integrations/mongoose/index.js.map +1 -0
- package/build/cjs/integrations/mongoose/mongoose-dc-subscriber.js +97 -0
- package/build/cjs/integrations/mongoose/mongoose-dc-subscriber.js.map +1 -0
- package/build/cjs/integrations/mongoose/mongoose-legacy-span.js +34 -0
- package/build/cjs/integrations/mongoose/mongoose-legacy-span.js.map +1 -0
- package/build/cjs/integrations/mysql.js +118 -0
- package/build/cjs/integrations/mysql.js.map +1 -0
- package/build/cjs/integrations/mysql2/index.js +102 -0
- package/build/cjs/integrations/mysql2/index.js.map +1 -0
- package/build/cjs/integrations/mysql2/mysql2-dc-subscriber.js +72 -0
- package/build/cjs/integrations/mysql2/mysql2-dc-subscriber.js.map +1 -0
- package/build/cjs/integrations/openai.js +95 -0
- package/build/cjs/integrations/openai.js.map +1 -0
- package/build/cjs/integrations/postgres-js.js +210 -0
- package/build/cjs/integrations/postgres-js.js.map +1 -0
- package/build/cjs/integrations/postgres.js +183 -0
- package/build/cjs/integrations/postgres.js.map +1 -0
- package/build/cjs/integrations/prisma/global.js.map +1 -0
- package/build/cjs/integrations/prisma/index.js.map +1 -0
- package/build/cjs/integrations/prisma/tracing-helper.js +222 -0
- package/build/cjs/integrations/prisma/tracing-helper.js.map +1 -0
- package/build/cjs/integrations/redis/index.js +228 -0
- package/build/cjs/integrations/redis/index.js.map +1 -0
- package/build/cjs/integrations/redis/ioredis-channel-subscriber.js +100 -0
- package/build/cjs/integrations/redis/ioredis-channel-subscriber.js.map +1 -0
- package/build/cjs/integrations/redis/redis-cache.js +129 -0
- package/build/cjs/integrations/redis/redis-cache.js.map +1 -0
- package/build/cjs/integrations/redis/redis-dc-subscriber.js +97 -0
- package/build/cjs/integrations/redis/redis-dc-subscriber.js.map +1 -0
- package/build/cjs/integrations/redis/redis-statement-serializer.js.map +1 -0
- package/build/cjs/integrations/tedious.js +158 -0
- package/build/cjs/integrations/tedious.js.map +1 -0
- package/build/cjs/integrations/vercel-ai/index.js +45 -0
- package/build/cjs/integrations/vercel-ai/index.js.map +1 -0
- package/build/cjs/integrations/vercel-ai/util.js.map +1 -0
- package/build/cjs/integrations/vercel-ai/vercel-ai-dc-subscriber.js +434 -0
- package/build/cjs/integrations/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -0
- package/build/cjs/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.js +399 -0
- package/build/cjs/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.js.map +1 -0
- package/build/cjs/orchestrion/bundler/esbuild.js +1 -1
- package/build/cjs/orchestrion/bundler/esbuild.js.map +1 -1
- package/build/cjs/orchestrion/bundler/moduleInjectedTransform.js +19 -7
- package/build/cjs/orchestrion/bundler/moduleInjectedTransform.js.map +1 -1
- package/build/cjs/orchestrion/bundler/options.js.map +1 -1
- package/build/cjs/orchestrion/bundler/resolve.js +4 -0
- package/build/cjs/orchestrion/bundler/resolve.js.map +1 -1
- package/build/cjs/orchestrion/bundler/rollup.js +23 -7
- package/build/cjs/orchestrion/bundler/rollup.js.map +1 -1
- package/build/cjs/orchestrion/bundler/vite.js +7 -7
- package/build/cjs/orchestrion/bundler/vite.js.map +1 -1
- package/build/cjs/orchestrion/bundler/webpack-loader.js.map +1 -1
- package/build/cjs/orchestrion/bundler/webpack.js +5 -6
- package/build/cjs/orchestrion/bundler/webpack.js.map +1 -1
- package/build/cjs/orchestrion/config/amqplib.js.map +1 -1
- package/build/cjs/orchestrion/config/anthropic-ai.js.map +1 -1
- package/build/cjs/orchestrion/config/channel-integration-definitions.js +23 -6
- package/build/cjs/orchestrion/config/channel-integration-definitions.js.map +1 -1
- package/build/cjs/orchestrion/config/dataloader.js.map +1 -1
- package/build/cjs/orchestrion/config/express.js.map +1 -1
- package/build/cjs/orchestrion/config/firebase.js.map +1 -1
- package/build/cjs/orchestrion/config/generic-pool.js.map +1 -1
- package/build/cjs/orchestrion/config/google-genai.js.map +1 -1
- package/build/cjs/orchestrion/config/graphql.js +9 -9
- package/build/cjs/orchestrion/config/graphql.js.map +1 -1
- package/build/cjs/orchestrion/config/hapi.js +19 -1
- package/build/cjs/orchestrion/config/hapi.js.map +1 -1
- package/build/cjs/orchestrion/config/index.js +2 -0
- package/build/cjs/orchestrion/config/index.js.map +1 -1
- package/build/cjs/orchestrion/config/ioredis.js +2 -0
- package/build/cjs/orchestrion/config/ioredis.js.map +1 -1
- package/build/cjs/orchestrion/config/kafkajs.js.map +1 -1
- package/build/cjs/orchestrion/config/knex.js.map +1 -1
- package/build/cjs/orchestrion/config/koa.js +13 -1
- package/build/cjs/orchestrion/config/koa.js.map +1 -1
- package/build/cjs/orchestrion/config/langchain.js.map +1 -1
- package/build/cjs/orchestrion/config/langgraph.js.map +1 -1
- package/build/cjs/orchestrion/config/lru-memoizer.js.map +1 -1
- package/build/cjs/orchestrion/config/mongodb.js.map +1 -1
- package/build/cjs/orchestrion/config/mongoose.js +2 -0
- package/build/cjs/orchestrion/config/mongoose.js.map +1 -1
- package/build/cjs/orchestrion/config/mysql.js.map +1 -1
- package/build/cjs/orchestrion/config/mysql2.js +2 -0
- package/build/cjs/orchestrion/config/mysql2.js.map +1 -1
- package/build/cjs/orchestrion/config/nestjs.js +4 -4
- package/build/cjs/orchestrion/config/nestjs.js.map +1 -1
- package/build/cjs/orchestrion/config/openai.js +4 -4
- package/build/cjs/orchestrion/config/openai.js.map +1 -1
- package/build/cjs/orchestrion/config/pg.js.map +1 -1
- package/build/cjs/orchestrion/config/postgres.js.map +1 -1
- package/build/cjs/orchestrion/config/redis.js +2 -0
- package/build/cjs/orchestrion/config/redis.js.map +1 -1
- package/build/cjs/orchestrion/config/registration-only.js +15 -0
- package/build/cjs/orchestrion/config/registration-only.js.map +1 -0
- package/build/cjs/orchestrion/config/remix.js.map +1 -1
- package/build/cjs/orchestrion/config/tedious.js.map +1 -1
- package/build/cjs/orchestrion/config/vercel-ai.js +4 -0
- package/build/cjs/orchestrion/config/vercel-ai.js.map +1 -1
- package/build/cjs/orchestrion/detect.js +4 -7
- package/build/cjs/orchestrion/detect.js.map +1 -1
- package/build/cjs/orchestrion/instrumentation.js +8 -8
- package/build/cjs/orchestrion/instrumentation.js.map +1 -1
- package/build/cjs/orchestrion/runtime/register.js +1 -1
- package/build/cjs/orchestrion/runtime/register.js.map +1 -1
- package/build/cjs/tracing-channel.js +1 -1
- package/build/cjs/tracing-channel.js.map +1 -1
- package/build/cjs/utils/moduleInjected.js +18 -0
- package/build/cjs/utils/moduleInjected.js.map +1 -0
- package/build/cjs/utils/setHttpServerSpanRouteAttribute.js +1 -1
- package/build/cjs/utils/setHttpServerSpanRouteAttribute.js.map +1 -1
- package/build/esm/ai/anthropic-ai/index.js +27 -56
- package/build/esm/ai/anthropic-ai/index.js.map +1 -1
- package/build/esm/ai/anthropic-ai/streaming.js +0 -6
- package/build/esm/ai/anthropic-ai/streaming.js.map +1 -1
- package/build/esm/ai/anthropic-ai/utils.js +4 -3
- package/build/esm/ai/anthropic-ai/utils.js.map +1 -1
- package/build/esm/ai/core/utils.js +8 -18
- package/build/esm/ai/core/utils.js.map +1 -1
- package/build/esm/ai/google-genai/index.js +7 -15
- package/build/esm/ai/google-genai/index.js.map +1 -1
- package/build/esm/ai/langchain/embeddings.js +5 -8
- package/build/esm/ai/langchain/embeddings.js.map +1 -1
- package/build/esm/ai/langchain/index.js +19 -29
- package/build/esm/ai/langchain/index.js.map +1 -1
- package/build/esm/ai/langgraph/index.js +1 -7
- package/build/esm/ai/langgraph/index.js.map +1 -1
- package/build/esm/ai/langgraph/utils.js +1 -7
- package/build/esm/ai/langgraph/utils.js.map +1 -1
- package/build/esm/ai/openai/index.js +10 -27
- package/build/esm/ai/openai/index.js.map +1 -1
- package/build/esm/ai/vercel-ai/index.js +2 -281
- package/build/esm/ai/vercel-ai/index.js.map +1 -1
- package/build/esm/ai/workers-ai/index.js +5 -3
- package/build/esm/ai/workers-ai/index.js.map +1 -1
- package/build/esm/index.js +38 -11
- package/build/esm/index.js.map +1 -1
- package/build/esm/index.no-diagnostic-channels.js +0 -1
- package/build/esm/index.no-diagnostic-channels.js.map +1 -1
- package/build/esm/integrations/amqplib.js +377 -0
- package/build/esm/integrations/amqplib.js.map +1 -0
- package/build/esm/integrations/anthropic.js +98 -0
- package/build/esm/integrations/anthropic.js.map +1 -0
- package/build/esm/integrations/aws-sdk/constants.js.map +1 -0
- package/build/esm/integrations/aws-sdk/index.js +138 -0
- package/build/esm/integrations/aws-sdk/index.js.map +1 -0
- package/build/esm/integrations/aws-sdk/services/MessageAttributes.js +41 -0
- package/build/esm/integrations/aws-sdk/services/MessageAttributes.js.map +1 -0
- package/build/esm/integrations/aws-sdk/services/ServicesExtensions.js.map +1 -0
- package/build/esm/integrations/aws-sdk/services/bedrock-runtime.js +421 -0
- package/build/esm/integrations/aws-sdk/services/bedrock-runtime.js.map +1 -0
- package/build/esm/integrations/aws-sdk/services/dynamodb.js +127 -0
- package/build/esm/integrations/aws-sdk/services/dynamodb.js.map +1 -0
- package/build/esm/integrations/aws-sdk/services/kinesis.js.map +1 -0
- package/build/esm/integrations/aws-sdk/services/lambda.js +61 -0
- package/build/esm/integrations/aws-sdk/services/lambda.js.map +1 -0
- package/build/esm/integrations/aws-sdk/services/s3.js.map +1 -0
- package/build/esm/integrations/aws-sdk/services/secretsmanager.js.map +1 -0
- package/build/esm/integrations/aws-sdk/services/sns.js.map +1 -0
- package/build/esm/integrations/aws-sdk/services/sqs.js.map +1 -0
- package/build/esm/integrations/aws-sdk/services/stepfunctions.js.map +1 -0
- package/build/esm/integrations/aws-sdk/utils.js.map +1 -0
- package/build/esm/integrations/dataloader.js +111 -0
- package/build/esm/integrations/dataloader.js.map +1 -0
- package/build/esm/integrations/express/error-handled.js +14 -0
- package/build/esm/integrations/express/error-handled.js.map +1 -0
- package/build/esm/integrations/express/error-handler.js +41 -0
- package/build/esm/integrations/express/error-handler.js.map +1 -0
- package/build/esm/integrations/express/index.js +22 -0
- package/build/esm/integrations/express/index.js.map +1 -0
- package/build/esm/integrations/express/instrumentation.js +195 -0
- package/build/esm/integrations/express/instrumentation.js.map +1 -0
- package/build/esm/integrations/express/route.js.map +1 -0
- package/build/esm/integrations/express/utils.js +10 -0
- package/build/esm/integrations/express/utils.js.map +1 -0
- package/build/esm/integrations/fastify/errors.js +33 -0
- package/build/esm/integrations/fastify/errors.js.map +1 -0
- package/build/esm/integrations/fastify/index.js +25 -0
- package/build/esm/integrations/fastify/index.js.map +1 -0
- package/build/esm/integrations/fastify/instrumentation.js +248 -0
- package/build/esm/integrations/fastify/instrumentation.js.map +1 -0
- package/build/esm/integrations/fastify/utils.js.map +1 -0
- package/build/esm/integrations/firebase/firestore.js.map +1 -0
- package/build/esm/integrations/firebase/functions.js +67 -0
- package/build/esm/integrations/firebase/functions.js.map +1 -0
- package/build/esm/integrations/firebase/index.js +18 -0
- package/build/esm/integrations/firebase/index.js.map +1 -0
- package/build/esm/integrations/firebase/instrumentation.js +54 -0
- package/build/esm/integrations/firebase/instrumentation.js.map +1 -0
- package/build/esm/integrations/generic-pool.js +34 -0
- package/build/esm/integrations/generic-pool.js.map +1 -0
- package/build/esm/integrations/google-genai.js +97 -0
- package/build/esm/integrations/google-genai.js.map +1 -0
- package/build/esm/integrations/graphql/constants.js +20 -0
- package/build/esm/integrations/graphql/constants.js.map +1 -0
- package/build/esm/integrations/graphql/graphql-dc-subscriber.js +115 -0
- package/build/esm/integrations/graphql/graphql-dc-subscriber.js.map +1 -0
- package/build/esm/integrations/graphql/index.js +58 -0
- package/build/esm/integrations/graphql/index.js.map +1 -0
- package/build/esm/integrations/graphql/resolvers.js +170 -0
- package/build/esm/integrations/graphql/resolvers.js.map +1 -0
- package/build/esm/integrations/graphql/spans.js +108 -0
- package/build/esm/integrations/graphql/spans.js.map +1 -0
- package/build/esm/integrations/graphql/utils.js +93 -0
- package/build/esm/integrations/graphql/utils.js.map +1 -0
- package/build/esm/integrations/hapi/hapi-error-handler.js +44 -0
- package/build/esm/integrations/hapi/hapi-error-handler.js.map +1 -0
- package/build/esm/integrations/hapi/hapi-types.js.map +1 -0
- package/build/esm/integrations/hapi/hapi-utils.js +190 -0
- package/build/esm/integrations/hapi/hapi-utils.js.map +1 -0
- package/build/esm/integrations/hapi/index.js +71 -0
- package/build/esm/integrations/hapi/index.js.map +1 -0
- package/build/esm/integrations/index.js +61 -0
- package/build/esm/integrations/index.js.map +1 -0
- package/build/esm/integrations/kafkajs/consumer.js.map +1 -0
- package/build/esm/integrations/kafkajs/index.js +68 -0
- package/build/esm/integrations/kafkajs/index.js.map +1 -0
- package/build/esm/integrations/kafkajs/semconv.js.map +1 -0
- package/build/esm/integrations/kafkajs/spans.js +113 -0
- package/build/esm/integrations/kafkajs/spans.js.map +1 -0
- package/build/esm/integrations/knex.js +187 -0
- package/build/esm/integrations/knex.js.map +1 -0
- package/build/esm/integrations/koa/index.js +160 -0
- package/build/esm/integrations/koa/index.js.map +1 -0
- package/build/esm/integrations/koa/koa-error-handler.js +30 -0
- package/build/esm/integrations/koa/koa-error-handler.js.map +1 -0
- package/build/esm/integrations/langchain.js +66 -0
- package/build/esm/integrations/langchain.js.map +1 -0
- package/build/esm/integrations/langgraph.js +85 -0
- package/build/esm/integrations/langgraph.js.map +1 -0
- package/build/esm/integrations/lru-memoizer.js +27 -0
- package/build/esm/integrations/lru-memoizer.js.map +1 -0
- package/build/esm/integrations/mongodb/index.js +102 -0
- package/build/esm/integrations/mongodb/index.js.map +1 -0
- package/build/esm/integrations/mongodb/mongodb-span.js +122 -0
- package/build/esm/integrations/mongodb/mongodb-span.js.map +1 -0
- package/build/esm/integrations/mongoose/index.js +107 -0
- package/build/esm/integrations/mongoose/index.js.map +1 -0
- package/build/esm/integrations/mongoose/mongoose-dc-subscriber.js +89 -0
- package/build/esm/integrations/mongoose/mongoose-dc-subscriber.js.map +1 -0
- package/build/esm/integrations/mongoose/mongoose-legacy-span.js +32 -0
- package/build/esm/integrations/mongoose/mongoose-legacy-span.js.map +1 -0
- package/build/esm/integrations/mysql.js +103 -0
- package/build/esm/integrations/mysql.js.map +1 -0
- package/build/esm/integrations/mysql2/index.js +87 -0
- package/build/esm/integrations/mysql2/index.js.map +1 -0
- package/build/esm/integrations/mysql2/mysql2-dc-subscriber.js +66 -0
- package/build/esm/integrations/mysql2/mysql2-dc-subscriber.js.map +1 -0
- package/build/esm/integrations/openai.js +80 -0
- package/build/esm/integrations/openai.js.map +1 -0
- package/build/esm/integrations/postgres-js.js +195 -0
- package/build/esm/integrations/postgres-js.js.map +1 -0
- package/build/esm/integrations/postgres.js +168 -0
- package/build/esm/integrations/postgres.js.map +1 -0
- package/build/esm/integrations/prisma/global.js.map +1 -0
- package/build/esm/integrations/prisma/index.js.map +1 -0
- package/build/esm/integrations/prisma/tracing-helper.js +220 -0
- package/build/esm/integrations/prisma/tracing-helper.js.map +1 -0
- package/build/esm/integrations/redis/index.js +213 -0
- package/build/esm/integrations/redis/index.js.map +1 -0
- package/build/esm/integrations/redis/ioredis-channel-subscriber.js +84 -0
- package/build/esm/integrations/redis/ioredis-channel-subscriber.js.map +1 -0
- package/build/esm/integrations/redis/redis-cache.js +119 -0
- package/build/esm/integrations/redis/redis-cache.js.map +1 -0
- package/build/esm/integrations/redis/redis-dc-subscriber.js +90 -0
- package/build/esm/integrations/redis/redis-dc-subscriber.js.map +1 -0
- package/build/esm/integrations/redis/redis-statement-serializer.js.map +1 -0
- package/build/esm/integrations/tedious.js +143 -0
- package/build/esm/integrations/tedious.js.map +1 -0
- package/build/esm/integrations/vercel-ai/index.js +30 -0
- package/build/esm/integrations/vercel-ai/index.js.map +1 -0
- package/build/esm/integrations/vercel-ai/util.js.map +1 -0
- package/build/esm/integrations/vercel-ai/vercel-ai-dc-subscriber.js +426 -0
- package/build/esm/integrations/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -0
- package/build/esm/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.js +397 -0
- package/build/esm/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.js.map +1 -0
- package/build/esm/orchestrion/bundler/esbuild.js +2 -2
- package/build/esm/orchestrion/bundler/esbuild.js.map +1 -1
- package/build/esm/orchestrion/bundler/moduleInjectedTransform.js +19 -7
- package/build/esm/orchestrion/bundler/moduleInjectedTransform.js.map +1 -1
- package/build/esm/orchestrion/bundler/options.js.map +1 -1
- package/build/esm/orchestrion/bundler/resolve.js +3 -1
- package/build/esm/orchestrion/bundler/resolve.js.map +1 -1
- package/build/esm/orchestrion/bundler/rollup.js +25 -9
- package/build/esm/orchestrion/bundler/rollup.js.map +1 -1
- package/build/esm/orchestrion/bundler/vite.js +8 -8
- package/build/esm/orchestrion/bundler/vite.js.map +1 -1
- package/build/esm/orchestrion/bundler/webpack-loader.js.map +1 -1
- package/build/esm/orchestrion/bundler/webpack.js +6 -7
- package/build/esm/orchestrion/bundler/webpack.js.map +1 -1
- package/build/esm/orchestrion/config/amqplib.js.map +1 -1
- package/build/esm/orchestrion/config/anthropic-ai.js.map +1 -1
- package/build/esm/orchestrion/config/channel-integration-definitions.js +23 -6
- package/build/esm/orchestrion/config/channel-integration-definitions.js.map +1 -1
- package/build/esm/orchestrion/config/dataloader.js.map +1 -1
- package/build/esm/orchestrion/config/express.js.map +1 -1
- package/build/esm/orchestrion/config/firebase.js.map +1 -1
- package/build/esm/orchestrion/config/generic-pool.js.map +1 -1
- package/build/esm/orchestrion/config/google-genai.js.map +1 -1
- package/build/esm/orchestrion/config/graphql.js +9 -9
- package/build/esm/orchestrion/config/graphql.js.map +1 -1
- package/build/esm/orchestrion/config/hapi.js +19 -1
- package/build/esm/orchestrion/config/hapi.js.map +1 -1
- package/build/esm/orchestrion/config/index.js +2 -0
- package/build/esm/orchestrion/config/index.js.map +1 -1
- package/build/esm/orchestrion/config/ioredis.js +2 -0
- package/build/esm/orchestrion/config/ioredis.js.map +1 -1
- package/build/esm/orchestrion/config/kafkajs.js.map +1 -1
- package/build/esm/orchestrion/config/knex.js.map +1 -1
- package/build/esm/orchestrion/config/koa.js +13 -1
- package/build/esm/orchestrion/config/koa.js.map +1 -1
- package/build/esm/orchestrion/config/langchain.js.map +1 -1
- package/build/esm/orchestrion/config/langgraph.js.map +1 -1
- package/build/esm/orchestrion/config/lru-memoizer.js.map +1 -1
- package/build/esm/orchestrion/config/mongodb.js.map +1 -1
- package/build/esm/orchestrion/config/mongoose.js +2 -0
- package/build/esm/orchestrion/config/mongoose.js.map +1 -1
- package/build/esm/orchestrion/config/mysql.js.map +1 -1
- package/build/esm/orchestrion/config/mysql2.js +2 -0
- package/build/esm/orchestrion/config/mysql2.js.map +1 -1
- package/build/esm/orchestrion/config/nestjs.js +4 -4
- package/build/esm/orchestrion/config/nestjs.js.map +1 -1
- package/build/esm/orchestrion/config/openai.js +4 -4
- package/build/esm/orchestrion/config/openai.js.map +1 -1
- package/build/esm/orchestrion/config/pg.js.map +1 -1
- package/build/esm/orchestrion/config/postgres.js.map +1 -1
- package/build/esm/orchestrion/config/redis.js +2 -0
- package/build/esm/orchestrion/config/redis.js.map +1 -1
- package/build/esm/orchestrion/config/registration-only.js +12 -0
- package/build/esm/orchestrion/config/registration-only.js.map +1 -0
- package/build/esm/orchestrion/config/remix.js.map +1 -1
- package/build/esm/orchestrion/config/tedious.js.map +1 -1
- package/build/esm/orchestrion/config/vercel-ai.js +4 -0
- package/build/esm/orchestrion/config/vercel-ai.js.map +1 -1
- package/build/esm/orchestrion/detect.js +5 -7
- package/build/esm/orchestrion/detect.js.map +1 -1
- package/build/esm/orchestrion/instrumentation.js +8 -8
- package/build/esm/orchestrion/instrumentation.js.map +1 -1
- package/build/esm/orchestrion/runtime/register.js +1 -1
- package/build/esm/orchestrion/runtime/register.js.map +1 -1
- 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/moduleInjected.js +16 -0
- package/build/esm/utils/moduleInjected.js.map +1 -0
- package/build/esm/utils/setHttpServerSpanRouteAttribute.js +3 -3
- package/build/esm/utils/setHttpServerSpanRouteAttribute.js.map +1 -1
- package/build/types/ai/anthropic-ai/index.d.ts.map +1 -1
- package/build/types/ai/anthropic-ai/streaming.d.ts.map +1 -1
- package/build/types/ai/anthropic-ai/utils.d.ts.map +1 -1
- package/build/types/ai/core/utils.d.ts +1 -1
- package/build/types/ai/core/utils.d.ts.map +1 -1
- package/build/types/ai/google-genai/index.d.ts.map +1 -1
- package/build/types/ai/index.d.ts +0 -1
- package/build/types/ai/index.d.ts.map +1 -1
- package/build/types/ai/langchain/embeddings.d.ts.map +1 -1
- package/build/types/ai/langchain/index.d.ts.map +1 -1
- package/build/types/ai/langgraph/index.d.ts.map +1 -1
- package/build/types/ai/langgraph/utils.d.ts.map +1 -1
- package/build/types/ai/openai/index.d.ts.map +1 -1
- package/build/types/ai/vercel-ai/index.d.ts +2 -17
- package/build/types/ai/vercel-ai/index.d.ts.map +1 -1
- package/build/types/ai/vercel-ai/vercel-ai-attributes.d.ts +1 -207
- 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/index.d.ts +41 -16
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/amqplib.d.ts +11 -0
- package/build/types/integrations/amqplib.d.ts.map +1 -0
- package/build/types/integrations/anthropic.d.ts +9 -0
- package/build/types/integrations/anthropic.d.ts.map +1 -0
- package/build/types/integrations/aws-sdk/aws-sdk.types.d.ts.map +1 -0
- package/build/types/integrations/aws-sdk/constants.d.ts +16 -0
- package/build/types/integrations/aws-sdk/constants.d.ts.map +1 -0
- package/build/types/integrations/aws-sdk/index.d.ts +12 -0
- package/build/types/integrations/aws-sdk/index.d.ts.map +1 -0
- package/build/types/integrations/aws-sdk/services/MessageAttributes.d.ts.map +1 -0
- package/build/types/integrations/aws-sdk/services/ServiceExtension.d.ts.map +1 -0
- package/build/types/integrations/aws-sdk/services/ServicesExtensions.d.ts.map +1 -0
- package/build/types/integrations/aws-sdk/services/bedrock-runtime.d.ts.map +1 -0
- package/build/types/integrations/aws-sdk/services/dynamodb.d.ts.map +1 -0
- package/build/types/integrations/aws-sdk/services/index.d.ts.map +1 -0
- package/build/types/integrations/aws-sdk/services/kinesis.d.ts.map +1 -0
- package/build/types/integrations/aws-sdk/services/lambda.d.ts.map +1 -0
- package/build/types/integrations/aws-sdk/services/s3.d.ts.map +1 -0
- package/build/types/integrations/aws-sdk/services/secretsmanager.d.ts.map +1 -0
- package/build/types/integrations/aws-sdk/services/sns.d.ts.map +1 -0
- package/build/types/integrations/aws-sdk/services/sqs.d.ts.map +1 -0
- package/build/types/integrations/aws-sdk/services/stepfunctions.d.ts.map +1 -0
- package/build/types/integrations/aws-sdk/types.d.ts.map +1 -0
- package/build/types/integrations/aws-sdk/utils.d.ts.map +1 -0
- package/build/types/integrations/dataloader.d.ts +11 -0
- package/build/types/integrations/dataloader.d.ts.map +1 -0
- package/build/types/integrations/express/error-handled.d.ts +10 -0
- package/build/types/integrations/express/error-handled.d.ts.map +1 -0
- package/build/types/integrations/express/error-handler.d.ts +26 -0
- package/build/types/integrations/express/error-handler.d.ts.map +1 -0
- package/build/types/integrations/express/index.d.ts +17 -0
- package/build/types/integrations/express/index.d.ts.map +1 -0
- package/build/types/integrations/express/instrumentation.d.ts +23 -0
- package/build/types/integrations/express/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/express/route.d.ts.map +1 -0
- package/build/types/integrations/express/types.d.ts +112 -0
- package/build/types/integrations/express/types.d.ts.map +1 -0
- package/build/types/integrations/express/utils.d.ts +8 -0
- package/build/types/integrations/express/utils.d.ts.map +1 -0
- package/build/types/integrations/fastify/errors.d.ts +17 -0
- package/build/types/integrations/fastify/errors.d.ts.map +1 -0
- package/build/types/integrations/fastify/index.d.ts +57 -0
- package/build/types/integrations/fastify/index.d.ts.map +1 -0
- package/build/types/integrations/fastify/instrumentation.d.ts +6 -0
- package/build/types/integrations/fastify/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/fastify/types.d.ts +31 -0
- package/build/types/integrations/fastify/types.d.ts.map +1 -0
- package/build/types/integrations/fastify/utils.d.ts.map +1 -0
- package/build/types/integrations/firebase/firestore-types.d.ts.map +1 -0
- package/build/types/integrations/firebase/firestore.d.ts.map +1 -0
- package/build/types/integrations/firebase/functions.d.ts.map +1 -0
- package/build/types/integrations/firebase/index.d.ts +12 -0
- package/build/types/integrations/firebase/index.d.ts.map +1 -0
- package/build/types/integrations/firebase/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/generic-pool.d.ts +10 -0
- package/build/types/integrations/generic-pool.d.ts.map +1 -0
- package/build/types/integrations/google-genai.d.ts +11 -0
- package/build/types/integrations/google-genai.d.ts.map +1 -0
- package/build/types/integrations/graphql/constants.d.ts +18 -0
- package/build/types/integrations/graphql/constants.d.ts.map +1 -0
- package/build/types/integrations/graphql/graphql-dc-subscriber.d.ts +98 -0
- package/build/types/integrations/graphql/graphql-dc-subscriber.d.ts.map +1 -0
- package/build/types/integrations/graphql/graphql-types.d.ts.map +1 -0
- package/build/types/integrations/graphql/index.d.ts +9 -0
- package/build/types/integrations/graphql/index.d.ts.map +1 -0
- package/build/types/integrations/graphql/resolvers.d.ts.map +1 -0
- package/build/types/integrations/graphql/spans.d.ts.map +1 -0
- package/build/types/integrations/graphql/types.d.ts +41 -0
- package/build/types/integrations/graphql/types.d.ts.map +1 -0
- package/build/types/integrations/graphql/utils.d.ts +19 -0
- package/build/types/integrations/graphql/utils.d.ts.map +1 -0
- package/build/types/integrations/hapi/hapi-error-handler.d.ts +21 -0
- package/build/types/integrations/hapi/hapi-error-handler.d.ts.map +1 -0
- package/build/types/integrations/hapi/hapi-types.d.ts +99 -0
- package/build/types/integrations/hapi/hapi-types.d.ts.map +1 -0
- package/build/types/integrations/hapi/hapi-utils.d.ts +34 -0
- package/build/types/integrations/hapi/hapi-utils.d.ts.map +1 -0
- package/build/types/integrations/hapi/index.d.ts +35 -0
- package/build/types/integrations/hapi/index.d.ts.map +1 -0
- package/build/types/integrations/index.d.ts +6 -0
- package/build/types/integrations/index.d.ts.map +1 -0
- package/build/types/integrations/kafkajs/consumer.d.ts.map +1 -0
- package/build/types/integrations/kafkajs/index.d.ts +16 -0
- package/build/types/integrations/kafkajs/index.d.ts.map +1 -0
- package/build/types/integrations/kafkajs/semconv.d.ts.map +1 -0
- package/build/types/integrations/kafkajs/spans.d.ts.map +1 -0
- package/build/types/integrations/kafkajs/types.d.ts.map +1 -0
- package/build/types/integrations/knex.d.ts +11 -0
- package/build/types/integrations/knex.d.ts.map +1 -0
- package/build/types/integrations/koa/index.d.ts +14 -0
- package/build/types/integrations/koa/index.d.ts.map +1 -0
- package/build/types/integrations/koa/koa-error-handler.d.ts +33 -0
- package/build/types/integrations/koa/koa-error-handler.d.ts.map +1 -0
- package/build/types/integrations/langchain.d.ts +9 -0
- package/build/types/integrations/langchain.d.ts.map +1 -0
- package/build/types/integrations/langgraph.d.ts +9 -0
- package/build/types/integrations/langgraph.d.ts.map +1 -0
- package/build/types/integrations/lru-memoizer.d.ts +10 -0
- package/build/types/integrations/lru-memoizer.d.ts.map +1 -0
- package/build/types/integrations/mongodb/index.d.ts +12 -0
- package/build/types/integrations/mongodb/index.d.ts.map +1 -0
- package/build/types/integrations/mongodb/mongodb-span.d.ts +65 -0
- package/build/types/integrations/mongodb/mongodb-span.d.ts.map +1 -0
- package/build/types/integrations/mongoose/index.d.ts +15 -0
- package/build/types/integrations/mongoose/index.d.ts.map +1 -0
- package/build/types/integrations/mongoose/mongoose-dc-subscriber.d.ts.map +1 -0
- package/build/types/integrations/mongoose/mongoose-legacy-span.d.ts +29 -0
- package/build/types/integrations/mongoose/mongoose-legacy-span.d.ts.map +1 -0
- package/build/types/integrations/mysql.d.ts +12 -0
- package/build/types/integrations/mysql.d.ts.map +1 -0
- package/build/types/integrations/mysql2/index.d.ts +17 -0
- package/build/types/integrations/mysql2/index.d.ts.map +1 -0
- package/build/types/integrations/mysql2/mysql2-dc-subscriber.d.ts.map +1 -0
- package/build/types/integrations/openai.d.ts +9 -0
- package/build/types/integrations/openai.d.ts.map +1 -0
- package/build/types/integrations/postgres-js.d.ts +26 -0
- package/build/types/integrations/postgres-js.d.ts.map +1 -0
- package/build/types/integrations/postgres.d.ts +15 -0
- package/build/types/integrations/postgres.d.ts.map +1 -0
- package/build/types/integrations/prisma/global.d.ts.map +1 -0
- package/build/types/integrations/prisma/index.d.ts.map +1 -0
- package/build/types/integrations/prisma/tracing-helper.d.ts.map +1 -0
- package/build/types/integrations/prisma/types.d.ts.map +1 -0
- package/build/types/integrations/redis/index.d.ts +25 -0
- package/build/types/integrations/redis/index.d.ts.map +1 -0
- package/build/types/integrations/redis/ioredis-channel-subscriber.d.ts +30 -0
- package/build/types/integrations/redis/ioredis-channel-subscriber.d.ts.map +1 -0
- package/build/types/integrations/redis/redis-cache.d.ts +44 -0
- package/build/types/integrations/redis/redis-cache.d.ts.map +1 -0
- package/build/types/integrations/redis/redis-dc-subscriber.d.ts +81 -0
- package/build/types/integrations/redis/redis-dc-subscriber.d.ts.map +1 -0
- package/build/types/integrations/redis/redis-statement-serializer.d.ts.map +1 -0
- package/build/types/integrations/tedious.d.ts +11 -0
- package/build/types/integrations/tedious.d.ts.map +1 -0
- package/build/types/integrations/vercel-ai/index.d.ts +12 -0
- package/build/types/integrations/vercel-ai/index.d.ts.map +1 -0
- package/build/types/integrations/vercel-ai/util.d.ts.map +1 -0
- package/build/types/integrations/vercel-ai/vercel-ai-dc-subscriber.d.ts +69 -0
- package/build/types/integrations/vercel-ai/vercel-ai-dc-subscriber.d.ts.map +1 -0
- package/build/types/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.d.ts.map +1 -0
- package/build/types/orchestrion/bundler/esbuild.d.ts +1 -0
- package/build/types/orchestrion/bundler/esbuild.d.ts.map +1 -1
- package/build/types/orchestrion/bundler/moduleInjectedTransform.d.ts +8 -4
- package/build/types/orchestrion/bundler/moduleInjectedTransform.d.ts.map +1 -1
- package/build/types/orchestrion/bundler/options.d.ts +1 -2
- package/build/types/orchestrion/bundler/options.d.ts.map +1 -1
- package/build/types/orchestrion/bundler/resolve.d.ts +11 -0
- package/build/types/orchestrion/bundler/resolve.d.ts.map +1 -1
- package/build/types/orchestrion/bundler/rollup.d.ts +1 -0
- package/build/types/orchestrion/bundler/rollup.d.ts.map +1 -1
- package/build/types/orchestrion/bundler/vite.d.ts +1 -0
- package/build/types/orchestrion/bundler/vite.d.ts.map +1 -1
- package/build/types/orchestrion/bundler/webpack-loader.d.ts +7 -7
- package/build/types/orchestrion/bundler/webpack.d.ts +1 -1
- package/build/types/orchestrion/bundler/webpack.d.ts.map +1 -1
- package/build/types/orchestrion/channels.d.ts +3 -0
- package/build/types/orchestrion/channels.d.ts.map +1 -1
- package/build/types/orchestrion/config/amqplib.d.ts.map +1 -1
- package/build/types/orchestrion/config/anthropic-ai.d.ts.map +1 -1
- package/build/types/orchestrion/config/channel-integration-definitions.d.ts +40 -22
- package/build/types/orchestrion/config/channel-integration-definitions.d.ts.map +1 -1
- package/build/types/orchestrion/config/express.d.ts.map +1 -1
- package/build/types/orchestrion/config/firebase.d.ts.map +1 -1
- package/build/types/orchestrion/config/generic-pool.d.ts.map +1 -1
- package/build/types/orchestrion/config/google-genai.d.ts.map +1 -1
- package/build/types/orchestrion/config/graphql.d.ts +2 -2
- package/build/types/orchestrion/config/graphql.d.ts.map +1 -1
- package/build/types/orchestrion/config/hapi.d.ts +2 -0
- package/build/types/orchestrion/config/hapi.d.ts.map +1 -1
- package/build/types/orchestrion/config/index.d.ts +3 -1
- package/build/types/orchestrion/config/index.d.ts.map +1 -1
- package/build/types/orchestrion/config/ioredis.d.ts +1 -1
- package/build/types/orchestrion/config/ioredis.d.ts.map +1 -1
- package/build/types/orchestrion/config/kafkajs.d.ts.map +1 -1
- package/build/types/orchestrion/config/knex.d.ts +1 -1
- package/build/types/orchestrion/config/knex.d.ts.map +1 -1
- package/build/types/orchestrion/config/koa.d.ts +1 -0
- package/build/types/orchestrion/config/koa.d.ts.map +1 -1
- package/build/types/orchestrion/config/langchain.d.ts.map +1 -1
- package/build/types/orchestrion/config/langgraph.d.ts.map +1 -1
- package/build/types/orchestrion/config/lru-memoizer.d.ts.map +1 -1
- package/build/types/orchestrion/config/mongodb.d.ts.map +1 -1
- package/build/types/orchestrion/config/mongoose.d.ts +2 -23
- package/build/types/orchestrion/config/mongoose.d.ts.map +1 -1
- package/build/types/orchestrion/config/mysql.d.ts.map +1 -1
- package/build/types/orchestrion/config/mysql2.d.ts +2 -13
- package/build/types/orchestrion/config/mysql2.d.ts.map +1 -1
- package/build/types/orchestrion/config/nestjs.d.ts +1 -1
- package/build/types/orchestrion/config/nestjs.d.ts.map +1 -1
- package/build/types/orchestrion/config/openai.d.ts.map +1 -1
- package/build/types/orchestrion/config/pg.d.ts +1 -1
- package/build/types/orchestrion/config/pg.d.ts.map +1 -1
- package/build/types/orchestrion/config/postgres.d.ts +1 -1
- package/build/types/orchestrion/config/postgres.d.ts.map +1 -1
- package/build/types/orchestrion/config/redis.d.ts +2 -27
- package/build/types/orchestrion/config/redis.d.ts.map +1 -1
- package/build/types/orchestrion/config/registration-only.d.ts +22 -0
- package/build/types/orchestrion/config/registration-only.d.ts.map +1 -0
- package/build/types/orchestrion/config/remix.d.ts +1 -1
- package/build/types/orchestrion/config/remix.d.ts.map +1 -1
- package/build/types/orchestrion/config/tedious.d.ts +1 -1
- package/build/types/orchestrion/config/tedious.d.ts.map +1 -1
- package/build/types/orchestrion/config/vercel-ai.d.ts +1 -1
- package/build/types/orchestrion/config/vercel-ai.d.ts.map +1 -1
- package/build/types/orchestrion/detect.d.ts +5 -15
- package/build/types/orchestrion/detect.d.ts.map +1 -1
- package/build/types/utils/moduleInjected.d.ts +30 -0
- package/build/types/utils/moduleInjected.d.ts.map +1 -0
- package/build/types/utils/setHttpServerSpanRouteAttribute.d.ts.map +1 -1
- package/package.json +4 -11
- package/build/cjs/ai/vercel-ai/constants.js +0 -21
- package/build/cjs/ai/vercel-ai/constants.js.map +0 -1
- package/build/cjs/ai/vercel-ai/utils.js +0 -171
- package/build/cjs/ai/vercel-ai/utils.js.map +0 -1
- package/build/cjs/ai/vercel-ai/vercel-ai-attributes.js +0 -50
- package/build/cjs/ai/vercel-ai/vercel-ai-attributes.js.map +0 -1
- package/build/cjs/graphql/graphql-dc-subscriber.js +0 -123
- package/build/cjs/graphql/graphql-dc-subscriber.js.map +0 -1
- package/build/cjs/graphql/index.js +0 -36
- package/build/cjs/graphql/index.js.map +0 -1
- package/build/cjs/graphql/utils.js +0 -94
- package/build/cjs/graphql/utils.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/amqplib.js +0 -431
- package/build/cjs/integrations/tracing-channel/amqplib.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/anthropic.js +0 -111
- package/build/cjs/integrations/tracing-channel/anthropic.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/constants.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/index.js +0 -154
- package/build/cjs/integrations/tracing-channel/aws-sdk/index.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/MessageAttributes.js +0 -46
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/MessageAttributes.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/ServicesExtensions.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/bedrock-runtime.js +0 -423
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/bedrock-runtime.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/dynamodb.js +0 -129
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/dynamodb.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/kinesis.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/lambda.js +0 -63
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/lambda.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/s3.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/secretsmanager.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/sns.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/sqs.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/services/stepfunctions.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/aws-sdk/utils.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/dataloader.js +0 -126
- package/build/cjs/integrations/tracing-channel/dataloader.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/express/index.js +0 -37
- package/build/cjs/integrations/tracing-channel/express/index.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/express/instrumentation.js +0 -163
- package/build/cjs/integrations/tracing-channel/express/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/express/route.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/fastify/errors.js +0 -55
- package/build/cjs/integrations/tracing-channel/fastify/errors.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/fastify/index.js +0 -32
- package/build/cjs/integrations/tracing-channel/fastify/index.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/fastify/instrumentation.js +0 -294
- package/build/cjs/integrations/tracing-channel/fastify/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/fastify/utils.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/firebase/firestore.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/firebase/functions.js +0 -69
- package/build/cjs/integrations/tracing-channel/firebase/functions.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/firebase/index.js +0 -20
- package/build/cjs/integrations/tracing-channel/firebase/index.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/firebase/instrumentation.js +0 -69
- package/build/cjs/integrations/tracing-channel/firebase/instrumentation.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/generic-pool.js +0 -49
- package/build/cjs/integrations/tracing-channel/generic-pool.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/google-genai.js +0 -110
- package/build/cjs/integrations/tracing-channel/google-genai.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/graphql/constants.js +0 -26
- package/build/cjs/integrations/tracing-channel/graphql/constants.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/graphql/index.js +0 -70
- package/build/cjs/integrations/tracing-channel/graphql/index.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/graphql/resolvers.js +0 -168
- package/build/cjs/integrations/tracing-channel/graphql/resolvers.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/graphql/spans.js +0 -102
- package/build/cjs/integrations/tracing-channel/graphql/spans.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/hapi-types.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/hapi-utils.js +0 -169
- package/build/cjs/integrations/tracing-channel/hapi-utils.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/hapi.js +0 -67
- package/build/cjs/integrations/tracing-channel/hapi.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/ioredis.js +0 -110
- package/build/cjs/integrations/tracing-channel/ioredis.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/kafkajs/consumer.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/kafkajs/index.js +0 -83
- package/build/cjs/integrations/tracing-channel/kafkajs/index.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/kafkajs/semconv.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/kafkajs/spans.js +0 -120
- package/build/cjs/integrations/tracing-channel/kafkajs/spans.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/knex.js +0 -202
- package/build/cjs/integrations/tracing-channel/knex.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/koa.js +0 -149
- package/build/cjs/integrations/tracing-channel/koa.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/langchain.js +0 -82
- package/build/cjs/integrations/tracing-channel/langchain.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/langgraph.js +0 -100
- package/build/cjs/integrations/tracing-channel/langgraph.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/lru-memoizer.js +0 -42
- package/build/cjs/integrations/tracing-channel/lru-memoizer.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/mongodb.js +0 -117
- package/build/cjs/integrations/tracing-channel/mongodb.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/mongoose.js +0 -122
- package/build/cjs/integrations/tracing-channel/mongoose.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/mysql.js +0 -119
- package/build/cjs/integrations/tracing-channel/mysql.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/mysql2.js +0 -100
- package/build/cjs/integrations/tracing-channel/mysql2.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/openai.js +0 -93
- package/build/cjs/integrations/tracing-channel/openai.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/postgres-js.js +0 -203
- package/build/cjs/integrations/tracing-channel/postgres-js.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/postgres.js +0 -186
- package/build/cjs/integrations/tracing-channel/postgres.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/redis.js +0 -239
- package/build/cjs/integrations/tracing-channel/redis.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/tedious.js +0 -158
- package/build/cjs/integrations/tracing-channel/tedious.js.map +0 -1
- package/build/cjs/integrations/tracing-channel/vercel-ai.js +0 -38
- package/build/cjs/integrations/tracing-channel/vercel-ai.js.map +0 -1
- package/build/cjs/mongodb/mongodb-span.js +0 -130
- package/build/cjs/mongodb/mongodb-span.js.map +0 -1
- package/build/cjs/mongoose/index.js +0 -36
- package/build/cjs/mongoose/index.js.map +0 -1
- package/build/cjs/mongoose/mongoose-dc-subscriber.js +0 -97
- package/build/cjs/mongoose/mongoose-dc-subscriber.js.map +0 -1
- package/build/cjs/mongoose/mongoose-legacy-span.js +0 -41
- package/build/cjs/mongoose/mongoose-legacy-span.js.map +0 -1
- package/build/cjs/mysql2/index.js +0 -36
- package/build/cjs/mysql2/index.js.map +0 -1
- package/build/cjs/mysql2/mysql2-dc-subscriber.js +0 -68
- package/build/cjs/mysql2/mysql2-dc-subscriber.js.map +0 -1
- package/build/cjs/orchestrion/index.js +0 -95
- package/build/cjs/orchestrion/index.js.map +0 -1
- package/build/cjs/orchestrion/moduleInjected.js +0 -21
- package/build/cjs/orchestrion/moduleInjected.js.map +0 -1
- package/build/cjs/prisma/global.js.map +0 -1
- package/build/cjs/prisma/index.js.map +0 -1
- package/build/cjs/prisma/tracing-helper.js +0 -222
- package/build/cjs/prisma/tracing-helper.js.map +0 -1
- package/build/cjs/redis/index.js +0 -36
- package/build/cjs/redis/index.js.map +0 -1
- package/build/cjs/redis/redis-dc-subscriber.js +0 -103
- package/build/cjs/redis/redis-dc-subscriber.js.map +0 -1
- package/build/cjs/redis/redis-statement-serializer.js.map +0 -1
- package/build/cjs/vercel-ai/index.js +0 -36
- package/build/cjs/vercel-ai/index.js.map +0 -1
- package/build/cjs/vercel-ai/util.js.map +0 -1
- package/build/cjs/vercel-ai/vercel-ai-dc-subscriber.js +0 -434
- package/build/cjs/vercel-ai/vercel-ai-dc-subscriber.js.map +0 -1
- package/build/cjs/vercel-ai/vercel-ai-orchestrion-subscriber.js +0 -399
- package/build/cjs/vercel-ai/vercel-ai-orchestrion-subscriber.js.map +0 -1
- package/build/esm/ai/vercel-ai/constants.js +0 -18
- package/build/esm/ai/vercel-ai/constants.js.map +0 -1
- package/build/esm/ai/vercel-ai/utils.js +0 -164
- package/build/esm/ai/vercel-ai/utils.js.map +0 -1
- package/build/esm/ai/vercel-ai/vercel-ai-attributes.js +0 -26
- package/build/esm/ai/vercel-ai/vercel-ai-attributes.js.map +0 -1
- package/build/esm/graphql/graphql-dc-subscriber.js +0 -116
- package/build/esm/graphql/graphql-dc-subscriber.js.map +0 -1
- package/build/esm/graphql/index.js +0 -21
- package/build/esm/graphql/index.js.map +0 -1
- package/build/esm/graphql/utils.js +0 -89
- package/build/esm/graphql/utils.js.map +0 -1
- package/build/esm/integrations/tracing-channel/amqplib.js +0 -416
- package/build/esm/integrations/tracing-channel/amqplib.js.map +0 -1
- package/build/esm/integrations/tracing-channel/anthropic.js +0 -96
- package/build/esm/integrations/tracing-channel/anthropic.js.map +0 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/constants.js.map +0 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/index.js +0 -139
- package/build/esm/integrations/tracing-channel/aws-sdk/index.js.map +0 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/MessageAttributes.js +0 -41
- package/build/esm/integrations/tracing-channel/aws-sdk/services/MessageAttributes.js.map +0 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/ServicesExtensions.js.map +0 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/bedrock-runtime.js +0 -421
- package/build/esm/integrations/tracing-channel/aws-sdk/services/bedrock-runtime.js.map +0 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/dynamodb.js +0 -127
- package/build/esm/integrations/tracing-channel/aws-sdk/services/dynamodb.js.map +0 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/kinesis.js.map +0 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/lambda.js +0 -61
- package/build/esm/integrations/tracing-channel/aws-sdk/services/lambda.js.map +0 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/s3.js.map +0 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/secretsmanager.js.map +0 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/sns.js.map +0 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/sqs.js.map +0 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/services/stepfunctions.js.map +0 -1
- package/build/esm/integrations/tracing-channel/aws-sdk/utils.js.map +0 -1
- package/build/esm/integrations/tracing-channel/dataloader.js +0 -111
- package/build/esm/integrations/tracing-channel/dataloader.js.map +0 -1
- package/build/esm/integrations/tracing-channel/express/index.js +0 -22
- package/build/esm/integrations/tracing-channel/express/index.js.map +0 -1
- package/build/esm/integrations/tracing-channel/express/instrumentation.js +0 -161
- package/build/esm/integrations/tracing-channel/express/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing-channel/express/route.js.map +0 -1
- package/build/esm/integrations/tracing-channel/fastify/errors.js +0 -39
- package/build/esm/integrations/tracing-channel/fastify/errors.js.map +0 -1
- package/build/esm/integrations/tracing-channel/fastify/index.js +0 -28
- package/build/esm/integrations/tracing-channel/fastify/index.js.map +0 -1
- package/build/esm/integrations/tracing-channel/fastify/instrumentation.js +0 -279
- package/build/esm/integrations/tracing-channel/fastify/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing-channel/fastify/utils.js.map +0 -1
- package/build/esm/integrations/tracing-channel/firebase/firestore.js.map +0 -1
- package/build/esm/integrations/tracing-channel/firebase/functions.js +0 -67
- package/build/esm/integrations/tracing-channel/firebase/functions.js.map +0 -1
- package/build/esm/integrations/tracing-channel/firebase/index.js +0 -18
- package/build/esm/integrations/tracing-channel/firebase/index.js.map +0 -1
- package/build/esm/integrations/tracing-channel/firebase/instrumentation.js +0 -54
- package/build/esm/integrations/tracing-channel/firebase/instrumentation.js.map +0 -1
- package/build/esm/integrations/tracing-channel/generic-pool.js +0 -34
- package/build/esm/integrations/tracing-channel/generic-pool.js.map +0 -1
- package/build/esm/integrations/tracing-channel/google-genai.js +0 -95
- package/build/esm/integrations/tracing-channel/google-genai.js.map +0 -1
- package/build/esm/integrations/tracing-channel/graphql/constants.js +0 -14
- package/build/esm/integrations/tracing-channel/graphql/constants.js.map +0 -1
- package/build/esm/integrations/tracing-channel/graphql/index.js +0 -54
- package/build/esm/integrations/tracing-channel/graphql/index.js.map +0 -1
- package/build/esm/integrations/tracing-channel/graphql/resolvers.js +0 -164
- package/build/esm/integrations/tracing-channel/graphql/resolvers.js.map +0 -1
- package/build/esm/integrations/tracing-channel/graphql/spans.js +0 -96
- package/build/esm/integrations/tracing-channel/graphql/spans.js.map +0 -1
- package/build/esm/integrations/tracing-channel/hapi-types.js.map +0 -1
- package/build/esm/integrations/tracing-channel/hapi-utils.js +0 -164
- package/build/esm/integrations/tracing-channel/hapi-utils.js.map +0 -1
- package/build/esm/integrations/tracing-channel/hapi.js +0 -52
- package/build/esm/integrations/tracing-channel/hapi.js.map +0 -1
- package/build/esm/integrations/tracing-channel/ioredis.js +0 -94
- package/build/esm/integrations/tracing-channel/ioredis.js.map +0 -1
- package/build/esm/integrations/tracing-channel/kafkajs/consumer.js.map +0 -1
- package/build/esm/integrations/tracing-channel/kafkajs/index.js +0 -68
- package/build/esm/integrations/tracing-channel/kafkajs/index.js.map +0 -1
- package/build/esm/integrations/tracing-channel/kafkajs/semconv.js.map +0 -1
- package/build/esm/integrations/tracing-channel/kafkajs/spans.js +0 -113
- package/build/esm/integrations/tracing-channel/kafkajs/spans.js.map +0 -1
- package/build/esm/integrations/tracing-channel/knex.js +0 -187
- package/build/esm/integrations/tracing-channel/knex.js.map +0 -1
- package/build/esm/integrations/tracing-channel/koa.js +0 -134
- package/build/esm/integrations/tracing-channel/koa.js.map +0 -1
- package/build/esm/integrations/tracing-channel/langchain.js +0 -67
- package/build/esm/integrations/tracing-channel/langchain.js.map +0 -1
- package/build/esm/integrations/tracing-channel/langgraph.js +0 -85
- package/build/esm/integrations/tracing-channel/langgraph.js.map +0 -1
- package/build/esm/integrations/tracing-channel/lru-memoizer.js +0 -27
- package/build/esm/integrations/tracing-channel/lru-memoizer.js.map +0 -1
- package/build/esm/integrations/tracing-channel/mongodb.js +0 -102
- package/build/esm/integrations/tracing-channel/mongodb.js.map +0 -1
- package/build/esm/integrations/tracing-channel/mongoose.js +0 -107
- package/build/esm/integrations/tracing-channel/mongoose.js.map +0 -1
- package/build/esm/integrations/tracing-channel/mysql.js +0 -104
- package/build/esm/integrations/tracing-channel/mysql.js.map +0 -1
- package/build/esm/integrations/tracing-channel/mysql2.js +0 -85
- package/build/esm/integrations/tracing-channel/mysql2.js.map +0 -1
- package/build/esm/integrations/tracing-channel/openai.js +0 -78
- package/build/esm/integrations/tracing-channel/openai.js.map +0 -1
- package/build/esm/integrations/tracing-channel/postgres-js.js +0 -188
- package/build/esm/integrations/tracing-channel/postgres-js.js.map +0 -1
- package/build/esm/integrations/tracing-channel/postgres.js +0 -171
- package/build/esm/integrations/tracing-channel/postgres.js.map +0 -1
- package/build/esm/integrations/tracing-channel/redis.js +0 -224
- package/build/esm/integrations/tracing-channel/redis.js.map +0 -1
- package/build/esm/integrations/tracing-channel/tedious.js +0 -143
- package/build/esm/integrations/tracing-channel/tedious.js.map +0 -1
- package/build/esm/integrations/tracing-channel/vercel-ai.js +0 -23
- package/build/esm/integrations/tracing-channel/vercel-ai.js.map +0 -1
- package/build/esm/mongodb/mongodb-span.js +0 -123
- package/build/esm/mongodb/mongodb-span.js.map +0 -1
- package/build/esm/mongoose/index.js +0 -21
- package/build/esm/mongoose/index.js.map +0 -1
- package/build/esm/mongoose/mongoose-dc-subscriber.js +0 -89
- package/build/esm/mongoose/mongoose-dc-subscriber.js.map +0 -1
- package/build/esm/mongoose/mongoose-legacy-span.js +0 -39
- package/build/esm/mongoose/mongoose-legacy-span.js.map +0 -1
- package/build/esm/mysql2/index.js +0 -21
- package/build/esm/mysql2/index.js.map +0 -1
- package/build/esm/mysql2/mysql2-dc-subscriber.js +0 -62
- package/build/esm/mysql2/mysql2-dc-subscriber.js.map +0 -1
- package/build/esm/orchestrion/index.js +0 -61
- package/build/esm/orchestrion/index.js.map +0 -1
- package/build/esm/orchestrion/moduleInjected.js +0 -19
- package/build/esm/orchestrion/moduleInjected.js.map +0 -1
- package/build/esm/prisma/global.js.map +0 -1
- package/build/esm/prisma/index.js.map +0 -1
- package/build/esm/prisma/tracing-helper.js +0 -220
- package/build/esm/prisma/tracing-helper.js.map +0 -1
- package/build/esm/redis/index.js +0 -21
- package/build/esm/redis/index.js.map +0 -1
- package/build/esm/redis/redis-dc-subscriber.js +0 -96
- package/build/esm/redis/redis-dc-subscriber.js.map +0 -1
- package/build/esm/redis/redis-statement-serializer.js.map +0 -1
- package/build/esm/vercel-ai/index.js +0 -21
- package/build/esm/vercel-ai/index.js.map +0 -1
- package/build/esm/vercel-ai/util.js.map +0 -1
- package/build/esm/vercel-ai/vercel-ai-dc-subscriber.js +0 -426
- package/build/esm/vercel-ai/vercel-ai-dc-subscriber.js.map +0 -1
- package/build/esm/vercel-ai/vercel-ai-orchestrion-subscriber.js +0 -397
- package/build/esm/vercel-ai/vercel-ai-orchestrion-subscriber.js.map +0 -1
- package/build/types/ai/vercel-ai/constants.d.ts +0 -4
- package/build/types/ai/vercel-ai/constants.d.ts.map +0 -1
- package/build/types/ai/vercel-ai/types.d.ts +0 -5
- package/build/types/ai/vercel-ai/types.d.ts.map +0 -1
- package/build/types/ai/vercel-ai/utils.d.ts +0 -39
- package/build/types/ai/vercel-ai/utils.d.ts.map +0 -1
- package/build/types/graphql/graphql-dc-subscriber.d.ts +0 -94
- package/build/types/graphql/graphql-dc-subscriber.d.ts.map +0 -1
- package/build/types/graphql/index.d.ts +0 -12
- package/build/types/graphql/index.d.ts.map +0 -1
- package/build/types/graphql/utils.d.ts +0 -34
- package/build/types/graphql/utils.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/amqplib.d.ts +0 -11
- package/build/types/integrations/tracing-channel/amqplib.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/anthropic.d.ts +0 -9
- package/build/types/integrations/tracing-channel/anthropic.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/aws-sdk/aws-sdk.types.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/aws-sdk/constants.d.ts +0 -16
- package/build/types/integrations/tracing-channel/aws-sdk/constants.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/aws-sdk/index.d.ts +0 -12
- package/build/types/integrations/tracing-channel/aws-sdk/index.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/MessageAttributes.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/ServiceExtension.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/ServicesExtensions.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/bedrock-runtime.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/dynamodb.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/index.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/kinesis.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/lambda.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/s3.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/secretsmanager.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/sns.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/sqs.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/aws-sdk/services/stepfunctions.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/aws-sdk/types.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/aws-sdk/utils.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/dataloader.d.ts +0 -11
- package/build/types/integrations/tracing-channel/dataloader.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/express/index.d.ts +0 -17
- package/build/types/integrations/tracing-channel/express/index.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/express/instrumentation.d.ts +0 -4
- package/build/types/integrations/tracing-channel/express/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/express/route.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/express/types.d.ts +0 -64
- package/build/types/integrations/tracing-channel/express/types.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/fastify/errors.d.ts +0 -12
- package/build/types/integrations/tracing-channel/fastify/errors.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/fastify/index.d.ts +0 -66
- package/build/types/integrations/tracing-channel/fastify/index.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/fastify/instrumentation.d.ts +0 -10
- package/build/types/integrations/tracing-channel/fastify/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/fastify/types.d.ts +0 -32
- package/build/types/integrations/tracing-channel/fastify/types.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/fastify/utils.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/firebase/firestore-types.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/firebase/firestore.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/firebase/functions.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/firebase/index.d.ts +0 -12
- package/build/types/integrations/tracing-channel/firebase/index.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/firebase/instrumentation.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/generic-pool.d.ts +0 -10
- package/build/types/integrations/tracing-channel/generic-pool.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/google-genai.d.ts +0 -11
- package/build/types/integrations/tracing-channel/google-genai.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/graphql/constants.d.ts +0 -12
- package/build/types/integrations/tracing-channel/graphql/constants.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/graphql/graphql-types.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/graphql/index.d.ts +0 -27
- package/build/types/integrations/tracing-channel/graphql/index.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/graphql/resolvers.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/graphql/spans.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/graphql/types.d.ts +0 -25
- package/build/types/integrations/tracing-channel/graphql/types.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/hapi-types.d.ts +0 -53
- package/build/types/integrations/tracing-channel/hapi-types.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/hapi-utils.d.ts +0 -25
- package/build/types/integrations/tracing-channel/hapi-utils.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/hapi.d.ts +0 -9
- package/build/types/integrations/tracing-channel/hapi.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/ioredis.d.ts +0 -37
- package/build/types/integrations/tracing-channel/ioredis.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/kafkajs/consumer.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/kafkajs/index.d.ts +0 -16
- package/build/types/integrations/tracing-channel/kafkajs/index.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/kafkajs/semconv.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/kafkajs/spans.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/kafkajs/types.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/knex.d.ts +0 -11
- package/build/types/integrations/tracing-channel/knex.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/koa.d.ts +0 -14
- package/build/types/integrations/tracing-channel/koa.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/langchain.d.ts +0 -9
- package/build/types/integrations/tracing-channel/langchain.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/langgraph.d.ts +0 -9
- package/build/types/integrations/tracing-channel/langgraph.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/lru-memoizer.d.ts +0 -10
- package/build/types/integrations/tracing-channel/lru-memoizer.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/mongodb.d.ts +0 -12
- package/build/types/integrations/tracing-channel/mongodb.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/mongoose.d.ts +0 -15
- package/build/types/integrations/tracing-channel/mongoose.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/mysql.d.ts +0 -12
- package/build/types/integrations/tracing-channel/mysql.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/mysql2.d.ts +0 -17
- package/build/types/integrations/tracing-channel/mysql2.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/openai.d.ts +0 -9
- package/build/types/integrations/tracing-channel/openai.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/postgres-js.d.ts +0 -26
- package/build/types/integrations/tracing-channel/postgres-js.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/postgres.d.ts +0 -15
- package/build/types/integrations/tracing-channel/postgres.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/redis.d.ts +0 -16
- package/build/types/integrations/tracing-channel/redis.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/tedious.d.ts +0 -11
- package/build/types/integrations/tracing-channel/tedious.d.ts.map +0 -1
- package/build/types/integrations/tracing-channel/vercel-ai.d.ts +0 -9
- package/build/types/integrations/tracing-channel/vercel-ai.d.ts.map +0 -1
- package/build/types/mongodb/mongodb-span.d.ts +0 -66
- package/build/types/mongodb/mongodb-span.d.ts.map +0 -1
- package/build/types/mongoose/index.d.ts +0 -13
- package/build/types/mongoose/index.d.ts.map +0 -1
- package/build/types/mongoose/mongoose-dc-subscriber.d.ts.map +0 -1
- package/build/types/mongoose/mongoose-legacy-span.d.ts +0 -28
- package/build/types/mongoose/mongoose-legacy-span.d.ts.map +0 -1
- package/build/types/mysql2/index.d.ts +0 -11
- package/build/types/mysql2/index.d.ts.map +0 -1
- package/build/types/mysql2/mysql2-dc-subscriber.d.ts.map +0 -1
- package/build/types/orchestrion/index.d.ts +0 -130
- package/build/types/orchestrion/index.d.ts.map +0 -1
- package/build/types/orchestrion/moduleInjected.d.ts +0 -25
- package/build/types/orchestrion/moduleInjected.d.ts.map +0 -1
- package/build/types/prisma/global.d.ts.map +0 -1
- package/build/types/prisma/index.d.ts.map +0 -1
- package/build/types/prisma/tracing-helper.d.ts.map +0 -1
- package/build/types/prisma/types.d.ts.map +0 -1
- package/build/types/redis/index.d.ts +0 -18
- package/build/types/redis/index.d.ts.map +0 -1
- package/build/types/redis/redis-dc-subscriber.d.ts +0 -89
- package/build/types/redis/redis-dc-subscriber.d.ts.map +0 -1
- package/build/types/redis/redis-statement-serializer.d.ts.map +0 -1
- package/build/types/vercel-ai/index.d.ts +0 -10
- package/build/types/vercel-ai/index.d.ts.map +0 -1
- package/build/types/vercel-ai/util.d.ts.map +0 -1
- package/build/types/vercel-ai/vercel-ai-dc-subscriber.d.ts +0 -69
- package/build/types/vercel-ai/vercel-ai-dc-subscriber.d.ts.map +0 -1
- package/build/types/vercel-ai/vercel-ai-orchestrion-subscriber.d.ts.map +0 -1
- /package/build/cjs/integrations/{tracing-channel/aws-sdk → aws-sdk}/constants.js +0 -0
- /package/build/cjs/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/ServicesExtensions.js +0 -0
- /package/build/cjs/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/kinesis.js +0 -0
- /package/build/cjs/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/s3.js +0 -0
- /package/build/cjs/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/secretsmanager.js +0 -0
- /package/build/cjs/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/sns.js +0 -0
- /package/build/cjs/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/sqs.js +0 -0
- /package/build/cjs/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/stepfunctions.js +0 -0
- /package/build/cjs/integrations/{tracing-channel/aws-sdk → aws-sdk}/utils.js +0 -0
- /package/build/cjs/integrations/{tracing-channel/express → express}/route.js +0 -0
- /package/build/cjs/integrations/{tracing-channel/fastify → fastify}/utils.js +0 -0
- /package/build/cjs/integrations/{tracing-channel/firebase → firebase}/firestore.js +0 -0
- /package/build/cjs/integrations/{tracing-channel → hapi}/hapi-types.js +0 -0
- /package/build/cjs/integrations/{tracing-channel/kafkajs → kafkajs}/consumer.js +0 -0
- /package/build/cjs/integrations/{tracing-channel/kafkajs → kafkajs}/semconv.js +0 -0
- /package/build/cjs/{prisma → integrations/prisma}/global.js +0 -0
- /package/build/cjs/{prisma → integrations/prisma}/index.js +0 -0
- /package/build/cjs/{redis → integrations/redis}/redis-statement-serializer.js +0 -0
- /package/build/cjs/{vercel-ai → integrations/vercel-ai}/util.js +0 -0
- /package/build/esm/integrations/{tracing-channel/aws-sdk → aws-sdk}/constants.js +0 -0
- /package/build/esm/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/ServicesExtensions.js +0 -0
- /package/build/esm/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/kinesis.js +0 -0
- /package/build/esm/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/s3.js +0 -0
- /package/build/esm/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/secretsmanager.js +0 -0
- /package/build/esm/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/sns.js +0 -0
- /package/build/esm/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/sqs.js +0 -0
- /package/build/esm/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/stepfunctions.js +0 -0
- /package/build/esm/integrations/{tracing-channel/aws-sdk → aws-sdk}/utils.js +0 -0
- /package/build/esm/integrations/{tracing-channel/express → express}/route.js +0 -0
- /package/build/esm/integrations/{tracing-channel/fastify → fastify}/utils.js +0 -0
- /package/build/esm/integrations/{tracing-channel/firebase → firebase}/firestore.js +0 -0
- /package/build/esm/integrations/{tracing-channel → hapi}/hapi-types.js +0 -0
- /package/build/esm/integrations/{tracing-channel/kafkajs → kafkajs}/consumer.js +0 -0
- /package/build/esm/integrations/{tracing-channel/kafkajs → kafkajs}/semconv.js +0 -0
- /package/build/esm/{prisma → integrations/prisma}/global.js +0 -0
- /package/build/esm/{prisma → integrations/prisma}/index.js +0 -0
- /package/build/esm/{redis → integrations/redis}/redis-statement-serializer.js +0 -0
- /package/build/esm/{vercel-ai → integrations/vercel-ai}/util.js +0 -0
- /package/build/types/integrations/{tracing-channel/aws-sdk → aws-sdk}/aws-sdk.types.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/MessageAttributes.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/ServiceExtension.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/ServicesExtensions.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/bedrock-runtime.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/dynamodb.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/index.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/kinesis.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/lambda.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/s3.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/secretsmanager.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/sns.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/sqs.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/aws-sdk → aws-sdk}/services/stepfunctions.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/aws-sdk → aws-sdk}/types.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/aws-sdk → aws-sdk}/utils.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/express → express}/route.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/fastify → fastify}/utils.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/firebase → firebase}/firestore-types.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/firebase → firebase}/firestore.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/firebase → firebase}/functions.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/firebase → firebase}/instrumentation.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/graphql → graphql}/graphql-types.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/graphql → graphql}/resolvers.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/graphql → graphql}/spans.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/kafkajs → kafkajs}/consumer.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/kafkajs → kafkajs}/semconv.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/kafkajs → kafkajs}/spans.d.ts +0 -0
- /package/build/types/integrations/{tracing-channel/kafkajs → kafkajs}/types.d.ts +0 -0
- /package/build/types/{mongoose → integrations/mongoose}/mongoose-dc-subscriber.d.ts +0 -0
- /package/build/types/{mysql2 → integrations/mysql2}/mysql2-dc-subscriber.d.ts +0 -0
- /package/build/types/{prisma → integrations/prisma}/global.d.ts +0 -0
- /package/build/types/{prisma → integrations/prisma}/index.d.ts +0 -0
- /package/build/types/{prisma → integrations/prisma}/tracing-helper.d.ts +0 -0
- /package/build/types/{prisma → integrations/prisma}/types.d.ts +0 -0
- /package/build/types/{redis → integrations/redis}/redis-statement-serializer.d.ts +0 -0
- /package/build/types/{vercel-ai → integrations/vercel-ai}/util.d.ts +0 -0
- /package/build/types/{vercel-ai → integrations/vercel-ai}/vercel-ai-orchestrion-subscriber.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing-channel/express/index.ts"],"sourcesContent":["import * as diagnosticsChannel from 'node:diagnostics_channel';\nimport type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport { expressModuleNames } from '../../../orchestrion/config/express';\nimport { invokeOrchestrionInstrumentation } from '../../../orchestrion/instrumentation';\nimport type { ExpressIntegrationOptions } from './types';\nimport { instrumentExpress } from './instrumentation';\n\n// NOTE: this uses the same name as the OTel integration by design.\n// When enabled, the OTel 'Express' integration is omitted from the default set.\nconst INTEGRATION_NAME = 'Express' as const;\n\nconst _expressIntegration = ((options: ExpressIntegrationOptions = {}) => {\n return {\n name: INTEGRATION_NAME,\n setup(client) {\n invokeOrchestrionInstrumentation(client, expressModuleNames, instrumentExpress, [\n options,\n diagnosticsChannel.tracingChannel,\n ]);\n },\n };\n}) satisfies IntegrationFn;\n\n/**\n * Orchestrion-driven Express integration.\n *\n * Subscribes to the `orchestrion:express:handle` (Express v4) and\n * `orchestrion:router:handle` (Express v5, via the `router` package)\n * diagnostics_channels that the orchestrion code transform injects into the\n * routing layer's request handler (`Layer.prototype.handle_request` /\n * `handleRequest`). One span is opened per layer invocation — producing the\n * same spans as the OTel Express instrumentation.\n *\n * Requires the orchestrion runtime hook or bundler plugin to be active.\n */\nexport const expressIntegration = defineIntegration(_expressIntegration);\n"],"names":[],"mappings":";;;;;;AAUA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAA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A;AAcO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmB,CAAA;;"}
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
import { HTTP_ROUTE, SENTRY_OP } from '@sentry/conventions/attributes';
|
|
2
|
-
import { WEB_SERVER_MIDDLEWARE_SPAN_OP } from '@sentry/conventions/op';
|
|
3
|
-
import { getActiveSpan, getIsolationScope, getDefaultIsolationScope, debug, startInactiveSpan, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, stringMatchesSomePattern } from '@sentry/core';
|
|
4
|
-
import { DEBUG_BUILD } from '../../../debug-build.js';
|
|
5
|
-
import { CHANNELS } from '../../../orchestrion/channels.js';
|
|
6
|
-
import { bindTracingChannelToSpan } from '../../../tracing-channel.js';
|
|
7
|
-
import { setLayerRegisteredPath, getLayerPath, getLayerRegisteredPath, pushLayerPath, getConstructedRoute, getActualMatchedRoute, popLayerPath } from './route.js';
|
|
8
|
-
import { setHttpServerSpanRouteAttribute } from '../../../utils/setHttpServerSpanRouteAttribute.js';
|
|
9
|
-
|
|
10
|
-
const ORIGIN = "auto.http.express";
|
|
11
|
-
const ATTR_EXPRESS_NAME = "express.name";
|
|
12
|
-
const ATTR_EXPRESS_TYPE = "express.type";
|
|
13
|
-
const EXPRESS_TYPE_TO_SPAN_OP = {
|
|
14
|
-
middleware: WEB_SERVER_MIDDLEWARE_SPAN_OP,
|
|
15
|
-
request_handler: "handler",
|
|
16
|
-
router: "router"
|
|
17
|
-
};
|
|
18
|
-
const NOOP = () => {
|
|
19
|
-
};
|
|
20
|
-
let _isInstrumented = false;
|
|
21
|
-
function instrumentExpress(options, tracingChannel) {
|
|
22
|
-
if (_isInstrumented) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
_isInstrumented = true;
|
|
26
|
-
for (const channelName of [CHANNELS.EXPRESS_REGISTER, CHANNELS.ROUTER_REGISTER]) {
|
|
27
|
-
tracingChannel(channelName).subscribe({
|
|
28
|
-
start: NOOP,
|
|
29
|
-
asyncStart: NOOP,
|
|
30
|
-
asyncEnd: NOOP,
|
|
31
|
-
error: NOOP,
|
|
32
|
-
end: captureRegisteredLayerPath
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
for (const channelName of [CHANNELS.EXPRESS_HANDLE, CHANNELS.ROUTER_HANDLE]) {
|
|
36
|
-
const channel = tracingChannel(channelName);
|
|
37
|
-
bindTracingChannelToSpan(channel, (data) => getSpanForLayer(data, options), {
|
|
38
|
-
beforeSpanEnd(_span, data) {
|
|
39
|
-
data._sentryCleanup?.();
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
channel.subscribe({
|
|
43
|
-
start: NOOP,
|
|
44
|
-
asyncEnd: NOOP,
|
|
45
|
-
end: NOOP,
|
|
46
|
-
error: NOOP,
|
|
47
|
-
asyncStart: popLayerPathForLayer
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
function captureRegisteredLayerPath(data) {
|
|
52
|
-
const stack = data.self?.stack;
|
|
53
|
-
if (!Array.isArray(stack)) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
const layer = stack[stack.length - 1];
|
|
57
|
-
if (layer) {
|
|
58
|
-
setLayerRegisteredPath(layer, getLayerPath(data.arguments ?? []));
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
function popLayerPathForLayer(data) {
|
|
62
|
-
if (!data._sentryStoredLayer) {
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
data._sentryStoredLayer = false;
|
|
66
|
-
const req = data.arguments?.[0];
|
|
67
|
-
if (req) {
|
|
68
|
-
popLayerPath(req);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
function getSpanForLayer(data, options) {
|
|
72
|
-
const layer = data.self;
|
|
73
|
-
const args = data.arguments;
|
|
74
|
-
if (!layer || !Array.isArray(args)) {
|
|
75
|
-
return void 0;
|
|
76
|
-
}
|
|
77
|
-
if (layer.handle?.length === 4) {
|
|
78
|
-
return void 0;
|
|
79
|
-
}
|
|
80
|
-
if (layer.method && !layer.route) {
|
|
81
|
-
return void 0;
|
|
82
|
-
}
|
|
83
|
-
const req = args[0];
|
|
84
|
-
const res = args[1];
|
|
85
|
-
if (!req) {
|
|
86
|
-
return void 0;
|
|
87
|
-
}
|
|
88
|
-
if (!getActiveSpan()) {
|
|
89
|
-
return void 0;
|
|
90
|
-
}
|
|
91
|
-
const type = getLayerType(layer);
|
|
92
|
-
const registeredPath = getLayerRegisteredPath(layer);
|
|
93
|
-
if (registeredPath != null) {
|
|
94
|
-
pushLayerPath(req, registeredPath);
|
|
95
|
-
data._sentryStoredLayer = true;
|
|
96
|
-
}
|
|
97
|
-
const constructedRoute = getConstructedRoute(req);
|
|
98
|
-
const matchedRoute = constructedRoute != null ? getActualMatchedRoute(req, constructedRoute) : void 0;
|
|
99
|
-
const name = type === "request_handler" ? constructedRoute || "request handler" : type === "router" ? layer.path ?? "/" : layer.name ?? "<anonymous>";
|
|
100
|
-
if (matchedRoute) {
|
|
101
|
-
setHttpServerSpanRouteAttribute(matchedRoute);
|
|
102
|
-
}
|
|
103
|
-
if (type === "request_handler" && constructedRoute) {
|
|
104
|
-
const isolationScope = getIsolationScope();
|
|
105
|
-
if (isolationScope !== getDefaultIsolationScope()) {
|
|
106
|
-
const method = typeof req.method === "string" ? req.method.toUpperCase() : "GET";
|
|
107
|
-
isolationScope.setTransactionName(`${method} ${constructedRoute}`);
|
|
108
|
-
} else {
|
|
109
|
-
DEBUG_BUILD && debug.warn(
|
|
110
|
-
"[orchestrion:express] Isolation scope is still default isolation scope - skipping transaction name"
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
if (isLayerIgnored(name, type, options)) {
|
|
115
|
-
return void 0;
|
|
116
|
-
}
|
|
117
|
-
const span = startInactiveSpan({
|
|
118
|
-
name,
|
|
119
|
-
attributes: {
|
|
120
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN,
|
|
121
|
-
[SENTRY_OP]: EXPRESS_TYPE_TO_SPAN_OP[type],
|
|
122
|
-
[ATTR_EXPRESS_NAME]: name,
|
|
123
|
-
[ATTR_EXPRESS_TYPE]: type,
|
|
124
|
-
...matchedRoute ? { [HTTP_ROUTE]: matchedRoute } : {}
|
|
125
|
-
}
|
|
126
|
-
});
|
|
127
|
-
if (res && typeof res.once === "function") {
|
|
128
|
-
const onFinish = () => {
|
|
129
|
-
span.end();
|
|
130
|
-
};
|
|
131
|
-
res.once("finish", onFinish);
|
|
132
|
-
data._sentryCleanup = () => res.removeListener("finish", onFinish);
|
|
133
|
-
}
|
|
134
|
-
return span;
|
|
135
|
-
}
|
|
136
|
-
function getLayerType(layer) {
|
|
137
|
-
if (layer.name === "router") {
|
|
138
|
-
return "router";
|
|
139
|
-
}
|
|
140
|
-
if (layer.name === "bound dispatch" || layer.name === "handle") {
|
|
141
|
-
return "request_handler";
|
|
142
|
-
}
|
|
143
|
-
return "middleware";
|
|
144
|
-
}
|
|
145
|
-
function isLayerIgnored(name, type, options) {
|
|
146
|
-
const { ignoreLayers, ignoreLayersType } = options;
|
|
147
|
-
if (Array.isArray(ignoreLayersType) && ignoreLayersType.includes(type)) {
|
|
148
|
-
return true;
|
|
149
|
-
}
|
|
150
|
-
if (!Array.isArray(ignoreLayers)) {
|
|
151
|
-
return false;
|
|
152
|
-
}
|
|
153
|
-
try {
|
|
154
|
-
return stringMatchesSomePattern(name, ignoreLayers, true);
|
|
155
|
-
} catch {
|
|
156
|
-
return false;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
export { instrumentExpress };
|
|
161
|
-
//# sourceMappingURL=instrumentation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.js","sources":["../../../../../src/integrations/tracing-channel/express/instrumentation.ts"],"sourcesContent":["import type * as diagnosticsChannel from 'node:diagnostics_channel';\nimport { HTTP_ROUTE, SENTRY_OP } from '@sentry/conventions/attributes';\nimport { WEB_SERVER_MIDDLEWARE_SPAN_OP } from '@sentry/conventions/op';\nimport type { Span } from '@sentry/core';\nimport {\n debug,\n getActiveSpan,\n getDefaultIsolationScope,\n getIsolationScope,\n SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN,\n startInactiveSpan,\n stringMatchesSomePattern,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from '../../../debug-build';\nimport { CHANNELS } from '../../../orchestrion/channels';\nimport { bindTracingChannelToSpan } from '../../../tracing-channel';\nimport {\n getActualMatchedRoute,\n getConstructedRoute,\n getLayerPath,\n getLayerRegisteredPath,\n popLayerPath,\n pushLayerPath,\n setLayerRegisteredPath,\n} from './route';\nimport type {\n ExpressIntegrationOptions,\n ExpressLayer,\n ExpressLayerType,\n ExpressRequest,\n ExpressResponse,\n HandleChannelContext,\n RegistrationChannelContext,\n} from './types';\nimport { setHttpServerSpanRouteAttribute } from '../../../utils/setHttpServerSpanRouteAttribute';\n\nconst ORIGIN = 'auto.http.express';\n\n// `express.name`/`express.type` are Sentry-internal Express attributes (not part\n// of `@sentry/conventions`); kept in sync with `@sentry/core`'s OTel-derived\n// Express integration so the emitted spans are identical across both code paths.\nconst ATTR_EXPRESS_NAME = 'express.name';\nconst ATTR_EXPRESS_TYPE = 'express.type';\n\n// TODO(conventions): Replace `'handler'` and `'router'` with their span op constants once they are released in `@sentry/conventions`.\nconst EXPRESS_TYPE_TO_SPAN_OP: Record<string, string> = {\n middleware: WEB_SERVER_MIDDLEWARE_SPAN_OP,\n request_handler: 'handler',\n router: 'router',\n};\n\nconst NOOP = (): void => {};\n\nlet _isInstrumented = false;\n\nexport function instrumentExpress(\n options: ExpressIntegrationOptions,\n tracingChannel: typeof diagnosticsChannel.tracingChannel,\n): void {\n if (_isInstrumented) {\n return;\n }\n _isInstrumented = true;\n\n // Record each layer's registered path *pattern* as it is registered, so the\n // matched route can be reconstructed with its parameters intact at request\n // time. Only the `end` event matters (the layer is on the router's stack by\n // then); the others are required by the subscriber type, so no-op them.\n for (const channelName of [CHANNELS.EXPRESS_REGISTER, CHANNELS.ROUTER_REGISTER]) {\n tracingChannel<RegistrationChannelContext>(channelName).subscribe({\n start: NOOP,\n asyncStart: NOOP,\n asyncEnd: NOOP,\n error: NOOP,\n end: captureRegisteredLayerPath,\n });\n }\n\n for (const channelName of [CHANNELS.EXPRESS_HANDLE, CHANNELS.ROUTER_HANDLE]) {\n const channel = tracingChannel<HandleChannelContext>(channelName);\n\n bindTracingChannelToSpan(channel, data => getSpanForLayer(data, options), {\n beforeSpanEnd(_span, data) {\n data._sentryCleanup?.();\n },\n });\n\n // Pop the layer path when the layer hands off via `next`. `asyncStart` fires\n // when `next` is called and *before* the downstream layer runs, so the\n // per-request path chain reflects only the current chain when each layer\n // reconstructs its route. Only `asyncStart` is relevant here.\n channel.subscribe({\n start: NOOP,\n asyncEnd: NOOP,\n end: NOOP,\n error: NOOP,\n asyncStart: popLayerPathForLayer,\n });\n }\n}\n\n/** Record the freshly-registered layer's path pattern from a `route`/`use` call. */\nfunction captureRegisteredLayerPath(data: RegistrationChannelContext): void {\n const stack = data.self?.stack;\n if (!Array.isArray(stack)) {\n return;\n }\n const layer = stack[stack.length - 1];\n if (layer) {\n setLayerRegisteredPath(layer, getLayerPath(data.arguments ?? []));\n }\n}\n\n/** Pop the path a layer pushed once it hands control onward via `next`. */\nfunction popLayerPathForLayer(data: HandleChannelContext): void {\n if (!data._sentryStoredLayer) {\n return;\n }\n // Clear the marker first so a layer that (incorrectly) calls `next` more than\n // once can't pop again and take a parent's entry off the stack with it.\n data._sentryStoredLayer = false;\n const req = data.arguments?.[0] as ExpressRequest | undefined;\n if (req) {\n popLayerPath(req);\n }\n}\n\n/**\n * Open a span for one layer invocation. Returns `undefined` to opt the layer\n * out (error handlers, or a layer with no active parent trace) — the helper\n * then leaves the active context untouched.\n */\nfunction getSpanForLayer(data: HandleChannelContext, options: ExpressIntegrationOptions): Span | undefined {\n const layer = data.self;\n const args = data.arguments;\n if (!layer || !Array.isArray(args)) {\n return undefined;\n }\n\n // Express only treats a 4-arg handler as an error handler and skips it in\n // the normal request pipeline; match the OTel integration and don't trace it.\n if (layer.handle?.length === 4) {\n return undefined;\n }\n\n // A Route dispatches to its handlers via the same `handle_request` method,\n // but those inner layers already run inside the route-dispatch layer's\n // `request_handler` span. They carry `.method` (and no `.route`); skip them\n // so we emit one span per route, matching the OTel Express integration.\n if (layer.method && !layer.route) {\n return undefined;\n }\n\n const req = args[0] as ExpressRequest | undefined;\n const res = args[1] as ExpressResponse | undefined;\n if (!req) {\n return undefined;\n }\n\n // No active parent span means this request is being ignored (unsampled /\n // filtered), so don't open a span\n if (!getActiveSpan()) {\n return undefined;\n }\n\n const type = getLayerType(layer);\n\n // Push this layer's registered path onto the request's chain so a\n // `request_handler` can reconstruct the full route with parameters intact\n // (`req.baseUrl` only exposes the *resolved* mount prefix). The matching pop\n // happens on `asyncStart` when the layer hands off via `next`.\n const registeredPath = getLayerRegisteredPath(layer);\n if (registeredPath != null) {\n pushLayerPath(req, registeredPath);\n data._sentryStoredLayer = true;\n }\n\n // `constructedRoute` (the full registered pattern) names the span/transaction;\n // `matchedRoute` (validated against the request URL) is the `http.route`.\n // Computed for every layer type (not just `request_handler`) so routes served\n // by mounted middleware (`app.use('/trpc', handler)`) still propagate their\n // path to the root `http.server` span — mirroring the OTel Express integration,\n // which resolves the route on every layer. Without this, such transactions keep\n // the raw URL name (e.g. `GET /trpc/foo` instead of `GET /trpc`).\n const constructedRoute = getConstructedRoute(req);\n const matchedRoute = constructedRoute != null ? getActualMatchedRoute(req, constructedRoute) : undefined;\n\n const name =\n type === 'request_handler'\n ? constructedRoute || 'request handler'\n : type === 'router'\n ? (layer.path ?? '/')\n : (layer.name ?? '<anonymous>');\n\n // Propagate the route to the root `http.server` span *before* the ignore\n // check, so the transaction is still named even when the layer's own span is\n // ignored — matches the OTel Express integration's `onRouteResolved` timing.\n if (matchedRoute) {\n setHttpServerSpanRouteAttribute(matchedRoute);\n }\n\n if (type === 'request_handler' && constructedRoute) {\n const isolationScope = getIsolationScope();\n if (isolationScope !== getDefaultIsolationScope()) {\n const method = typeof req.method === 'string' ? req.method.toUpperCase() : 'GET';\n isolationScope.setTransactionName(`${method} ${constructedRoute}`);\n } else {\n DEBUG_BUILD &&\n debug.warn(\n '[orchestrion:express] Isolation scope is still default isolation scope - skipping transaction name',\n );\n }\n }\n\n // Honor `ignoreLayers`/`ignoreLayersType`: skip the span for matching layers.\n // We intentionally do NOT pop the pushed path here (unlike OTel Express, which\n // pops on ignore): the path is still popped on `asyncStart` when the layer\n // calls `next`, so a following sibling isn't polluted, while an ignored\n // *router* keeps its mount prefix on the stack for the sub-stack it dispatches\n // — so routes under an ignored router stay correct. The only entries that\n // never pop come from layers that end the response without `next()`, and those\n // sit on a per-request store that is discarded when the request ends.\n if (isLayerIgnored(name, type, options)) {\n return undefined;\n }\n\n const span = startInactiveSpan({\n name,\n attributes: {\n [SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN,\n [SENTRY_OP]: EXPRESS_TYPE_TO_SPAN_OP[type],\n [ATTR_EXPRESS_NAME]: name,\n [ATTR_EXPRESS_TYPE]: type,\n ...(matchedRoute ? { [HTTP_ROUTE]: matchedRoute } : {}),\n },\n });\n\n // A layer that sends the response (route handlers, typically) never calls\n // `next`, so the channel's `asyncEnd` never fires. End on the response's\n // `finish` in that case. When `next` *is* called, the helper ends the span\n // (via `asyncEnd`) and `beforeSpanEnd` removes this now-redundant listener.\n if (res && typeof res.once === 'function') {\n const onFinish = (): void => {\n span.end();\n };\n res.once('finish', onFinish);\n data._sentryCleanup = () => res.removeListener('finish', onFinish);\n }\n\n return span;\n}\n\nfunction getLayerType(layer: ExpressLayer): ExpressLayerType {\n if (layer.name === 'router') {\n return 'router';\n }\n // `bound dispatch` (v4) / `handle` — the route-dispatch layer created by `router.route()`.\n if (layer.name === 'bound dispatch' || layer.name === 'handle') {\n return 'request_handler';\n }\n return 'middleware';\n}\n\n/**\n * Whether a layer should be skipped per the `ignoreLayers`/`ignoreLayersType`\n * options. Matches `@sentry/core`'s Express `isLayerIgnored`: `ignoreLayersType`\n * filters by layer type, `ignoreLayers` matches the layer's name against\n * string/RegExp/predicate patterns (exact string match).\n */\nfunction isLayerIgnored(name: string, type: ExpressLayerType, options: ExpressIntegrationOptions): boolean {\n const { ignoreLayers, ignoreLayersType } = options;\n\n if (Array.isArray(ignoreLayersType) && ignoreLayersType.includes(type)) {\n return true;\n }\n\n if (!Array.isArray(ignoreLayers)) {\n return false;\n }\n\n try {\n return stringMatchesSomePattern(name, ignoreLayers, true);\n } catch {\n return false;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;AAoCA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAKf,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAoB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAC1B,CAAA,CAAA,CAAA,CAAA,C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","sources":["../../../../../src/integrations/tracing-channel/express/route.ts"],"sourcesContent":["import type { ExpressLayer, ExpressRequest } from './types';\n\n/**\n * Registered path *pattern* per routing `Layer`, captured when the layer is\n * registered via `Router.prototype.route`/`.use`. `undefined` means the layer\n * was registered without an explicit path (e.g. `app.use(mw)`), so it does not\n * contribute to the reconstructed route.\n *\n * This is the piece `req.baseUrl` can't provide: at request time `req.baseUrl`\n * holds the *resolved* mount prefix (`/api/v1`), whereas we want the registered\n * pattern (`/api/:version`).\n */\nconst layerRegisteredPaths = new WeakMap<ExpressLayer, string | undefined>();\n\n/** Record the path pattern a layer was registered with. */\nexport function setLayerRegisteredPath(layer: ExpressLayer, path: string | undefined): void {\n layerRegisteredPaths.set(layer, path);\n}\n\n/** Read the path pattern a layer was registered with, if any. */\nexport function getLayerRegisteredPath(layer: ExpressLayer): string | undefined {\n return layerRegisteredPaths.get(layer);\n}\n\n/**\n * Per-request ordered stack of the registered path patterns of the layers\n * currently on the matched chain. Layers push on entry and pop when they hand\n * off via `next`, so at any point it reflects the path from the app root down\n * to the currently-executing layer. `WeakMap` so entries are released with the\n * request.\n */\nconst requestLayerPaths = new WeakMap<ExpressRequest, string[]>();\n\nfunction getStore(req: ExpressRequest): string[] {\n let store = requestLayerPaths.get(req);\n if (!store) {\n store = [];\n requestLayerPaths.set(req, store);\n }\n return store;\n}\n\n/** Push a layer's registered path onto the request's chain. */\nexport function pushLayerPath(req: ExpressRequest, path: string): void {\n getStore(req).push(path);\n}\n\n/** Pop the most recently pushed layer path off the request's chain. */\nexport function popLayerPath(req: ExpressRequest): void {\n getStore(req).pop();\n}\n\n/**\n * The path pattern a `route`/`use` call registered, derived from its arguments.\n * A leading string/RegExp/number path becomes the pattern (arrays are joined\n * with `,`); a bare handler function yields `undefined`. Kept in sync with\n * `@sentry/core`'s Express `getLayerPath`.\n */\nexport function getLayerPath(args: unknown[]): string | undefined {\n const firstArg = args[0];\n if (Array.isArray(firstArg)) {\n return firstArg.map(segment => extractLayerPathSegment(segment) ?? '').join(',');\n }\n return extractLayerPathSegment(firstArg);\n}\n\nfunction extractLayerPathSegment(segment: unknown): string | undefined {\n return typeof segment === 'string'\n ? segment\n : segment instanceof RegExp || typeof segment === 'number'\n ? String(segment)\n : undefined;\n}\n\n/**\n * Concatenate the stored layer paths into the full route pattern (parameters\n * preserved), e.g. `/api/:version/user`. Mirrors `@sentry/core`.\n */\nexport function getConstructedRoute(req: ExpressRequest): string {\n const layersStore = getStore(req);\n\n let constructedRoute = '';\n for (const path of layersStore) {\n if (path === '/' || path === '/*') {\n continue;\n }\n constructedRoute += !constructedRoute || constructedRoute.endsWith('/') ? path : `/${path}`;\n }\n\n return constructedRoute.replace(/\\/{2,}/g, '/');\n}\n\n/**\n * Validate the constructed route against the request URL, returning it only\n * when it plausibly corresponds to a real match (otherwise `undefined`). Mirrors\n * `@sentry/core`'s `getActualMatchedRoute` — used for the `http.route` attribute.\n */\nexport function getActualMatchedRoute(req: ExpressRequest, constructedRoute: string): string | undefined {\n const layersStore = getStore(req);\n\n if (layersStore.length === 0) {\n return undefined;\n }\n\n const originalUrl = typeof req.originalUrl === 'string' ? req.originalUrl : '';\n\n // The layer store also includes root paths in case a non-existing url was requested.\n if (layersStore.every(path => path === '/')) {\n return originalUrl === '/' ? '/' : undefined;\n }\n\n if (constructedRoute === '*') {\n return constructedRoute;\n }\n\n // For RegExp routes or route arrays, return the constructed route as-is.\n if (\n constructedRoute.includes('/') &&\n (constructedRoute.includes(',') ||\n constructedRoute.includes('\\\\') ||\n constructedRoute.includes('*') ||\n constructedRoute.includes('['))\n ) {\n return constructedRoute;\n }\n\n const normalizedRoute = constructedRoute.startsWith('/') ? constructedRoute : `/${constructedRoute}`;\n\n const isValidRoute =\n normalizedRoute.length > 0 &&\n (originalUrl === normalizedRoute || originalUrl.startsWith(normalizedRoute) || isRoutePattern(normalizedRoute));\n\n return isValidRoute ? normalizedRoute : undefined;\n}\n\n/** Whether a route contains parameter/wildcard patterns (`:id`, `*`). */\nf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A,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,CAAA,CAAA,CAAA,CAAA,EAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAS,GAAG,CAAA;AAClD;;"}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import * as diagnosticsChannel from 'node:diagnostics_channel';
|
|
2
|
-
import { DEBUG_BUILD } from '../../../debug-build.js';
|
|
3
|
-
import { debug, captureException, getClient } from '@sentry/core';
|
|
4
|
-
import { defaultShouldHandleError, INTEGRATION_NAME } from './utils.js';
|
|
5
|
-
|
|
6
|
-
function getFastifyIntegration() {
|
|
7
|
-
const client = getClient();
|
|
8
|
-
return client?.getIntegrationByName(INTEGRATION_NAME);
|
|
9
|
-
}
|
|
10
|
-
function subscribeToFastifyErrorChannel() {
|
|
11
|
-
diagnosticsChannel.subscribe("tracing:fastify.request.handler:error", (message) => {
|
|
12
|
-
const { error, request, reply } = message;
|
|
13
|
-
handleFastifyError.call(handleFastifyError, error, request, reply, "diagnostics-channel");
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
function handleFastifyError(error, request, reply, handlerOrigin) {
|
|
17
|
-
const shouldHandleError = getFastifyIntegration()?.getShouldHandleError() || defaultShouldHandleError;
|
|
18
|
-
if (handlerOrigin === "diagnostics-channel") {
|
|
19
|
-
this.diagnosticsChannelExists = true;
|
|
20
|
-
}
|
|
21
|
-
if (this.diagnosticsChannelExists && handlerOrigin === "onError-hook") {
|
|
22
|
-
DEBUG_BUILD && debug.warn(
|
|
23
|
-
"Fastify error handler was already registered via diagnostics channel.",
|
|
24
|
-
"You can safely remove `setupFastifyErrorHandler` call and set `shouldHandleError` on the integration options."
|
|
25
|
-
);
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
if (shouldHandleError(error, request, reply)) {
|
|
29
|
-
captureException(error, {
|
|
30
|
-
mechanism: {
|
|
31
|
-
handled: false,
|
|
32
|
-
type: "auto.function.fastify"
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export { handleFastifyError, subscribeToFastifyErrorChannel };
|
|
39
|
-
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sources":["../../../../../src/integrations/tracing-channel/fastify/errors.ts"],"sourcesContent":["import type { FastifyIntegration, FastifyReply, FastifyRequest } from './types';\nimport * as diagnosticsChannel from 'node:diagnostics_channel';\nimport { DEBUG_BUILD } from '../../../debug-build';\nimport { getClient, debug, captureException } from '@sentry/core';\nimport { defaultShouldHandleError, INTEGRATION_NAME } from './utils';\n\nfunction getFastifyIntegration(): FastifyIntegration | undefined {\n const client = getClient();\n return client?.getIntegrationByName(INTEGRATION_NAME);\n}\n\n/**\n * Subscribe to the Fastify v5 error diagnostics channel.\n */\nexport function subscribeToFastifyErrorChannel(): void {\n diagnosticsChannel.subscribe('tracing:fastify.request.handler:error', message => {\n const { error, request, reply } = message as {\n error: Error;\n request: FastifyRequest;\n reply: FastifyReply;\n };\n\n handleFastifyError.call(handleFastifyError, error, request, reply, 'diagnostics-channel');\n });\n}\n\n/**\n * Handle a Fastify error, and possibly send it to Sentry.\n */\nexport function handleFastifyError(\n this: {\n diagnosticsChannelExists?: boolean;\n },\n error: Error,\n request: FastifyRequest,\n reply: FastifyReply,\n handlerOrigin: 'diagnostics-channel' | 'onError-hook',\n): void {\n const shouldHandleError = getFastifyIntegration()?.getShouldHandleError() || defaultShouldHandleError;\n // Diagnostics channel runs before the onError hook, so we can use it to check if the handler was already registered\n if (handlerOrigin === 'diagnostics-channel') {\n this.diagnosticsChannelExists = true;\n }\n\n if (this.diagnosticsChannelExists && handlerOrigin === 'onError-hook') {\n DEBUG_BUILD &&\n debug.warn(\n 'Fastify error handler was already registered via diagnostics channel.',\n 'You can safely remove `setupFastifyErrorHandler` call and set `shouldHandleError` on the integration options.',\n );\n\n // If the diagnostics channel already exists, we don't need to handle the error again\n return;\n }\n\n if (shouldHandleError(error, request, reply)) {\n captureException(error, {\n mechanism: {\n handled: false,\n type: 'auto.function.fastify',\n },\n });\n }\n}\n"],"names":[],"mappings":";;;;;AAMA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,qBAAA,CAAA,CAAA,CAAwD;AAC/D,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,IAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU;AACzB,CAAA,CAAA,OAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAqB,gBAAgB,CAAA;AACtD;AAKO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,8BAAA,CAAA,CAAA,CAAuC;AACrD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAU,yCAAyC,CAAA,OAAA,CAAA,CAAA,CAAA,CAAA,CAAW;AAC/E,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,EAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO,OAAA,CAAA,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,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,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CACF;AAEA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,iBAAA,CAAkB,CAAA,CAAA,CAAA,CAAA,CAAA,EAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAG;AAC5C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACtB,SAAA,CAAA,CAAW;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACT,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAS,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CACT,IAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACR,CAAA,CAAA,CAAA,CAAA,CACD,CAAA;AAAA,CAAA,CACH;AACF;;"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { defineIntegration } from '@sentry/core';
|
|
2
|
-
import { instrumentFastify as instrumentFastify$1 } from './instrumentation.js';
|
|
3
|
-
import { INTEGRATION_NAME, defaultShouldHandleError } from './utils.js';
|
|
4
|
-
import { subscribeToFastifyErrorChannel, handleFastifyError as handleFastifyError$1 } from './errors.js';
|
|
5
|
-
|
|
6
|
-
const _fastifyIntegration = (({ shouldHandleError } = {}) => {
|
|
7
|
-
let _shouldHandleError;
|
|
8
|
-
return {
|
|
9
|
-
name: INTEGRATION_NAME,
|
|
10
|
-
setupOnce() {
|
|
11
|
-
_shouldHandleError = shouldHandleError || defaultShouldHandleError;
|
|
12
|
-
subscribeToFastifyErrorChannel();
|
|
13
|
-
instrumentFastify$1();
|
|
14
|
-
},
|
|
15
|
-
getShouldHandleError() {
|
|
16
|
-
return _shouldHandleError;
|
|
17
|
-
},
|
|
18
|
-
setShouldHandleError(shouldHandleError2) {
|
|
19
|
-
_shouldHandleError = shouldHandleError2;
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
});
|
|
23
|
-
const fastifyIntegration = defineIntegration(_fastifyIntegration);
|
|
24
|
-
const instrumentFastify = instrumentFastify$1;
|
|
25
|
-
const handleFastifyError = handleFastifyError$1;
|
|
26
|
-
|
|
27
|
-
export { fastifyIntegration, handleFastifyError, instrumentFastify };
|
|
28
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/integrations/tracing-channel/fastify/index.ts"],"sourcesContent":["import type { IntegrationFn } from '@sentry/core';\nimport { defineIntegration } from '@sentry/core';\nimport type { FastifyIntegration, FastifyReply, FastifyRequest } from './types';\nimport { instrumentFastify as _instrumentFastify } from './instrumentation';\nimport { defaultShouldHandleError, INTEGRATION_NAME } from './utils';\nimport { subscribeToFastifyErrorChannel, handleFastifyError as _handleFastifyError } from './errors';\n\n/**\n * Options for the Fastify integration.\n *\n * `shouldHandleError` - Callback method deciding whether error should be captured and sent to Sentry\n * This is used on Fastify v5 where Sentry handles errors in the diagnostics channel.\n * Fastify v3 and v4 use `setupFastifyErrorHandler` instead.\n *\n * @example\n *\n * ```javascript\n * Sentry.init({\n * integrations: [\n * Sentry.fastifyIntegration({\n * shouldHandleError(_error, _request, reply) {\n * return reply.statusCode >= 500;\n * },\n * });\n * },\n * });\n * ```\n *\n */\ninterface FastifyIntegrationOptions {\n /**\n * Callback method deciding whether error should be captured and sent to Sentry\n * This is used on Fastify v5 where Sentry handles errors in the diagnostics channel.\n * Fastify v3 and v4 use `setupFastifyErrorHandler` instead.\n *\n * @param error Captured Fastify error\n * @param request Fastify request (or any object containing at least method, routeOptions.url, and routerPath)\n * @param reply Fastify reply (or any object containing at least statusCode)\n */\n shouldHandleError: (error: Error, request: FastifyRequest, reply: FastifyReply) => boolean;\n}\n\nconst _fastifyIntegration = (({ shouldHandleError }: Partial<FastifyIntegrationOptions> = {}) => {\n let _shouldHandleError: (error: Error, request: FastifyRequest, reply: FastifyReply) => boolean;\n\n return {\n name: INTEGRATION_NAME,\n setupOnce() {\n _shouldHandleError = shouldHandleError || defaultShouldHandleError;\n\n subscribeToFastifyErrorChannel();\n _instrumentFastify();\n },\n getShouldHandleError() {\n return _shouldHandleError;\n },\n setShouldHandleError(shouldHandleError: (error: Error, request: FastifyRequest, reply: FastifyReply) => boolean) {\n _shouldHandleError = shouldHandleError;\n },\n } satisfies FastifyIntegration;\n}) satisfies IntegrationFn;\n\n/**\n * Adds Sentry tracing instrumentation for [Fastify](https://fastify.dev/).\n * This integration supports Fastify v5 only.\n *\n * For more information, see the [fastify documentation](https://docs.sentry.io/platforms/javascript/guides/fastify/).\n *\n * @example\n * ```javascript\n * const Sentry = require('@sentry/node');\n *\n * Sentry.init({\n * integrations: [Sentry.fastifyIntegration()],\n * })\n * ```\n */\nexport const fastifyIntegration = defineIntegration(_fastifyIntegration);\n\n/**\n * @deprecated This export is deprecated and will not longer be exposed in the next major version.\n */\nexport const instrumentFastify = _instrumentFastify;\n\n/**\n * @deprecated This export is deprecated and will not longer be exposed in the next major version.\n */\nexport const handleFastifyError = _handleFastifyError;\n"],"names":["_instrumentFastify","shouldHandleError","_handleFastifyError"],"mappings":";;;;;AA0CA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,C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AAA,CAAA,CAAA,CAAoBD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA;AAK1B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,kBAAA,CAAA,CAAA,CAAqBE,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA;;"}
|
|
@@ -1,279 +0,0 @@
|
|
|
1
|
-
import * as diagnosticsChannel from 'node:diagnostics_channel';
|
|
2
|
-
import { HTTP_ROUTE, URL_PATH, HTTP_REQUEST_METHOD, HTTP_RESPONSE_STATUS_CODE, SENTRY_OP } from '@sentry/conventions/attributes';
|
|
3
|
-
import { WEB_SERVER_MIDDLEWARE_SPAN_OP } from '@sentry/conventions/op';
|
|
4
|
-
import { debug, getIsolationScope, startInactiveSpan, withActiveSpan, startSpan, SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN, isObjectLike, SPAN_STATUS_ERROR } from '@sentry/core';
|
|
5
|
-
import { DEBUG_BUILD } from '../../../debug-build.js';
|
|
6
|
-
import { setHttpServerSpanRouteAttribute } from '../../../utils/setHttpServerSpanRouteAttribute.js';
|
|
7
|
-
|
|
8
|
-
const PACKAGE_NAME = "@sentry/instrumentation-fastify";
|
|
9
|
-
const SUPPORTED_VERSIONS = ">=3.21.0 <6";
|
|
10
|
-
const ORIGIN = "auto.http.otel.fastify";
|
|
11
|
-
const HOOK_OP = WEB_SERVER_MIDDLEWARE_SPAN_OP;
|
|
12
|
-
const REQUEST_HANDLER_OP = "handler";
|
|
13
|
-
const FASTIFY_HOOKS = [
|
|
14
|
-
"onRequest",
|
|
15
|
-
"preParsing",
|
|
16
|
-
"preValidation",
|
|
17
|
-
"preHandler",
|
|
18
|
-
"preSerialization",
|
|
19
|
-
"onSend",
|
|
20
|
-
"onResponse",
|
|
21
|
-
"onError"
|
|
22
|
-
];
|
|
23
|
-
const ATTRIBUTE_HOOK_NAME = "hook.name";
|
|
24
|
-
const ATTRIBUTE_FASTIFY_TYPE = "fastify.type";
|
|
25
|
-
const ATTRIBUTE_HOOK_CALLBACK_NAME = "hook.callback.name";
|
|
26
|
-
const ATTRIBUTE_FASTIFY_ROOT = "fastify.root";
|
|
27
|
-
const HOOK_TYPE_ROUTE = "route-hook";
|
|
28
|
-
const HOOK_TYPE_INSTANCE = "hook";
|
|
29
|
-
const HOOK_TYPE_HANDLER = "request-handler";
|
|
30
|
-
const ANONYMOUS_FUNCTION_NAME = "anonymous";
|
|
31
|
-
const kRequestSpan = /* @__PURE__ */ Symbol("sentry fastify request span");
|
|
32
|
-
const kAddHookOriginal = /* @__PURE__ */ Symbol("sentry fastify addHook original");
|
|
33
|
-
const kSetNotFoundOriginal = /* @__PURE__ */ Symbol("sentry fastify setNotFoundHandler original");
|
|
34
|
-
function getRequestRouteUrl(request) {
|
|
35
|
-
return request.routeOptions?.url ?? request.routerPath;
|
|
36
|
-
}
|
|
37
|
-
function getRequestRouteConfig(request) {
|
|
38
|
-
return request.routeOptions?.config ?? request.routeConfig;
|
|
39
|
-
}
|
|
40
|
-
function isFastifyRequest(arg) {
|
|
41
|
-
return isObjectLike(arg) && !!arg.method && !!arg.url && (!!arg.routeOptions || "routerPath" in arg);
|
|
42
|
-
}
|
|
43
|
-
function fastifyOtelPlugin(instance, _opts, done) {
|
|
44
|
-
instance.decorate(kAddHookOriginal, instance.addHook);
|
|
45
|
-
instance.decorate(kSetNotFoundOriginal, instance.setNotFoundHandler);
|
|
46
|
-
instance.decorateRequest("opentelemetry", function opentelemetry() {
|
|
47
|
-
return { span: this[kRequestSpan] };
|
|
48
|
-
});
|
|
49
|
-
instance.decorateRequest(kRequestSpan, null);
|
|
50
|
-
instance.addHook("onRoute", otelWireRoute);
|
|
51
|
-
instance.addHook("onRequest", startRequestSpanHook);
|
|
52
|
-
instance.addHook("onResponse", finalizeNotFoundSpanHook);
|
|
53
|
-
instance.addHook = addHookPatched;
|
|
54
|
-
instance.setNotFoundHandler = setNotFoundHandlerPatched;
|
|
55
|
-
done();
|
|
56
|
-
}
|
|
57
|
-
const pluginSymbols = fastifyOtelPlugin;
|
|
58
|
-
pluginSymbols[/* @__PURE__ */ Symbol.for("skip-override")] = true;
|
|
59
|
-
pluginSymbols[/* @__PURE__ */ Symbol.for("fastify.display-name")] = PACKAGE_NAME;
|
|
60
|
-
pluginSymbols[/* @__PURE__ */ Symbol.for("plugin-meta")] = {
|
|
61
|
-
fastify: SUPPORTED_VERSIONS,
|
|
62
|
-
name: PACKAGE_NAME
|
|
63
|
-
};
|
|
64
|
-
function otelWireRoute(routeOptions) {
|
|
65
|
-
if (routeOptions.config?.otel === false) {
|
|
66
|
-
return;
|
|
67
|
-
}
|
|
68
|
-
for (const hook of FASTIFY_HOOKS) {
|
|
69
|
-
const handlerLike = routeOptions[hook];
|
|
70
|
-
if (typeof handlerLike === "function") {
|
|
71
|
-
routeOptions[hook] = handlerWrapper(
|
|
72
|
-
handlerLike,
|
|
73
|
-
hook,
|
|
74
|
-
routeHookAttributes(this.pluginName, hook, handlerLike, routeOptions.url)
|
|
75
|
-
);
|
|
76
|
-
} else if (Array.isArray(handlerLike)) {
|
|
77
|
-
routeOptions[hook] = handlerLike.map(
|
|
78
|
-
(handler) => handlerWrapper(handler, hook, routeHookAttributes(this.pluginName, hook, handler, routeOptions.url))
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
routeOptions.onSend = appendRouteHook(routeOptions.onSend, finalizeResponseSpanHook);
|
|
83
|
-
routeOptions.onError = appendRouteHook(routeOptions.onError, recordErrorInSpanHook);
|
|
84
|
-
routeOptions.handler = handlerWrapper(routeOptions.handler, "handler", {
|
|
85
|
-
[ATTRIBUTE_HOOK_NAME]: `${this.pluginName} - route-handler`,
|
|
86
|
-
[ATTRIBUTE_FASTIFY_TYPE]: HOOK_TYPE_HANDLER,
|
|
87
|
-
[HTTP_ROUTE]: routeOptions.url,
|
|
88
|
-
[ATTRIBUTE_HOOK_CALLBACK_NAME]: routeOptions.handler.name.length > 0 ? routeOptions.handler.name : ANONYMOUS_FUNCTION_NAME
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
function routeHookAttributes(pluginName, hook, handler, url) {
|
|
92
|
-
return {
|
|
93
|
-
[ATTRIBUTE_HOOK_NAME]: `${pluginName} - route -> ${hook}`,
|
|
94
|
-
[ATTRIBUTE_FASTIFY_TYPE]: HOOK_TYPE_ROUTE,
|
|
95
|
-
[HTTP_ROUTE]: url,
|
|
96
|
-
[ATTRIBUTE_HOOK_CALLBACK_NAME]: handler.name?.length > 0 ? handler.name : ANONYMOUS_FUNCTION_NAME
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
function appendRouteHook(existing, hook) {
|
|
100
|
-
if (existing == null) {
|
|
101
|
-
return hook;
|
|
102
|
-
}
|
|
103
|
-
return Array.isArray(existing) ? [...existing, hook] : [existing, hook];
|
|
104
|
-
}
|
|
105
|
-
function startRequestSpanHook(request, _reply, hookDone) {
|
|
106
|
-
if (getRequestRouteConfig(request)?.otel === false) {
|
|
107
|
-
return hookDone();
|
|
108
|
-
}
|
|
109
|
-
const attributes = {
|
|
110
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN,
|
|
111
|
-
[SENTRY_OP]: REQUEST_HANDLER_OP,
|
|
112
|
-
[ATTRIBUTE_FASTIFY_ROOT]: PACKAGE_NAME,
|
|
113
|
-
[HTTP_REQUEST_METHOD]: request.method,
|
|
114
|
-
[URL_PATH]: request.url
|
|
115
|
-
};
|
|
116
|
-
const route = getRequestRouteUrl(request);
|
|
117
|
-
if (route != null) {
|
|
118
|
-
attributes[HTTP_ROUTE] = route;
|
|
119
|
-
setHttpServerSpanRouteAttribute(route);
|
|
120
|
-
}
|
|
121
|
-
const requestSpan = startInactiveSpan({
|
|
122
|
-
name: route != null ? `${request.method} ${route}` : "request",
|
|
123
|
-
attributes
|
|
124
|
-
});
|
|
125
|
-
request[kRequestSpan] = requestSpan;
|
|
126
|
-
withActiveSpan(requestSpan, () => {
|
|
127
|
-
hookDone();
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
function finalizeNotFoundSpanHook(request, reply, hookDone) {
|
|
131
|
-
const span = request[kRequestSpan];
|
|
132
|
-
if (span != null) {
|
|
133
|
-
span.setAttributes({ [HTTP_RESPONSE_STATUS_CODE]: reply.statusCode });
|
|
134
|
-
span.end();
|
|
135
|
-
}
|
|
136
|
-
request[kRequestSpan] = null;
|
|
137
|
-
hookDone();
|
|
138
|
-
}
|
|
139
|
-
function finalizeResponseSpanHook(request, reply, payload, hookDone) {
|
|
140
|
-
const span = request[kRequestSpan];
|
|
141
|
-
if (span != null) {
|
|
142
|
-
if (reply.statusCode >= 500) {
|
|
143
|
-
span.setStatus({ code: SPAN_STATUS_ERROR });
|
|
144
|
-
}
|
|
145
|
-
span.setAttributes({ [HTTP_RESPONSE_STATUS_CODE]: reply.statusCode });
|
|
146
|
-
span.end();
|
|
147
|
-
}
|
|
148
|
-
request[kRequestSpan] = null;
|
|
149
|
-
hookDone(null, payload);
|
|
150
|
-
}
|
|
151
|
-
function recordErrorInSpanHook(request, _reply, error, hookDone) {
|
|
152
|
-
const span = request[kRequestSpan];
|
|
153
|
-
if (span != null) {
|
|
154
|
-
span.setStatus({ code: SPAN_STATUS_ERROR, message: error.message });
|
|
155
|
-
}
|
|
156
|
-
hookDone();
|
|
157
|
-
}
|
|
158
|
-
function addHookPatched(name, hook) {
|
|
159
|
-
const addHookOriginal = this[kAddHookOriginal];
|
|
160
|
-
if (FASTIFY_HOOKS.includes(name)) {
|
|
161
|
-
return addHookOriginal.call(
|
|
162
|
-
this,
|
|
163
|
-
name,
|
|
164
|
-
handlerWrapper(hook, name, {
|
|
165
|
-
[ATTRIBUTE_HOOK_NAME]: `${this.pluginName} - ${name}`,
|
|
166
|
-
[ATTRIBUTE_FASTIFY_TYPE]: HOOK_TYPE_INSTANCE,
|
|
167
|
-
[ATTRIBUTE_HOOK_CALLBACK_NAME]: hook.name?.length > 0 ? hook.name : ANONYMOUS_FUNCTION_NAME
|
|
168
|
-
})
|
|
169
|
-
);
|
|
170
|
-
}
|
|
171
|
-
return addHookOriginal.call(this, name, hook);
|
|
172
|
-
}
|
|
173
|
-
function setNotFoundHandlerPatched(hooks, handler) {
|
|
174
|
-
const setNotFoundHandlerOriginal = this[kSetNotFoundOriginal];
|
|
175
|
-
if (typeof hooks === "function") {
|
|
176
|
-
setNotFoundHandlerOriginal.call(
|
|
177
|
-
this,
|
|
178
|
-
handlerWrapper(hooks, "notFoundHandler", {
|
|
179
|
-
[ATTRIBUTE_HOOK_NAME]: `${this.pluginName} - not-found-handler`,
|
|
180
|
-
[ATTRIBUTE_FASTIFY_TYPE]: HOOK_TYPE_INSTANCE,
|
|
181
|
-
[ATTRIBUTE_HOOK_CALLBACK_NAME]: hooks.name?.length > 0 ? hooks.name : ANONYMOUS_FUNCTION_NAME
|
|
182
|
-
})
|
|
183
|
-
);
|
|
184
|
-
return;
|
|
185
|
-
}
|
|
186
|
-
if (hooks.preValidation != null) {
|
|
187
|
-
hooks.preValidation = handlerWrapper(hooks.preValidation, "notFoundHandler - preValidation", {
|
|
188
|
-
[ATTRIBUTE_HOOK_NAME]: `${this.pluginName} - not-found-handler - preValidation`,
|
|
189
|
-
[ATTRIBUTE_FASTIFY_TYPE]: HOOK_TYPE_INSTANCE,
|
|
190
|
-
[ATTRIBUTE_HOOK_CALLBACK_NAME]: hooks.preValidation.name?.length > 0 ? hooks.preValidation.name : ANONYMOUS_FUNCTION_NAME
|
|
191
|
-
});
|
|
192
|
-
}
|
|
193
|
-
if (hooks.preHandler != null) {
|
|
194
|
-
hooks.preHandler = handlerWrapper(hooks.preHandler, "notFoundHandler - preHandler", {
|
|
195
|
-
[ATTRIBUTE_HOOK_NAME]: `${this.pluginName} - not-found-handler - preHandler`,
|
|
196
|
-
[ATTRIBUTE_FASTIFY_TYPE]: HOOK_TYPE_INSTANCE,
|
|
197
|
-
[ATTRIBUTE_HOOK_CALLBACK_NAME]: hooks.preHandler.name?.length > 0 ? hooks.preHandler.name : ANONYMOUS_FUNCTION_NAME
|
|
198
|
-
});
|
|
199
|
-
}
|
|
200
|
-
if (handler == null) {
|
|
201
|
-
setNotFoundHandlerOriginal.call(this, hooks);
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
|
-
setNotFoundHandlerOriginal.call(
|
|
205
|
-
this,
|
|
206
|
-
hooks,
|
|
207
|
-
handlerWrapper(handler, "notFoundHandler", {
|
|
208
|
-
[ATTRIBUTE_HOOK_NAME]: `${this.pluginName} - not-found-handler`,
|
|
209
|
-
[ATTRIBUTE_FASTIFY_TYPE]: HOOK_TYPE_INSTANCE,
|
|
210
|
-
[ATTRIBUTE_HOOK_CALLBACK_NAME]: handler.name?.length > 0 ? handler.name : ANONYMOUS_FUNCTION_NAME
|
|
211
|
-
})
|
|
212
|
-
);
|
|
213
|
-
}
|
|
214
|
-
function getRequestFromArgs(args) {
|
|
215
|
-
for (const arg of args) {
|
|
216
|
-
if (isFastifyRequest(arg)) {
|
|
217
|
-
return arg;
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
return null;
|
|
221
|
-
}
|
|
222
|
-
function handlerWrapper(handler, hookName, spanAttributes = {}) {
|
|
223
|
-
return function handlerWrapped(...args) {
|
|
224
|
-
const request = getRequestFromArgs(args);
|
|
225
|
-
if (request === null || getRequestRouteConfig(request)?.otel === false) {
|
|
226
|
-
return handler.call(this, ...args);
|
|
227
|
-
}
|
|
228
|
-
const parentSpan = request[kRequestSpan] ?? void 0;
|
|
229
|
-
const handlerName = handler.name?.length > 0 ? handler.name : this.pluginName ?? ANONYMOUS_FUNCTION_NAME;
|
|
230
|
-
const hookType = spanAttributes[ATTRIBUTE_FASTIFY_TYPE];
|
|
231
|
-
const op = hookType === HOOK_TYPE_INSTANCE ? HOOK_OP : hookType === HOOK_TYPE_HANDLER ? REQUEST_HANDLER_OP : void 0;
|
|
232
|
-
const name = op ? stripFastifyPrefix(spanAttributes[ATTRIBUTE_HOOK_NAME]) : `${hookName} - ${handlerName}`;
|
|
233
|
-
return startSpan(
|
|
234
|
-
{
|
|
235
|
-
name,
|
|
236
|
-
attributes: {
|
|
237
|
-
...spanAttributes,
|
|
238
|
-
[SENTRY_OP]: op,
|
|
239
|
-
[SEMANTIC_ATTRIBUTE_SENTRY_ORIGIN]: ORIGIN
|
|
240
|
-
},
|
|
241
|
-
parentSpan
|
|
242
|
-
},
|
|
243
|
-
() => handler.call(this, ...args)
|
|
244
|
-
);
|
|
245
|
-
};
|
|
246
|
-
}
|
|
247
|
-
function stripFastifyPrefix(hookName = "") {
|
|
248
|
-
return hookName.replace(/^fastify -> /, "").replace(/^@fastify\/otel -> /, "").replace(/^@sentry\/instrumentation-fastify -> /, "");
|
|
249
|
-
}
|
|
250
|
-
function instrumentOnRequest(fastify) {
|
|
251
|
-
fastify.addHook("onRequest", async (request, _reply) => {
|
|
252
|
-
const routeName = getRequestRouteUrl(request);
|
|
253
|
-
const method = request.method || "GET";
|
|
254
|
-
getIsolationScope().setTransactionName(`${method} ${routeName}`);
|
|
255
|
-
});
|
|
256
|
-
}
|
|
257
|
-
let _isInstrumented = false;
|
|
258
|
-
const instrumentFastify = Object.assign(
|
|
259
|
-
function instrumentFastify2() {
|
|
260
|
-
if (_isInstrumented) {
|
|
261
|
-
return;
|
|
262
|
-
}
|
|
263
|
-
_isInstrumented = true;
|
|
264
|
-
diagnosticsChannel.subscribe("fastify.initialization", (message) => {
|
|
265
|
-
const fastifyInstance = message.fastify;
|
|
266
|
-
fastifyInstance?.register(fastifyOtelPlugin).after((err) => {
|
|
267
|
-
if (err) {
|
|
268
|
-
DEBUG_BUILD && debug.error("Failed to setup Fastify instrumentation", err);
|
|
269
|
-
} else if (fastifyInstance) {
|
|
270
|
-
instrumentOnRequest(fastifyInstance);
|
|
271
|
-
}
|
|
272
|
-
});
|
|
273
|
-
});
|
|
274
|
-
},
|
|
275
|
-
{ id: "Fastify.v5" }
|
|
276
|
-
);
|
|
277
|
-
|
|
278
|
-
export { instrumentFastify };
|
|
279
|
-
//# sourceMappingURL=instrumentation.js.map
|