@sentry/server-utils 11.12.0 → 11.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/THIRD-PARTY-LICENSES.txt +94 -94
- package/build/cjs/chunks/config.js +3402 -0
- package/build/cjs/chunks/config.js.map +1 -0
- package/build/cjs/{vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/core-Bd0h-mo3.js → chunks/core-BiWIBBjf.js} +40 -23
- package/build/cjs/chunks/core-BiWIBBjf.js.map +1 -0
- package/build/cjs/chunks/core.js +2 -0
- package/build/cjs/chunks/debug-build.js +15 -0
- package/build/cjs/chunks/debug-build.js.map +1 -0
- package/build/cjs/{vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm → chunks}/esbuild.js +20 -18
- package/build/cjs/chunks/esbuild.js.map +1 -0
- package/build/cjs/chunks/exports.js +7058 -0
- package/build/cjs/chunks/exports.js.map +1 -0
- package/build/cjs/{vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm → chunks}/instrumentation-serde-C-Xxv-jj.js +14 -6
- package/build/cjs/chunks/instrumentation-serde-C-Xxv-jj.js.map +1 -0
- package/build/cjs/chunks/module-details-from-path.js +15969 -0
- package/build/cjs/chunks/module-details-from-path.js.map +1 -0
- package/build/cjs/chunks/moduleInjectedTransform.js +10883 -0
- package/build/cjs/chunks/moduleInjectedTransform.js.map +1 -0
- package/build/cjs/chunks/options.js +66 -0
- package/build/cjs/chunks/options.js.map +1 -0
- package/build/cjs/chunks/pi-ai.js +80 -0
- package/build/cjs/chunks/pi-ai.js.map +1 -0
- package/build/cjs/chunks/registration-only.js +38 -0
- package/build/cjs/chunks/registration-only.js.map +1 -0
- package/build/cjs/chunks/resolve.js +75 -0
- package/build/cjs/chunks/resolve.js.map +1 -0
- package/build/cjs/chunks/rolldown-runtime.js +48 -0
- package/build/cjs/{vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/rollup-DCG8HLmh.js → chunks/rollup-CzqrjlS4.js} +17 -19
- package/build/cjs/chunks/rollup-CzqrjlS4.js.map +1 -0
- package/build/cjs/index.js +10505 -167
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.no-diagnostic-channels.js +30 -53
- package/build/cjs/index.request-handler.js +240 -7
- package/build/cjs/index.request-handler.js.map +1 -1
- package/build/cjs/orchestrion/bundler/bun.js +102 -35
- package/build/cjs/orchestrion/bundler/bun.js.map +1 -1
- package/build/cjs/orchestrion/bundler/esbuild.js +59 -50
- package/build/cjs/orchestrion/bundler/esbuild.js.map +1 -1
- package/build/cjs/orchestrion/bundler/load-hook.js +24 -21
- package/build/cjs/orchestrion/bundler/load-hook.js.map +1 -1
- package/build/cjs/orchestrion/bundler/rollup.js +80 -71
- package/build/cjs/orchestrion/bundler/rollup.js.map +1 -1
- package/build/cjs/orchestrion/bundler/vite.js +212 -165
- package/build/cjs/orchestrion/bundler/vite.js.map +1 -1
- package/build/cjs/orchestrion/bundler/webpack-loader.js +134 -16
- package/build/cjs/orchestrion/bundler/webpack-loader.js.map +1 -1
- package/build/cjs/orchestrion/bundler/webpack.js +157 -77
- package/build/cjs/orchestrion/bundler/webpack.js.map +1 -1
- package/build/cjs/orchestrion/config/index.js +12 -129
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/defineProperty.js +17 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/assertClassBrand.js +9 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/checkPrivateRedeclaration.js +8 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldGet2.js +9 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldInitSpec.js +9 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateFieldSet2.js +9 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/classPrivateMethodInitSpec.js +9 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/defineProperty.js +11 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/toPrimitive.js +13 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/toPropertyKey.js +8 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/esm/typeof.js +10 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/toPrimitive.js +19 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/toPropertyKey.js +15 -0
- package/build/esm/_virtual/_@oxc-project_runtime@0.158.0/helpers/typeof.js +15 -0
- package/build/esm/_virtual/_cjs/require_array_set.js +2 -0
- package/build/esm/_virtual/_cjs/require_astring.js +2 -0
- package/build/esm/_virtual/_cjs/require_base64.js +2 -0
- package/build/esm/_virtual/_cjs/require_base64_vlq.js +2 -0
- package/build/esm/_virtual/_cjs/require_binary_search.js +2 -0
- package/build/esm/_virtual/_cjs/require_esquery_min.js +2 -0
- package/build/esm/_virtual/_cjs/require_mapping_list.js +2 -0
- package/build/esm/_virtual/_cjs/require_meriyah.js +2 -0
- package/build/esm/_virtual/_cjs/require_quick_sort.js +2 -0
- package/build/esm/_virtual/_cjs/require_source_map.js +2 -0
- package/build/esm/_virtual/_cjs/require_source_map_consumer.js +2 -0
- package/build/esm/_virtual/_cjs/require_source_map_generator.js +2 -0
- package/build/esm/_virtual/_cjs/require_source_node.js +2 -0
- package/build/esm/_virtual/_cjs/require_util.js +2 -0
- package/build/esm/_virtual/_rolldown/runtime.js +35 -0
- package/build/esm/ai/anthropic-ai/constants.js +10 -6
- package/build/esm/ai/anthropic-ai/constants.js.map +1 -1
- package/build/esm/ai/anthropic-ai/index.js +183 -199
- package/build/esm/ai/anthropic-ai/index.js.map +1 -1
- package/build/esm/ai/anthropic-ai/streaming.js +176 -140
- package/build/esm/ai/anthropic-ai/streaming.js.map +1 -1
- package/build/esm/ai/anthropic-ai/tool-runner.js +99 -125
- package/build/esm/ai/anthropic-ai/tool-runner.js.map +1 -1
- package/build/esm/ai/anthropic-ai/utils.js +72 -52
- package/build/esm/ai/anthropic-ai/utils.js.map +1 -1
- package/build/esm/ai/core/apiPromise.js +35 -47
- package/build/esm/ai/core/apiPromise.js.map +1 -1
- package/build/esm/ai/core/gen-ai-attributes.js +29 -2
- package/build/esm/ai/core/gen-ai-attributes.js.map +1 -1
- package/build/esm/ai/core/streaming-tool-calls.js +37 -0
- package/build/esm/ai/core/streaming-tool-calls.js.map +1 -0
- package/build/esm/ai/core/utils.js +200 -144
- package/build/esm/ai/core/utils.js.map +1 -1
- package/build/esm/ai/flue/constants.js +31 -6
- package/build/esm/ai/flue/constants.js.map +1 -1
- package/build/esm/ai/flue/index.js +140 -134
- package/build/esm/ai/flue/index.js.map +1 -1
- package/build/esm/ai/flue/utils.js +93 -179
- package/build/esm/ai/flue/utils.js.map +1 -1
- package/build/esm/ai/google-genai/constants.js +16 -8
- package/build/esm/ai/google-genai/constants.js.map +1 -1
- package/build/esm/ai/google-genai/decisions.js +25 -0
- package/build/esm/ai/google-genai/decisions.js.map +1 -0
- package/build/esm/ai/google-genai/index.js +252 -255
- package/build/esm/ai/google-genai/index.js.map +1 -1
- package/build/esm/ai/google-genai/streaming.js +89 -66
- package/build/esm/ai/google-genai/streaming.js.map +1 -1
- package/build/esm/ai/google-genai/utils.js +115 -102
- package/build/esm/ai/google-genai/utils.js.map +1 -1
- package/build/esm/ai/index.js +12 -0
- package/build/esm/ai/langchain/constants.js +9 -8
- package/build/esm/ai/langchain/constants.js.map +1 -1
- package/build/esm/ai/langchain/embeddings.js +83 -67
- package/build/esm/ai/langchain/embeddings.js.map +1 -1
- package/build/esm/ai/langchain/index.js +249 -307
- package/build/esm/ai/langchain/index.js.map +1 -1
- package/build/esm/ai/langchain/typesafe-classifier.js +43 -43
- package/build/esm/ai/langchain/typesafe-classifier.js.map +1 -1
- package/build/esm/ai/langchain/utils.js +323 -288
- package/build/esm/ai/langchain/utils.js.map +1 -1
- package/build/esm/ai/langgraph/agent-span.js +73 -79
- package/build/esm/ai/langgraph/agent-span.js.map +1 -1
- package/build/esm/ai/langgraph/constants.js +3 -2
- package/build/esm/ai/langgraph/constants.js.map +1 -1
- package/build/esm/ai/langgraph/index.js +111 -109
- package/build/esm/ai/langgraph/index.js.map +1 -1
- package/build/esm/ai/langgraph/stream.js +84 -110
- package/build/esm/ai/langgraph/stream.js.map +1 -1
- package/build/esm/ai/langgraph/utils.js +171 -195
- package/build/esm/ai/langgraph/utils.js.map +1 -1
- package/build/esm/ai/mastra/classifier-evaluation.js +25 -18
- package/build/esm/ai/mastra/classifier-evaluation.js.map +1 -1
- package/build/esm/ai/mastra/constants.js +63 -18
- package/build/esm/ai/mastra/constants.js.map +1 -1
- package/build/esm/ai/mastra/index.js +164 -190
- package/build/esm/ai/mastra/index.js.map +1 -1
- package/build/esm/ai/mastra/span-registry.js +17 -8
- package/build/esm/ai/mastra/span-registry.js.map +1 -1
- package/build/esm/ai/mastra/utils.js +110 -137
- package/build/esm/ai/mastra/utils.js.map +1 -1
- package/build/esm/ai/mistral/constants.js +19 -9
- package/build/esm/ai/mistral/constants.js.map +1 -1
- package/build/esm/ai/mistral/index.js +112 -113
- package/build/esm/ai/mistral/index.js.map +1 -1
- package/build/esm/ai/mistral/streaming.js +180 -187
- package/build/esm/ai/mistral/streaming.js.map +1 -1
- package/build/esm/ai/mistral/utils.js +75 -73
- package/build/esm/ai/mistral/utils.js.map +1 -1
- package/build/esm/ai/openai/constants.js +20 -22
- package/build/esm/ai/openai/constants.js.map +1 -1
- package/build/esm/ai/openai/index.js +151 -159
- package/build/esm/ai/openai/index.js.map +1 -1
- package/build/esm/ai/openai/mapping.js +76 -53
- package/build/esm/ai/openai/mapping.js.map +1 -1
- package/build/esm/ai/openai/streaming.js +151 -155
- package/build/esm/ai/openai/streaming.js.map +1 -1
- package/build/esm/ai/openai/utils.js +94 -110
- package/build/esm/ai/openai/utils.js.map +1 -1
- package/build/esm/ai/pi-ai/chat.js +74 -0
- package/build/esm/ai/pi-ai/chat.js.map +1 -0
- package/build/esm/ai/pi-ai/constants.js +6 -0
- package/build/esm/ai/pi-ai/constants.js.map +1 -0
- package/build/esm/ai/pi-ai/messages.js +114 -107
- package/build/esm/ai/pi-ai/messages.js.map +1 -1
- package/build/esm/ai/pi-ai/providers.js +21 -18
- package/build/esm/ai/pi-ai/providers.js.map +1 -1
- package/build/esm/ai/pi-ai/recording.js +28 -0
- package/build/esm/ai/pi-ai/recording.js.map +1 -0
- package/build/esm/ai/pi-ai/usage.js +31 -27
- package/build/esm/ai/pi-ai/usage.js.map +1 -1
- package/build/esm/ai/pi-durable/constants.js +15 -5
- package/build/esm/ai/pi-durable/constants.js.map +1 -1
- package/build/esm/ai/pi-durable/index.js +164 -165
- package/build/esm/ai/pi-durable/index.js.map +1 -1
- package/build/esm/ai/pi-durable/runs.js +134 -136
- package/build/esm/ai/pi-durable/runs.js.map +1 -1
- package/build/esm/ai/pi-durable/tools.js +152 -160
- package/build/esm/ai/pi-durable/tools.js.map +1 -1
- package/build/esm/ai/pi-durable/utils.js +6 -4
- package/build/esm/ai/pi-durable/utils.js.map +1 -1
- package/build/esm/ai/typesafe/constants.js +3 -2
- package/build/esm/ai/typesafe/constants.js.map +1 -1
- package/build/esm/ai/typesafe/index.js +82 -94
- package/build/esm/ai/typesafe/index.js.map +1 -1
- package/build/esm/ai/vercel-ai/index.js +57 -60
- package/build/esm/ai/vercel-ai/index.js.map +1 -1
- package/build/esm/ai/workers-ai/constants.js +15 -2
- package/build/esm/ai/workers-ai/constants.js.map +1 -1
- package/build/esm/ai/workers-ai/index.js +83 -78
- package/build/esm/ai/workers-ai/index.js.map +1 -1
- package/build/esm/ai/workers-ai/streaming.js +133 -141
- package/build/esm/ai/workers-ai/streaming.js.map +1 -1
- package/build/esm/ai/workers-ai/utils.js +131 -143
- package/build/esm/ai/workers-ai/utils.js.map +1 -1
- package/build/esm/async-context.js +74 -63
- package/build/esm/async-context.js.map +1 -1
- package/build/esm/debug-build.js +9 -3
- package/build/esm/debug-build.js.map +1 -1
- package/build/esm/eve.js +61 -22
- package/build/esm/eve.js.map +1 -1
- package/build/esm/exports.js +21 -0
- package/build/esm/index.js +83 -76
- package/build/esm/index.js.map +1 -1
- package/build/esm/index.no-diagnostic-channels.js +21 -20
- package/build/esm/index.request-handler.js +1 -2
- package/build/esm/integrations/amqplib.js +338 -349
- package/build/esm/integrations/amqplib.js.map +1 -1
- package/build/esm/integrations/anthropic.js +154 -120
- package/build/esm/integrations/anthropic.js.map +1 -1
- package/build/esm/integrations/aws-sdk/constants.js +11 -2
- package/build/esm/integrations/aws-sdk/constants.js.map +1 -1
- package/build/esm/integrations/aws-sdk/index.js +118 -134
- package/build/esm/integrations/aws-sdk/index.js.map +1 -1
- package/build/esm/integrations/aws-sdk/services/MessageAttributes.js +30 -31
- package/build/esm/integrations/aws-sdk/services/MessageAttributes.js.map +1 -1
- package/build/esm/integrations/aws-sdk/services/ServicesExtensions.js +38 -44
- package/build/esm/integrations/aws-sdk/services/ServicesExtensions.js.map +1 -1
- package/build/esm/integrations/aws-sdk/services/bedrock-runtime-content.js +144 -0
- package/build/esm/integrations/aws-sdk/services/bedrock-runtime-content.js.map +1 -0
- package/build/esm/integrations/aws-sdk/services/bedrock-runtime.js +316 -454
- package/build/esm/integrations/aws-sdk/services/bedrock-runtime.js.map +1 -1
- package/build/esm/integrations/aws-sdk/services/dynamodb.js +67 -125
- package/build/esm/integrations/aws-sdk/services/dynamodb.js.map +1 -1
- package/build/esm/integrations/aws-sdk/services/index.js +1 -0
- package/build/esm/integrations/aws-sdk/services/kinesis.js +12 -16
- package/build/esm/integrations/aws-sdk/services/kinesis.js.map +1 -1
- package/build/esm/integrations/aws-sdk/services/lambda.js +51 -57
- package/build/esm/integrations/aws-sdk/services/lambda.js.map +1 -1
- package/build/esm/integrations/aws-sdk/services/s3.js +12 -16
- package/build/esm/integrations/aws-sdk/services/s3.js.map +1 -1
- package/build/esm/integrations/aws-sdk/services/secretsmanager.js +16 -22
- package/build/esm/integrations/aws-sdk/services/secretsmanager.js.map +1 -1
- package/build/esm/integrations/aws-sdk/services/sns.js +66 -70
- package/build/esm/integrations/aws-sdk/services/sns.js.map +1 -1
- package/build/esm/integrations/aws-sdk/services/sqs.js +104 -124
- package/build/esm/integrations/aws-sdk/services/sqs.js.map +1 -1
- package/build/esm/integrations/aws-sdk/services/stepfunctions.js +14 -20
- package/build/esm/integrations/aws-sdk/services/stepfunctions.js.map +1 -1
- package/build/esm/integrations/aws-sdk/utils.js +18 -19
- package/build/esm/integrations/aws-sdk/utils.js.map +1 -1
- package/build/esm/integrations/cron.js +33 -35
- package/build/esm/integrations/cron.js.map +1 -1
- package/build/esm/integrations/dataloader.js +101 -93
- package/build/esm/integrations/dataloader.js.map +1 -1
- package/build/esm/integrations/express/error-handled.js +13 -8
- package/build/esm/integrations/express/error-handled.js.map +1 -1
- package/build/esm/integrations/express/error-handler.js +49 -31
- package/build/esm/integrations/express/error-handler.js.map +1 -1
- package/build/esm/integrations/express/index.js +26 -17
- package/build/esm/integrations/express/index.js.map +1 -1
- package/build/esm/integrations/express/instrumentation.js +182 -196
- package/build/esm/integrations/express/instrumentation.js.map +1 -1
- package/build/esm/integrations/express/route.js +70 -45
- package/build/esm/integrations/express/route.js.map +1 -1
- package/build/esm/integrations/express/utils.js +11 -5
- package/build/esm/integrations/express/utils.js.map +1 -1
- package/build/esm/integrations/fastify/errors.js +33 -26
- package/build/esm/integrations/fastify/errors.js.map +1 -1
- package/build/esm/integrations/fastify/index.js +41 -21
- package/build/esm/integrations/fastify/index.js.map +1 -1
- package/build/esm/integrations/fastify/instrumentation.js +188 -208
- package/build/esm/integrations/fastify/instrumentation.js.map +1 -1
- package/build/esm/integrations/fastify/utils.js +21 -15
- package/build/esm/integrations/fastify/utils.js.map +1 -1
- package/build/esm/integrations/firebase/firestore.js +69 -70
- package/build/esm/integrations/firebase/firestore.js.map +1 -1
- package/build/esm/integrations/firebase/functions.js +66 -68
- package/build/esm/integrations/firebase/functions.js.map +1 -1
- package/build/esm/integrations/firebase/index.js +21 -13
- package/build/esm/integrations/firebase/index.js.map +1 -1
- package/build/esm/integrations/firebase/instrumentation.js +86 -47
- package/build/esm/integrations/firebase/instrumentation.js.map +1 -1
- package/build/esm/integrations/flue.js +46 -33
- package/build/esm/integrations/flue.js.map +1 -1
- package/build/esm/integrations/generic-pool.js +30 -27
- package/build/esm/integrations/generic-pool.js.map +1 -1
- package/build/esm/integrations/google-genai.js +93 -87
- package/build/esm/integrations/google-genai.js.map +1 -1
- package/build/esm/integrations/graphql/constants.js +6 -4
- package/build/esm/integrations/graphql/constants.js.map +1 -1
- package/build/esm/integrations/graphql/graphql-dc-subscriber.js +95 -99
- package/build/esm/integrations/graphql/graphql-dc-subscriber.js.map +1 -1
- package/build/esm/integrations/graphql/index.js +38 -47
- package/build/esm/integrations/graphql/index.js.map +1 -1
- package/build/esm/integrations/graphql/resolvers.js +117 -142
- package/build/esm/integrations/graphql/resolvers.js.map +1 -1
- package/build/esm/integrations/graphql/spans.js +110 -93
- package/build/esm/integrations/graphql/spans.js.map +1 -1
- package/build/esm/integrations/graphql/utils.js +84 -79
- package/build/esm/integrations/graphql/utils.js.map +1 -1
- package/build/esm/integrations/groq.js +22 -16
- package/build/esm/integrations/groq.js.map +1 -1
- package/build/esm/integrations/hapi/hapi-error-handler.js +47 -38
- package/build/esm/integrations/hapi/hapi-error-handler.js.map +1 -1
- package/build/esm/integrations/hapi/hapi-types.js +20 -13
- package/build/esm/integrations/hapi/hapi-types.js.map +1 -1
- package/build/esm/integrations/hapi/hapi-utils.js +165 -166
- package/build/esm/integrations/hapi/hapi-utils.js.map +1 -1
- package/build/esm/integrations/hapi/index.js +53 -64
- package/build/esm/integrations/hapi/index.js.map +1 -1
- package/build/esm/integrations/hono/applyPatches.js +43 -26
- package/build/esm/integrations/hono/applyPatches.js.map +1 -1
- package/build/esm/integrations/hono/connInfo.js +39 -30
- package/build/esm/integrations/hono/connInfo.js.map +1 -1
- package/build/esm/integrations/hono/constants.js +3 -2
- package/build/esm/integrations/hono/constants.js.map +1 -1
- package/build/esm/integrations/hono/createHonoMiddleware.js +59 -36
- package/build/esm/integrations/hono/createHonoMiddleware.js.map +1 -1
- package/build/esm/integrations/hono/defaultShouldHandleError.js +17 -9
- package/build/esm/integrations/hono/defaultShouldHandleError.js.map +1 -1
- package/build/esm/integrations/hono/hono-context.js +13 -9
- package/build/esm/integrations/hono/hono-context.js.map +1 -1
- package/build/esm/integrations/hono/honoIntegration.js +114 -78
- package/build/esm/integrations/hono/honoIntegration.js.map +1 -1
- package/build/esm/integrations/hono/index.js +3 -0
- package/build/esm/integrations/hono/isMiddleware.js +26 -13
- package/build/esm/integrations/hono/isMiddleware.js.map +1 -1
- package/build/esm/integrations/hono/matchResult.js +59 -64
- package/build/esm/integrations/hono/matchResult.js.map +1 -1
- package/build/esm/integrations/hono/middlewareHandlers.js +88 -82
- package/build/esm/integrations/hono/middlewareHandlers.js.map +1 -1
- package/build/esm/integrations/hono/patchAppRequest.js +77 -62
- package/build/esm/integrations/hono/patchAppRequest.js.map +1 -1
- package/build/esm/integrations/hono/patchAppUse.js +71 -56
- package/build/esm/integrations/hono/patchAppUse.js.map +1 -1
- package/build/esm/integrations/hono/patchRoute.js +73 -59
- package/build/esm/integrations/hono/patchRoute.js.map +1 -1
- package/build/esm/integrations/hono/resolveRouteName.js +19 -22
- package/build/esm/integrations/hono/resolveRouteName.js.map +1 -1
- package/build/esm/integrations/hono/sentryOriginalTraps.js +23 -16
- package/build/esm/integrations/hono/sentryOriginalTraps.js.map +1 -1
- package/build/esm/integrations/hono/wrapMiddlewareSpan.js +45 -42
- package/build/esm/integrations/hono/wrapMiddlewareSpan.js.map +1 -1
- package/build/esm/integrations/index.js +92 -85
- package/build/esm/integrations/index.js.map +1 -1
- package/build/esm/integrations/kafkajs/consumer.js +58 -60
- package/build/esm/integrations/kafkajs/consumer.js.map +1 -1
- package/build/esm/integrations/kafkajs/index.js +53 -57
- package/build/esm/integrations/kafkajs/index.js.map +1 -1
- package/build/esm/integrations/kafkajs/semconv.js +4 -2
- package/build/esm/integrations/kafkajs/semconv.js.map +1 -1
- package/build/esm/integrations/kafkajs/spans.js +107 -101
- package/build/esm/integrations/kafkajs/spans.js.map +1 -1
- package/build/esm/integrations/knex.js +133 -157
- package/build/esm/integrations/knex.js.map +1 -1
- package/build/esm/integrations/koa/index.js +122 -133
- package/build/esm/integrations/koa/index.js.map +1 -1
- package/build/esm/integrations/koa/koa-error-handler.js +43 -25
- package/build/esm/integrations/koa/koa-error-handler.js.map +1 -1
- package/build/esm/integrations/langchain.js +66 -75
- package/build/esm/integrations/langchain.js.map +1 -1
- package/build/esm/integrations/langgraph.js +55 -61
- package/build/esm/integrations/langgraph.js.map +1 -1
- package/build/esm/integrations/lru-memoizer.js +22 -20
- package/build/esm/integrations/lru-memoizer.js.map +1 -1
- package/build/esm/integrations/mastra-classifier.js +47 -50
- package/build/esm/integrations/mastra-classifier.js.map +1 -1
- package/build/esm/integrations/mastra.js +208 -209
- package/build/esm/integrations/mastra.js.map +1 -1
- package/build/esm/integrations/mcp-server.js +28 -28
- package/build/esm/integrations/mcp-server.js.map +1 -1
- package/build/esm/integrations/mistral.js +74 -56
- package/build/esm/integrations/mistral.js.map +1 -1
- package/build/esm/integrations/mongodb/index.js +101 -76
- package/build/esm/integrations/mongodb/index.js.map +1 -1
- package/build/esm/integrations/mongodb/mongodb-span.js +110 -106
- package/build/esm/integrations/mongodb/mongodb-span.js.map +1 -1
- package/build/esm/integrations/mongoose/index.js +82 -89
- package/build/esm/integrations/mongoose/index.js.map +1 -1
- package/build/esm/integrations/mongoose/mongoose-dc-subscriber.js +85 -72
- package/build/esm/integrations/mongoose/mongoose-dc-subscriber.js.map +1 -1
- package/build/esm/integrations/mongoose/mongoose-legacy-span.js +39 -36
- package/build/esm/integrations/mongoose/mongoose-legacy-span.js.map +1 -1
- package/build/esm/integrations/mysql.js +74 -83
- package/build/esm/integrations/mysql.js.map +1 -1
- package/build/esm/integrations/mysql2/index.js +86 -61
- package/build/esm/integrations/mysql2/index.js.map +1 -1
- package/build/esm/integrations/mysql2/mysql2-dc-subscriber.js +51 -38
- package/build/esm/integrations/mysql2/mysql2-dc-subscriber.js.map +1 -1
- package/build/esm/integrations/neon.js +84 -86
- package/build/esm/integrations/neon.js.map +1 -1
- package/build/esm/integrations/nitro/captureStorageEvents.js +97 -111
- package/build/esm/integrations/nitro/captureStorageEvents.js.map +1 -1
- package/build/esm/integrations/nitro/captureTracingEvents.js +139 -181
- package/build/esm/integrations/nitro/captureTracingEvents.js.map +1 -1
- package/build/esm/integrations/nitro/index.js +26 -20
- package/build/esm/integrations/nitro/index.js.map +1 -1
- package/build/esm/integrations/nitro/setServerTimingHeaders.js +31 -33
- package/build/esm/integrations/nitro/setServerTimingHeaders.js.map +1 -1
- package/build/esm/integrations/node-cron.js +54 -48
- package/build/esm/integrations/node-cron.js.map +1 -1
- package/build/esm/integrations/node-schedule.js +45 -51
- package/build/esm/integrations/node-schedule.js.map +1 -1
- package/build/esm/integrations/openai-compatible.js +84 -79
- package/build/esm/integrations/openai-compatible.js.map +1 -1
- package/build/esm/integrations/openai.js +85 -75
- package/build/esm/integrations/openai.js.map +1 -1
- package/build/esm/integrations/pg.js +147 -130
- package/build/esm/integrations/pg.js.map +1 -1
- package/build/esm/integrations/pi-ai.js +69 -0
- package/build/esm/integrations/pi-ai.js.map +1 -0
- package/build/esm/integrations/pi-durable.js +46 -42
- package/build/esm/integrations/pi-durable.js.map +1 -1
- package/build/esm/integrations/postgresjs/index.js +124 -126
- package/build/esm/integrations/postgresjs/index.js.map +1 -1
- package/build/esm/integrations/postgresjs/postgresjs-dc-subscriber.js +72 -64
- package/build/esm/integrations/postgresjs/postgresjs-dc-subscriber.js.map +1 -1
- package/build/esm/integrations/postgresjs-wrapper.js +232 -187
- package/build/esm/integrations/postgresjs-wrapper.js.map +1 -1
- package/build/esm/integrations/prisma/global.js +6 -5
- package/build/esm/integrations/prisma/global.js.map +1 -1
- package/build/esm/integrations/prisma/index.js +44 -26
- package/build/esm/integrations/prisma/index.js.map +1 -1
- package/build/esm/integrations/prisma/orchestrion.js +96 -115
- package/build/esm/integrations/prisma/orchestrion.js.map +1 -1
- package/build/esm/integrations/prisma/tracing-helper.js +192 -208
- package/build/esm/integrations/prisma/tracing-helper.js.map +1 -1
- package/build/esm/integrations/redis/index.js +173 -190
- package/build/esm/integrations/redis/index.js.map +1 -1
- package/build/esm/integrations/redis/ioredis-channel-subscriber.js +78 -72
- package/build/esm/integrations/redis/ioredis-channel-subscriber.js.map +1 -1
- package/build/esm/integrations/redis/redis-cache.js +110 -111
- package/build/esm/integrations/redis/redis-cache.js.map +1 -1
- package/build/esm/integrations/redis/redis-dc-subscriber.js +79 -84
- package/build/esm/integrations/redis/redis-dc-subscriber.js.map +1 -1
- package/build/esm/integrations/redis/redis-span-name.js +31 -21
- package/build/esm/integrations/redis/redis-span-name.js.map +1 -1
- package/build/esm/integrations/redis/redis-statement-serializer.js +38 -27
- package/build/esm/integrations/redis/redis-statement-serializer.js.map +1 -1
- package/build/esm/integrations/serveTunnel.js +30 -24
- package/build/esm/integrations/serveTunnel.js.map +1 -1
- package/build/esm/integrations/tedious.js +132 -132
- package/build/esm/integrations/tedious.js.map +1 -1
- package/build/esm/integrations/together-ai.js +22 -16
- package/build/esm/integrations/together-ai.js.map +1 -1
- package/build/esm/integrations/typesafe.js +32 -37
- package/build/esm/integrations/typesafe.js.map +1 -1
- package/build/esm/integrations/vercel-ai/gen-ai-recording-mode.js +20 -4
- package/build/esm/integrations/vercel-ai/gen-ai-recording-mode.js.map +1 -1
- package/build/esm/integrations/vercel-ai/index.js +29 -26
- package/build/esm/integrations/vercel-ai/index.js.map +1 -1
- package/build/esm/integrations/vercel-ai/util.js +86 -92
- package/build/esm/integrations/vercel-ai/util.js.map +1 -1
- package/build/esm/integrations/vercel-ai/vercel-ai-dc-subscriber.js +515 -514
- package/build/esm/integrations/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -1
- package/build/esm/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.js +386 -361
- package/build/esm/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.js.map +1 -1
- package/build/esm/integrations/vercel-ai/vercel-ai-tool-telemetry.js +61 -34
- package/build/esm/integrations/vercel-ai/vercel-ai-tool-telemetry.js.map +1 -1
- package/build/esm/opentelemetry.js +70 -35
- package/build/esm/opentelemetry.js.map +1 -1
- package/build/esm/orchestrion/bundler/bun.js +42 -32
- package/build/esm/orchestrion/bundler/bun.js.map +1 -1
- package/build/esm/orchestrion/bundler/esbuild.js +57 -47
- package/build/esm/orchestrion/bundler/esbuild.js.map +1 -1
- package/build/esm/orchestrion/bundler/externalRequire.js +65 -62
- package/build/esm/orchestrion/bundler/externalRequire.js.map +1 -1
- package/build/esm/orchestrion/bundler/load-hook.js +23 -19
- package/build/esm/orchestrion/bundler/load-hook.js.map +1 -1
- package/build/esm/orchestrion/bundler/moduleInjectedTransform.js +119 -44
- package/build/esm/orchestrion/bundler/moduleInjectedTransform.js.map +1 -1
- package/build/esm/orchestrion/bundler/options.js +42 -13
- package/build/esm/orchestrion/bundler/options.js.map +1 -1
- package/build/esm/orchestrion/bundler/resolve.js +43 -13
- package/build/esm/orchestrion/bundler/resolve.js.map +1 -1
- package/build/esm/orchestrion/bundler/rollup.js +79 -68
- package/build/esm/orchestrion/bundler/rollup.js.map +1 -1
- package/build/esm/orchestrion/bundler/vite.js +122 -160
- package/build/esm/orchestrion/bundler/vite.js.map +1 -1
- package/build/esm/orchestrion/bundler/webpack-loader.js +18 -14
- package/build/esm/orchestrion/bundler/webpack-loader.js.map +1 -1
- package/build/esm/orchestrion/bundler/webpack.js +57 -71
- package/build/esm/orchestrion/bundler/webpack.js.map +1 -1
- package/build/esm/orchestrion/channels.js +105 -87
- package/build/esm/orchestrion/channels.js.map +1 -1
- package/build/esm/orchestrion/config/amqplib.js +152 -83
- package/build/esm/orchestrion/config/amqplib.js.map +1 -1
- package/build/esm/orchestrion/config/anthropic-ai.js +96 -43
- package/build/esm/orchestrion/config/anthropic-ai.js.map +1 -1
- package/build/esm/orchestrion/config/aws-sdk.js +46 -22
- package/build/esm/orchestrion/config/aws-sdk.js.map +1 -1
- package/build/esm/orchestrion/config/channel-integration-definitions.js +193 -51
- package/build/esm/orchestrion/config/channel-integration-definitions.js.map +1 -1
- package/build/esm/orchestrion/config/cron.js +27 -18
- package/build/esm/orchestrion/config/cron.js.map +1 -1
- package/build/esm/orchestrion/config/dataloader.js +62 -45
- package/build/esm/orchestrion/config/dataloader.js.map +1 -1
- package/build/esm/orchestrion/config/express.js +80 -71
- package/build/esm/orchestrion/config/express.js.map +1 -1
- package/build/esm/orchestrion/config/firebase.js +133 -70
- package/build/esm/orchestrion/config/firebase.js.map +1 -1
- package/build/esm/orchestrion/config/flue.js +15 -7
- package/build/esm/orchestrion/config/flue.js.map +1 -1
- package/build/esm/orchestrion/config/generic-pool.js +29 -19
- package/build/esm/orchestrion/config/generic-pool.js.map +1 -1
- package/build/esm/orchestrion/config/google-genai.js +64 -33
- package/build/esm/orchestrion/config/google-genai.js.map +1 -1
- package/build/esm/orchestrion/config/graphql.js +43 -22
- package/build/esm/orchestrion/config/graphql.js.map +1 -1
- package/build/esm/orchestrion/config/groq.js +9 -9
- package/build/esm/orchestrion/config/groq.js.map +1 -1
- package/build/esm/orchestrion/config/hapi.js +56 -38
- package/build/esm/orchestrion/config/hapi.js.map +1 -1
- package/build/esm/orchestrion/config/hono.js +23 -26
- package/build/esm/orchestrion/config/hono.js.map +1 -1
- package/build/esm/orchestrion/config/index.js +177 -111
- package/build/esm/orchestrion/config/index.js.map +1 -1
- package/build/esm/orchestrion/config/ioredis.js +65 -31
- package/build/esm/orchestrion/config/ioredis.js.map +1 -1
- package/build/esm/orchestrion/config/kafkajs.js +29 -26
- package/build/esm/orchestrion/config/kafkajs.js.map +1 -1
- package/build/esm/orchestrion/config/knex.js +57 -29
- package/build/esm/orchestrion/config/knex.js.map +1 -1
- package/build/esm/orchestrion/config/koa.js +31 -24
- package/build/esm/orchestrion/config/koa.js.map +1 -1
- package/build/esm/orchestrion/config/langchain.js +78 -49
- package/build/esm/orchestrion/config/langchain.js.map +1 -1
- package/build/esm/orchestrion/config/langgraph.js +25 -20
- package/build/esm/orchestrion/config/langgraph.js.map +1 -1
- package/build/esm/orchestrion/config/lru-memoizer.js +17 -15
- package/build/esm/orchestrion/config/lru-memoizer.js.map +1 -1
- package/build/esm/orchestrion/config/mastra.js +44 -44
- package/build/esm/orchestrion/config/mastra.js.map +1 -1
- package/build/esm/orchestrion/config/mcp-server.js +24 -32
- package/build/esm/orchestrion/config/mcp-server.js.map +1 -1
- package/build/esm/orchestrion/config/mistral.js +87 -47
- package/build/esm/orchestrion/config/mistral.js.map +1 -1
- package/build/esm/orchestrion/config/module-names.js +9 -3
- package/build/esm/orchestrion/config/module-names.js.map +1 -1
- package/build/esm/orchestrion/config/mongodb.js +101 -61
- package/build/esm/orchestrion/config/mongodb.js.map +1 -1
- package/build/esm/orchestrion/config/mongoose.js +131 -100
- package/build/esm/orchestrion/config/mongoose.js.map +1 -1
- package/build/esm/orchestrion/config/mysql.js +17 -14
- package/build/esm/orchestrion/config/mysql.js.map +1 -1
- package/build/esm/orchestrion/config/mysql2.js +64 -28
- package/build/esm/orchestrion/config/mysql2.js.map +1 -1
- package/build/esm/orchestrion/config/neon.js +33 -36
- package/build/esm/orchestrion/config/neon.js.map +1 -1
- package/build/esm/orchestrion/config/nestjs.js +151 -120
- package/build/esm/orchestrion/config/nestjs.js.map +1 -1
- package/build/esm/orchestrion/config/nitro.js +25 -7
- package/build/esm/orchestrion/config/nitro.js.map +1 -1
- package/build/esm/orchestrion/config/node-cron.js +74 -43
- package/build/esm/orchestrion/config/node-cron.js.map +1 -1
- package/build/esm/orchestrion/config/node-schedule.js +26 -21
- package/build/esm/orchestrion/config/node-schedule.js.map +1 -1
- package/build/esm/orchestrion/config/openai-compatible.js +42 -15
- package/build/esm/orchestrion/config/openai-compatible.js.map +1 -1
- package/build/esm/orchestrion/config/openai.js +72 -39
- package/build/esm/orchestrion/config/openai.js.map +1 -1
- package/build/esm/orchestrion/config/pg.js +70 -45
- package/build/esm/orchestrion/config/pg.js.map +1 -1
- package/build/esm/orchestrion/config/pi-ai.js +49 -0
- package/build/esm/orchestrion/config/pi-ai.js.map +1 -0
- package/build/esm/orchestrion/config/pi-durable.js +36 -26
- package/build/esm/orchestrion/config/pi-durable.js.map +1 -1
- package/build/esm/orchestrion/config/postgres.js +63 -48
- package/build/esm/orchestrion/config/postgres.js.map +1 -1
- package/build/esm/orchestrion/config/prisma.js +46 -36
- package/build/esm/orchestrion/config/prisma.js.map +1 -1
- package/build/esm/orchestrion/config/redis.js +133 -72
- package/build/esm/orchestrion/config/redis.js.map +1 -1
- package/build/esm/orchestrion/config/registration-only.js +23 -8
- package/build/esm/orchestrion/config/registration-only.js.map +1 -1
- package/build/esm/orchestrion/config/remix-v3.js +68 -47
- package/build/esm/orchestrion/config/remix-v3.js.map +1 -1
- package/build/esm/orchestrion/config/remix.js +77 -45
- package/build/esm/orchestrion/config/remix.js.map +1 -1
- package/build/esm/orchestrion/config/tedious.js +31 -16
- package/build/esm/orchestrion/config/tedious.js.map +1 -1
- package/build/esm/orchestrion/config/together-ai.js +17 -15
- package/build/esm/orchestrion/config/together-ai.js.map +1 -1
- package/build/esm/orchestrion/config/typesafe.js +16 -10
- package/build/esm/orchestrion/config/typesafe.js.map +1 -1
- package/build/esm/orchestrion/config/vercel-ai.js +54 -44
- package/build/esm/orchestrion/config/vercel-ai.js.map +1 -1
- package/build/esm/orchestrion/detect.js +50 -34
- package/build/esm/orchestrion/detect.js.map +1 -1
- package/build/esm/orchestrion/instrumentation.js +90 -70
- package/build/esm/orchestrion/instrumentation.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/tracing-channel.js +143 -135
- package/build/esm/tracing-channel.js.map +1 -1
- package/build/esm/utils/cronMonitoring.js +237 -132
- package/build/esm/utils/cronMonitoring.js.map +1 -1
- package/build/esm/utils/diagnosticsChannel.js +26 -21
- package/build/esm/utils/diagnosticsChannel.js.map +1 -1
- package/build/esm/utils/moduleInjected.js +35 -13
- package/build/esm/utils/moduleInjected.js.map +1 -1
- package/build/esm/utils/monitorStream.js +52 -58
- package/build/esm/utils/monitorStream.js.map +1 -1
- package/build/esm/utils/runtime.js +10 -8
- package/build/esm/utils/runtime.js.map +1 -1
- package/build/esm/utils/setHttpServerSpanRouteAttribute.js +22 -21
- package/build/esm/utils/setHttpServerSpanRouteAttribute.js.map +1 -1
- package/build/esm/utils/sql.js +260 -225
- package/build/esm/utils/sql.js.map +1 -1
- package/build/esm/utils/tunnelServer.js +27 -23
- package/build/esm/utils/tunnelServer.js.map +1 -1
- package/build/esm/utils/withCleanScopes.js +17 -12
- package/build/esm/utils/withCleanScopes.js.map +1 -1
- package/build/esm/utils/wrapServerRequestHandler.js +180 -208
- package/build/esm/utils/wrapServerRequestHandler.js.map +1 -1
- package/build/esm/vendored/@apm-js-collab/code-transformer/index.js +9 -5
- package/build/esm/vendored/@apm-js-collab/code-transformer/index.js.map +1 -1
- package/build/esm/vendored/@apm-js-collab/code-transformer/lib/index.js +21 -9
- package/build/esm/vendored/@apm-js-collab/code-transformer/lib/index.js.map +1 -1
- package/build/esm/vendored/@apm-js-collab/code-transformer/lib/matcher.js +80 -83
- package/build/esm/vendored/@apm-js-collab/code-transformer/lib/matcher.js.map +1 -1
- package/build/esm/vendored/@apm-js-collab/code-transformer/lib/transformer.js +289 -313
- package/build/esm/vendored/@apm-js-collab/code-transformer/lib/transformer.js.map +1 -1
- package/build/esm/vendored/@apm-js-collab/code-transformer/lib/transforms.js +488 -284
- package/build/esm/vendored/@apm-js-collab/code-transformer/lib/transforms.js.map +1 -1
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/bun.js +5 -6
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/bun.js.map +1 -1
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/{core-Bd0h-mo3.js → core-BiWIBBjf.js} +15 -14
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/core-BiWIBBjf.js.map +1 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/core.js +3 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/esbuild.js +6 -7
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/esbuild.js.map +1 -1
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/instrumentation-serde-C-Xxv-jj.js +3 -3
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/instrumentation-serde-C-Xxv-jj.js.map +1 -1
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/{rollup-DCG8HLmh.js → rollup-CzqrjlS4.js} +8 -13
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/rollup-CzqrjlS4.js.map +1 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/rollup.js +1 -0
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/vite.js +4 -5
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/vite.js.map +1 -1
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack-loader-factory.js +13 -12
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack-loader-factory.js.map +1 -1
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack.js +7 -8
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack.js.map +1 -1
- package/build/esm/vendored/astring/dist/astring.js +910 -1065
- package/build/esm/vendored/astring/dist/astring.js.map +1 -1
- package/build/esm/vendored/esquery/dist/esquery.min.js +1312 -0
- package/build/esm/vendored/esquery/dist/esquery.min.js.map +1 -0
- package/build/esm/vendored/meriyah/dist/meriyah.js +10539 -9189
- package/build/esm/vendored/meriyah/dist/meriyah.js.map +1 -1
- package/build/esm/vendored/meriyah/dist/meriyah2.js +10122 -8806
- package/build/esm/vendored/meriyah/dist/meriyah2.js.map +1 -1
- package/build/esm/vendored/module-details-from-path/index.js +31 -40
- package/build/esm/vendored/module-details-from-path/index.js.map +1 -1
- package/build/esm/vendored/semifies/index.js +106 -108
- package/build/esm/vendored/semifies/index.js.map +1 -1
- package/build/esm/vendored/source-map/lib/array-set.js +100 -70
- package/build/esm/vendored/source-map/lib/array-set.js.map +1 -1
- package/build/esm/vendored/source-map/lib/base64-vlq.js +71 -54
- package/build/esm/vendored/source-map/lib/base64-vlq.js.map +1 -1
- package/build/esm/vendored/source-map/lib/base64.js +38 -39
- package/build/esm/vendored/source-map/lib/base64.js.map +1 -1
- package/build/esm/vendored/source-map/lib/binary-search.js +61 -50
- package/build/esm/vendored/source-map/lib/binary-search.js.map +1 -1
- package/build/esm/vendored/source-map/lib/mapping-list.js +75 -39
- package/build/esm/vendored/source-map/lib/mapping-list.js.map +1 -1
- package/build/esm/vendored/source-map/lib/quick-sort.js +73 -33
- package/build/esm/vendored/source-map/lib/quick-sort.js.map +1 -1
- package/build/esm/vendored/source-map/lib/source-map-consumer.js +763 -609
- package/build/esm/vendored/source-map/lib/source-map-consumer.js.map +1 -1
- package/build/esm/vendored/source-map/lib/source-map-generator.js +281 -282
- package/build/esm/vendored/source-map/lib/source-map-generator.js.map +1 -1
- package/build/esm/vendored/source-map/lib/source-node.js +294 -267
- package/build/esm/vendored/source-map/lib/source-node.js.map +1 -1
- package/build/esm/vendored/source-map/lib/util.js +241 -252
- package/build/esm/vendored/source-map/lib/util.js.map +1 -1
- package/build/esm/vendored/source-map/source-map.js +17 -13
- package/build/esm/vendored/source-map/source-map.js.map +1 -1
- package/build/types/ai/anthropic-ai/index.d.ts +1 -1
- package/build/types/ai/anthropic-ai/index.d.ts.map +1 -1
- package/build/types/ai/anthropic-ai/streaming.d.ts +2 -1
- package/build/types/ai/anthropic-ai/streaming.d.ts.map +1 -1
- package/build/types/ai/anthropic-ai/utils.d.ts +7 -2
- package/build/types/ai/anthropic-ai/utils.d.ts.map +1 -1
- package/build/types/ai/core/streaming-tool-calls.d.ts +19 -0
- package/build/types/ai/core/streaming-tool-calls.d.ts.map +1 -0
- package/build/types/ai/core/utils.d.ts +18 -1
- package/build/types/ai/core/utils.d.ts.map +1 -1
- package/build/types/ai/flue/constants.d.ts +5 -7
- package/build/types/ai/flue/constants.d.ts.map +1 -1
- package/build/types/ai/flue/index.d.ts +7 -4
- package/build/types/ai/flue/index.d.ts.map +1 -1
- package/build/types/ai/flue/types.d.ts +1 -38
- package/build/types/ai/flue/types.d.ts.map +1 -1
- package/build/types/ai/flue/utils.d.ts +1 -13
- package/build/types/ai/flue/utils.d.ts.map +1 -1
- package/build/types/ai/google-genai/constants.d.ts +3 -0
- package/build/types/ai/google-genai/constants.d.ts.map +1 -1
- package/build/types/ai/google-genai/decisions.d.ts +8 -0
- package/build/types/ai/google-genai/decisions.d.ts.map +1 -0
- package/build/types/ai/google-genai/index.d.ts +7 -1
- package/build/types/ai/google-genai/index.d.ts.map +1 -1
- package/build/types/ai/google-genai/streaming.d.ts.map +1 -1
- package/build/types/ai/mistral/index.d.ts.map +1 -1
- package/build/types/ai/mistral/streaming.d.ts +1 -1
- package/build/types/ai/mistral/streaming.d.ts.map +1 -1
- package/build/types/ai/mistral/utils.d.ts +5 -0
- package/build/types/ai/mistral/utils.d.ts.map +1 -1
- package/build/types/ai/openai/index.d.ts.map +1 -1
- package/build/types/ai/openai/streaming.d.ts.map +1 -1
- package/build/types/ai/pi-ai/chat.d.ts +20 -0
- package/build/types/ai/pi-ai/chat.d.ts.map +1 -0
- package/build/types/ai/pi-ai/constants.d.ts +3 -0
- package/build/types/ai/pi-ai/constants.d.ts.map +1 -0
- package/build/types/ai/pi-ai/providers.d.ts +9 -6
- package/build/types/ai/pi-ai/providers.d.ts.map +1 -1
- package/build/types/ai/pi-ai/recording.d.ts +15 -0
- package/build/types/ai/pi-ai/recording.d.ts.map +1 -0
- package/build/types/ai/pi-ai/types.d.ts +31 -0
- package/build/types/ai/pi-ai/types.d.ts.map +1 -0
- package/build/types/ai/pi-durable/index.d.ts +5 -5
- package/build/types/ai/pi-durable/index.d.ts.map +1 -1
- package/build/types/ai/pi-durable/types.d.ts +3 -43
- package/build/types/ai/pi-durable/types.d.ts.map +1 -1
- package/build/types/ai/vercel-ai/index.d.ts.map +1 -1
- package/build/types/ai/vercel-ai/vercel-ai-attributes.d.ts +3 -0
- package/build/types/ai/vercel-ai/vercel-ai-attributes.d.ts.map +1 -1
- package/build/types/ai/workers-ai/index.d.ts.map +1 -1
- package/build/types/ai/workers-ai/streaming.d.ts +1 -1
- package/build/types/ai/workers-ai/streaming.d.ts.map +1 -1
- package/build/types/ai/workers-ai/types.d.ts +13 -0
- package/build/types/ai/workers-ai/types.d.ts.map +1 -1
- package/build/types/ai/workers-ai/utils.d.ts.map +1 -1
- package/build/types/eve.d.ts +13 -0
- package/build/types/eve.d.ts.map +1 -1
- package/build/types/index.d.ts +5 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/anthropic.d.ts.map +1 -1
- package/build/types/integrations/aws-sdk/index.d.ts +3 -1
- package/build/types/integrations/aws-sdk/index.d.ts.map +1 -1
- package/build/types/integrations/aws-sdk/services/ServicesExtensions.d.ts +2 -0
- package/build/types/integrations/aws-sdk/services/ServicesExtensions.d.ts.map +1 -1
- package/build/types/integrations/aws-sdk/services/bedrock-runtime-content.d.ts +30 -0
- package/build/types/integrations/aws-sdk/services/bedrock-runtime-content.d.ts.map +1 -0
- package/build/types/integrations/aws-sdk/services/bedrock-runtime.d.ts +5 -0
- package/build/types/integrations/aws-sdk/services/bedrock-runtime.d.ts.map +1 -1
- package/build/types/integrations/cron.d.ts.map +1 -1
- package/build/types/integrations/flue.d.ts.map +1 -1
- package/build/types/integrations/google-genai.d.ts +3 -3
- package/build/types/integrations/google-genai.d.ts.map +1 -1
- package/build/types/integrations/index.d.ts.map +1 -1
- package/build/types/integrations/mistral.d.ts.map +1 -1
- package/build/types/integrations/nitro/captureStorageEvents.d.ts.map +1 -1
- package/build/types/integrations/nitro/captureTracingEvents.d.ts.map +1 -1
- package/build/types/integrations/nitro/setServerTimingHeaders.d.ts.map +1 -1
- package/build/types/integrations/node-cron.d.ts +1 -1
- package/build/types/integrations/node-cron.d.ts.map +1 -1
- package/build/types/integrations/node-schedule.d.ts.map +1 -1
- package/build/types/integrations/openai-compatible.d.ts.map +1 -1
- package/build/types/integrations/openai.d.ts.map +1 -1
- package/build/types/integrations/pi-ai.d.ts +19 -0
- package/build/types/integrations/pi-ai.d.ts.map +1 -0
- package/build/types/integrations/pi-durable.d.ts +3 -4
- package/build/types/integrations/pi-durable.d.ts.map +1 -1
- package/build/types/integrations/vercel-ai/gen-ai-recording-mode.d.ts +5 -1
- package/build/types/integrations/vercel-ai/gen-ai-recording-mode.d.ts.map +1 -1
- package/build/types/integrations/vercel-ai/vercel-ai-dc-subscriber.d.ts +6 -4
- package/build/types/integrations/vercel-ai/vercel-ai-dc-subscriber.d.ts.map +1 -1
- package/build/types/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.d.ts.map +1 -1
- package/build/types/integrations/vercel-ai/vercel-ai-tool-telemetry.d.ts +3 -3
- package/build/types/integrations/vercel-ai/vercel-ai-tool-telemetry.d.ts.map +1 -1
- package/build/types/orchestrion/bundler/moduleInjectedTransform.d.ts +5 -1
- package/build/types/orchestrion/bundler/moduleInjectedTransform.d.ts.map +1 -1
- package/build/types/orchestrion/bundler/options.d.ts +6 -0
- package/build/types/orchestrion/bundler/options.d.ts.map +1 -1
- package/build/types/orchestrion/bundler/rollup.d.ts +3 -3
- package/build/types/orchestrion/bundler/rollup.d.ts.map +1 -1
- package/build/types/orchestrion/channels.d.ts +5 -0
- package/build/types/orchestrion/channels.d.ts.map +1 -1
- package/build/types/orchestrion/config/anthropic-ai.d.ts +1 -0
- package/build/types/orchestrion/config/anthropic-ai.d.ts.map +1 -1
- package/build/types/orchestrion/config/channel-integration-definitions.d.ts +3 -0
- package/build/types/orchestrion/config/channel-integration-definitions.d.ts.map +1 -1
- package/build/types/orchestrion/config/flue.d.ts +1 -1
- package/build/types/orchestrion/config/google-genai.d.ts +13 -0
- package/build/types/orchestrion/config/google-genai.d.ts.map +1 -1
- package/build/types/orchestrion/config/index.d.ts.map +1 -1
- package/build/types/orchestrion/config/pi-ai.d.ts +8 -0
- package/build/types/orchestrion/config/pi-ai.d.ts.map +1 -0
- package/build/types/orchestrion/config/vercel-ai.d.ts +1 -0
- package/build/types/orchestrion/config/vercel-ai.d.ts.map +1 -1
- package/build/types/utils/cronMonitoring.d.ts +4 -5
- package/build/types/utils/cronMonitoring.d.ts.map +1 -1
- package/build/types/utils/wrapServerRequestHandler.d.ts +5 -0
- package/build/types/utils/wrapServerRequestHandler.d.ts.map +1 -1
- package/package.json +9 -12
- package/build/cjs/_virtual/_commonjsHelpers.js +0 -8
- package/build/cjs/_virtual/_commonjsHelpers.js.map +0 -1
- package/build/cjs/_virtual/array-set.js +0 -6
- package/build/cjs/_virtual/array-set.js.map +0 -1
- package/build/cjs/_virtual/astring.js +0 -6
- package/build/cjs/_virtual/astring.js.map +0 -1
- package/build/cjs/_virtual/base64-vlq.js +0 -6
- package/build/cjs/_virtual/base64-vlq.js.map +0 -1
- package/build/cjs/_virtual/base64.js +0 -6
- package/build/cjs/_virtual/base64.js.map +0 -1
- package/build/cjs/_virtual/binary-search.js +0 -6
- package/build/cjs/_virtual/binary-search.js.map +0 -1
- package/build/cjs/_virtual/mapping-list.js +0 -6
- package/build/cjs/_virtual/mapping-list.js.map +0 -1
- package/build/cjs/_virtual/meriyah.js +0 -6
- package/build/cjs/_virtual/meriyah.js.map +0 -1
- package/build/cjs/_virtual/quick-sort.js +0 -6
- package/build/cjs/_virtual/quick-sort.js.map +0 -1
- package/build/cjs/_virtual/source-map-consumer.js +0 -6
- package/build/cjs/_virtual/source-map-consumer.js.map +0 -1
- package/build/cjs/_virtual/source-map-generator.js +0 -6
- package/build/cjs/_virtual/source-map-generator.js.map +0 -1
- package/build/cjs/_virtual/source-map.js +0 -6
- package/build/cjs/_virtual/source-map.js.map +0 -1
- package/build/cjs/_virtual/source-node.js +0 -6
- package/build/cjs/_virtual/source-node.js.map +0 -1
- package/build/cjs/_virtual/util.js +0 -6
- package/build/cjs/_virtual/util.js.map +0 -1
- package/build/cjs/ai/anthropic-ai/constants.js +0 -15
- package/build/cjs/ai/anthropic-ai/constants.js.map +0 -1
- package/build/cjs/ai/anthropic-ai/index.js +0 -225
- package/build/cjs/ai/anthropic-ai/index.js.map +0 -1
- package/build/cjs/ai/anthropic-ai/streaming.js +0 -161
- package/build/cjs/ai/anthropic-ai/streaming.js.map +0 -1
- package/build/cjs/ai/anthropic-ai/tool-runner.js +0 -148
- package/build/cjs/ai/anthropic-ai/tool-runner.js.map +0 -1
- package/build/cjs/ai/anthropic-ai/utils.js +0 -69
- package/build/cjs/ai/anthropic-ai/utils.js.map +0 -1
- package/build/cjs/ai/core/apiPromise.js +0 -54
- package/build/cjs/ai/core/apiPromise.js.map +0 -1
- package/build/cjs/ai/core/gen-ai-attributes.js +0 -14
- package/build/cjs/ai/core/gen-ai-attributes.js.map +0 -1
- package/build/cjs/ai/core/utils.js +0 -182
- package/build/cjs/ai/core/utils.js.map +0 -1
- package/build/cjs/ai/flue/constants.js +0 -20
- package/build/cjs/ai/flue/constants.js.map +0 -1
- package/build/cjs/ai/flue/index.js +0 -141
- package/build/cjs/ai/flue/index.js.map +0 -1
- package/build/cjs/ai/flue/utils.js +0 -200
- package/build/cjs/ai/flue/utils.js.map +0 -1
- package/build/cjs/ai/google-genai/constants.js +0 -17
- package/build/cjs/ai/google-genai/constants.js.map +0 -1
- package/build/cjs/ai/google-genai/index.js +0 -280
- package/build/cjs/ai/google-genai/index.js.map +0 -1
- package/build/cjs/ai/google-genai/streaming.js +0 -79
- package/build/cjs/ai/google-genai/streaming.js.map +0 -1
- package/build/cjs/ai/google-genai/utils.js +0 -131
- package/build/cjs/ai/google-genai/utils.js.map +0 -1
- package/build/cjs/ai/langchain/constants.js +0 -19
- package/build/cjs/ai/langchain/constants.js.map +0 -1
- package/build/cjs/ai/langchain/embeddings.js +0 -82
- package/build/cjs/ai/langchain/embeddings.js.map +0 -1
- package/build/cjs/ai/langchain/index.js +0 -312
- package/build/cjs/ai/langchain/index.js.map +0 -1
- package/build/cjs/ai/langchain/typesafe-classifier.js +0 -62
- package/build/cjs/ai/langchain/typesafe-classifier.js.map +0 -1
- package/build/cjs/ai/langchain/utils.js +0 -355
- package/build/cjs/ai/langchain/utils.js.map +0 -1
- package/build/cjs/ai/langgraph/agent-span.js +0 -94
- package/build/cjs/ai/langgraph/agent-span.js.map +0 -1
- package/build/cjs/ai/langgraph/constants.js +0 -8
- package/build/cjs/ai/langgraph/constants.js.map +0 -1
- package/build/cjs/ai/langgraph/index.js +0 -134
- package/build/cjs/ai/langgraph/index.js.map +0 -1
- package/build/cjs/ai/langgraph/stream.js +0 -117
- package/build/cjs/ai/langgraph/stream.js.map +0 -1
- package/build/cjs/ai/langgraph/utils.js +0 -221
- package/build/cjs/ai/langgraph/utils.js.map +0 -1
- package/build/cjs/ai/mastra/classifier-evaluation.js +0 -30
- package/build/cjs/ai/mastra/classifier-evaluation.js.map +0 -1
- package/build/cjs/ai/mastra/constants.js +0 -41
- package/build/cjs/ai/mastra/constants.js.map +0 -1
- package/build/cjs/ai/mastra/index.js +0 -195
- package/build/cjs/ai/mastra/index.js.map +0 -1
- package/build/cjs/ai/mastra/span-registry.js +0 -20
- package/build/cjs/ai/mastra/span-registry.js.map +0 -1
- package/build/cjs/ai/mastra/utils.js +0 -177
- package/build/cjs/ai/mastra/utils.js.map +0 -1
- package/build/cjs/ai/mistral/constants.js +0 -20
- package/build/cjs/ai/mistral/constants.js.map +0 -1
- package/build/cjs/ai/mistral/index.js +0 -130
- package/build/cjs/ai/mistral/index.js.map +0 -1
- package/build/cjs/ai/mistral/streaming.js +0 -208
- package/build/cjs/ai/mistral/streaming.js.map +0 -1
- package/build/cjs/ai/mistral/utils.js +0 -87
- package/build/cjs/ai/mistral/utils.js.map +0 -1
- package/build/cjs/ai/openai/constants.js +0 -35
- package/build/cjs/ai/openai/constants.js.map +0 -1
- package/build/cjs/ai/openai/index.js +0 -176
- package/build/cjs/ai/openai/index.js.map +0 -1
- package/build/cjs/ai/openai/mapping.js +0 -67
- package/build/cjs/ai/openai/mapping.js.map +0 -1
- package/build/cjs/ai/openai/streaming.js +0 -166
- package/build/cjs/ai/openai/streaming.js.map +0 -1
- package/build/cjs/ai/openai/utils.js +0 -128
- package/build/cjs/ai/openai/utils.js.map +0 -1
- package/build/cjs/ai/pi-ai/messages.js +0 -135
- package/build/cjs/ai/pi-ai/messages.js.map +0 -1
- package/build/cjs/ai/pi-ai/providers.js +0 -22
- package/build/cjs/ai/pi-ai/providers.js.map +0 -1
- package/build/cjs/ai/pi-ai/usage.js +0 -34
- package/build/cjs/ai/pi-ai/usage.js.map +0 -1
- package/build/cjs/ai/pi-durable/constants.js +0 -22
- package/build/cjs/ai/pi-durable/constants.js.map +0 -1
- package/build/cjs/ai/pi-durable/index.js +0 -176
- package/build/cjs/ai/pi-durable/index.js.map +0 -1
- package/build/cjs/ai/pi-durable/models.js +0 -140
- package/build/cjs/ai/pi-durable/models.js.map +0 -1
- package/build/cjs/ai/pi-durable/runs.js +0 -159
- package/build/cjs/ai/pi-durable/runs.js.map +0 -1
- package/build/cjs/ai/pi-durable/tools.js +0 -178
- package/build/cjs/ai/pi-durable/tools.js.map +0 -1
- package/build/cjs/ai/pi-durable/utils.js +0 -9
- package/build/cjs/ai/pi-durable/utils.js.map +0 -1
- package/build/cjs/ai/typesafe/constants.js +0 -10
- package/build/cjs/ai/typesafe/constants.js.map +0 -1
- package/build/cjs/ai/typesafe/index.js +0 -112
- package/build/cjs/ai/typesafe/index.js.map +0 -1
- package/build/cjs/ai/vercel-ai/index.js +0 -70
- package/build/cjs/ai/vercel-ai/index.js.map +0 -1
- package/build/cjs/ai/workers-ai/constants.js +0 -10
- package/build/cjs/ai/workers-ai/constants.js.map +0 -1
- package/build/cjs/ai/workers-ai/index.js +0 -85
- package/build/cjs/ai/workers-ai/index.js.map +0 -1
- package/build/cjs/ai/workers-ai/streaming.js +0 -149
- package/build/cjs/ai/workers-ai/streaming.js.map +0 -1
- package/build/cjs/ai/workers-ai/utils.js +0 -166
- package/build/cjs/ai/workers-ai/utils.js.map +0 -1
- package/build/cjs/async-context.js +0 -68
- package/build/cjs/async-context.js.map +0 -1
- package/build/cjs/debug-build.js +0 -6
- package/build/cjs/debug-build.js.map +0 -1
- package/build/cjs/eve.js +0 -30
- package/build/cjs/eve.js.map +0 -1
- package/build/cjs/index.no-diagnostic-channels.js.map +0 -1
- package/build/cjs/integrations/amqplib.js +0 -417
- package/build/cjs/integrations/amqplib.js.map +0 -1
- package/build/cjs/integrations/anthropic.js +0 -145
- package/build/cjs/integrations/anthropic.js.map +0 -1
- package/build/cjs/integrations/aws-sdk/constants.js +0 -16
- package/build/cjs/integrations/aws-sdk/constants.js.map +0 -1
- package/build/cjs/integrations/aws-sdk/index.js +0 -146
- package/build/cjs/integrations/aws-sdk/index.js.map +0 -1
- package/build/cjs/integrations/aws-sdk/services/MessageAttributes.js +0 -46
- package/build/cjs/integrations/aws-sdk/services/MessageAttributes.js.map +0 -1
- package/build/cjs/integrations/aws-sdk/services/ServicesExtensions.js +0 -47
- package/build/cjs/integrations/aws-sdk/services/ServicesExtensions.js.map +0 -1
- package/build/cjs/integrations/aws-sdk/services/bedrock-runtime.js +0 -477
- package/build/cjs/integrations/aws-sdk/services/bedrock-runtime.js.map +0 -1
- package/build/cjs/integrations/aws-sdk/services/dynamodb.js +0 -130
- package/build/cjs/integrations/aws-sdk/services/dynamodb.js.map +0 -1
- package/build/cjs/integrations/aws-sdk/services/kinesis.js +0 -19
- package/build/cjs/integrations/aws-sdk/services/kinesis.js.map +0 -1
- package/build/cjs/integrations/aws-sdk/services/lambda.js +0 -63
- package/build/cjs/integrations/aws-sdk/services/lambda.js.map +0 -1
- package/build/cjs/integrations/aws-sdk/services/s3.js +0 -19
- package/build/cjs/integrations/aws-sdk/services/s3.js.map +0 -1
- package/build/cjs/integrations/aws-sdk/services/secretsmanager.js +0 -25
- package/build/cjs/integrations/aws-sdk/services/secretsmanager.js.map +0 -1
- package/build/cjs/integrations/aws-sdk/services/sns.js +0 -79
- package/build/cjs/integrations/aws-sdk/services/sns.js.map +0 -1
- package/build/cjs/integrations/aws-sdk/services/sqs.js +0 -135
- package/build/cjs/integrations/aws-sdk/services/sqs.js.map +0 -1
- package/build/cjs/integrations/aws-sdk/services/stepfunctions.js +0 -23
- package/build/cjs/integrations/aws-sdk/services/stepfunctions.js.map +0 -1
- package/build/cjs/integrations/aws-sdk/utils.js +0 -30
- package/build/cjs/integrations/aws-sdk/utils.js.map +0 -1
- package/build/cjs/integrations/cron.js +0 -49
- package/build/cjs/integrations/cron.js.map +0 -1
- package/build/cjs/integrations/dataloader.js +0 -118
- package/build/cjs/integrations/dataloader.js.map +0 -1
- package/build/cjs/integrations/express/error-handled.js +0 -17
- package/build/cjs/integrations/express/error-handled.js.map +0 -1
- package/build/cjs/integrations/express/error-handler.js +0 -43
- package/build/cjs/integrations/express/error-handler.js.map +0 -1
- package/build/cjs/integrations/express/index.js +0 -24
- package/build/cjs/integrations/express/index.js.map +0 -1
- package/build/cjs/integrations/express/instrumentation.js +0 -222
- package/build/cjs/integrations/express/instrumentation.js.map +0 -1
- package/build/cjs/integrations/express/route.js +0 -76
- package/build/cjs/integrations/express/route.js.map +0 -1
- package/build/cjs/integrations/express/utils.js +0 -12
- package/build/cjs/integrations/express/utils.js.map +0 -1
- package/build/cjs/integrations/fastify/errors.js +0 -36
- package/build/cjs/integrations/fastify/errors.js.map +0 -1
- package/build/cjs/integrations/fastify/index.js +0 -28
- package/build/cjs/integrations/fastify/index.js.map +0 -1
- package/build/cjs/integrations/fastify/instrumentation.js +0 -252
- package/build/cjs/integrations/fastify/instrumentation.js.map +0 -1
- package/build/cjs/integrations/fastify/utils.js +0 -26
- package/build/cjs/integrations/fastify/utils.js.map +0 -1
- package/build/cjs/integrations/firebase/firestore.js +0 -93
- package/build/cjs/integrations/firebase/firestore.js.map +0 -1
- package/build/cjs/integrations/firebase/functions.js +0 -79
- package/build/cjs/integrations/firebase/functions.js.map +0 -1
- package/build/cjs/integrations/firebase/index.js +0 -20
- package/build/cjs/integrations/firebase/index.js.map +0 -1
- package/build/cjs/integrations/firebase/instrumentation.js +0 -56
- package/build/cjs/integrations/firebase/instrumentation.js.map +0 -1
- package/build/cjs/integrations/flue.js +0 -40
- package/build/cjs/integrations/flue.js.map +0 -1
- package/build/cjs/integrations/generic-pool.js +0 -36
- package/build/cjs/integrations/generic-pool.js.map +0 -1
- package/build/cjs/integrations/google-genai.js +0 -105
- package/build/cjs/integrations/google-genai.js.map +0 -1
- package/build/cjs/integrations/graphql/constants.js +0 -36
- package/build/cjs/integrations/graphql/constants.js.map +0 -1
- package/build/cjs/integrations/graphql/graphql-dc-subscriber.js +0 -122
- package/build/cjs/integrations/graphql/graphql-dc-subscriber.js.map +0 -1
- package/build/cjs/integrations/graphql/index.js +0 -60
- package/build/cjs/integrations/graphql/index.js.map +0 -1
- package/build/cjs/integrations/graphql/resolvers.js +0 -175
- package/build/cjs/integrations/graphql/resolvers.js.map +0 -1
- package/build/cjs/integrations/graphql/spans.js +0 -114
- package/build/cjs/integrations/graphql/spans.js.map +0 -1
- package/build/cjs/integrations/graphql/utils.js +0 -98
- package/build/cjs/integrations/graphql/utils.js.map +0 -1
- package/build/cjs/integrations/groq.js +0 -21
- package/build/cjs/integrations/groq.js.map +0 -1
- package/build/cjs/integrations/hapi/hapi-error-handler.js +0 -46
- package/build/cjs/integrations/hapi/hapi-error-handler.js.map +0 -1
- package/build/cjs/integrations/hapi/hapi-types.js +0 -23
- package/build/cjs/integrations/hapi/hapi-types.js.map +0 -1
- package/build/cjs/integrations/hapi/hapi-utils.js +0 -202
- package/build/cjs/integrations/hapi/hapi-utils.js.map +0 -1
- package/build/cjs/integrations/hapi/index.js +0 -73
- package/build/cjs/integrations/hapi/index.js.map +0 -1
- package/build/cjs/integrations/hono/applyPatches.js +0 -38
- package/build/cjs/integrations/hono/applyPatches.js.map +0 -1
- package/build/cjs/integrations/hono/connInfo.js +0 -37
- package/build/cjs/integrations/hono/connInfo.js.map +0 -1
- package/build/cjs/integrations/hono/constants.js +0 -8
- package/build/cjs/integrations/hono/constants.js.map +0 -1
- package/build/cjs/integrations/hono/createHonoMiddleware.js +0 -43
- package/build/cjs/integrations/hono/createHonoMiddleware.js.map +0 -1
- package/build/cjs/integrations/hono/defaultShouldHandleError.js +0 -14
- package/build/cjs/integrations/hono/defaultShouldHandleError.js.map +0 -1
- package/build/cjs/integrations/hono/hono-context.js +0 -14
- package/build/cjs/integrations/hono/hono-context.js.map +0 -1
- package/build/cjs/integrations/hono/honoIntegration.js +0 -98
- package/build/cjs/integrations/hono/honoIntegration.js.map +0 -1
- package/build/cjs/integrations/hono/isMiddleware.js +0 -22
- package/build/cjs/integrations/hono/isMiddleware.js.map +0 -1
- package/build/cjs/integrations/hono/matchResult.js +0 -85
- package/build/cjs/integrations/hono/matchResult.js.map +0 -1
- package/build/cjs/integrations/hono/middlewareHandlers.js +0 -101
- package/build/cjs/integrations/hono/middlewareHandlers.js.map +0 -1
- package/build/cjs/integrations/hono/patchAppRequest.js +0 -78
- package/build/cjs/integrations/hono/patchAppRequest.js.map +0 -1
- package/build/cjs/integrations/hono/patchAppUse.js +0 -70
- package/build/cjs/integrations/hono/patchAppUse.js.map +0 -1
- package/build/cjs/integrations/hono/patchRoute.js +0 -69
- package/build/cjs/integrations/hono/patchRoute.js.map +0 -1
- package/build/cjs/integrations/hono/resolveRouteName.js +0 -29
- package/build/cjs/integrations/hono/resolveRouteName.js.map +0 -1
- package/build/cjs/integrations/hono/sentryOriginalTraps.js +0 -21
- package/build/cjs/integrations/hono/sentryOriginalTraps.js.map +0 -1
- package/build/cjs/integrations/hono/wrapMiddlewareSpan.js +0 -48
- package/build/cjs/integrations/hono/wrapMiddlewareSpan.js.map +0 -1
- package/build/cjs/integrations/index.js +0 -93
- package/build/cjs/integrations/index.js.map +0 -1
- package/build/cjs/integrations/kafkajs/consumer.js +0 -71
- package/build/cjs/integrations/kafkajs/consumer.js.map +0 -1
- package/build/cjs/integrations/kafkajs/index.js +0 -70
- package/build/cjs/integrations/kafkajs/index.js.map +0 -1
- package/build/cjs/integrations/kafkajs/semconv.js +0 -14
- package/build/cjs/integrations/kafkajs/semconv.js.map +0 -1
- package/build/cjs/integrations/kafkajs/spans.js +0 -127
- package/build/cjs/integrations/kafkajs/spans.js.map +0 -1
- package/build/cjs/integrations/knex.js +0 -187
- package/build/cjs/integrations/knex.js.map +0 -1
- package/build/cjs/integrations/koa/index.js +0 -155
- package/build/cjs/integrations/koa/index.js.map +0 -1
- package/build/cjs/integrations/koa/koa-error-handler.js +0 -33
- package/build/cjs/integrations/koa/koa-error-handler.js.map +0 -1
- package/build/cjs/integrations/langchain.js +0 -92
- package/build/cjs/integrations/langchain.js.map +0 -1
- package/build/cjs/integrations/langgraph.js +0 -73
- package/build/cjs/integrations/langgraph.js.map +0 -1
- package/build/cjs/integrations/lru-memoizer.js +0 -29
- package/build/cjs/integrations/lru-memoizer.js.map +0 -1
- package/build/cjs/integrations/mastra-classifier.js +0 -57
- package/build/cjs/integrations/mastra-classifier.js.map +0 -1
- package/build/cjs/integrations/mastra.js +0 -247
- package/build/cjs/integrations/mastra.js.map +0 -1
- package/build/cjs/integrations/mcp-server.js +0 -37
- package/build/cjs/integrations/mcp-server.js.map +0 -1
- package/build/cjs/integrations/mistral.js +0 -69
- package/build/cjs/integrations/mistral.js.map +0 -1
- package/build/cjs/integrations/mongodb/index.js +0 -94
- package/build/cjs/integrations/mongodb/index.js.map +0 -1
- package/build/cjs/integrations/mongodb/mongodb-span.js +0 -135
- package/build/cjs/integrations/mongodb/mongodb-span.js.map +0 -1
- package/build/cjs/integrations/mongoose/index.js +0 -109
- package/build/cjs/integrations/mongoose/index.js.map +0 -1
- package/build/cjs/integrations/mongoose/mongoose-dc-subscriber.js +0 -101
- package/build/cjs/integrations/mongoose/mongoose-dc-subscriber.js.map +0 -1
- package/build/cjs/integrations/mongoose/mongoose-legacy-span.js +0 -41
- package/build/cjs/integrations/mongoose/mongoose-legacy-span.js.map +0 -1
- package/build/cjs/integrations/mysql.js +0 -101
- package/build/cjs/integrations/mysql.js.map +0 -1
- package/build/cjs/integrations/mysql2/index.js +0 -80
- package/build/cjs/integrations/mysql2/index.js.map +0 -1
- package/build/cjs/integrations/mysql2/mysql2-dc-subscriber.js +0 -57
- package/build/cjs/integrations/mysql2/mysql2-dc-subscriber.js.map +0 -1
- package/build/cjs/integrations/neon.js +0 -107
- package/build/cjs/integrations/neon.js.map +0 -1
- package/build/cjs/integrations/nitro/captureStorageEvents.js +0 -132
- package/build/cjs/integrations/nitro/captureStorageEvents.js.map +0 -1
- package/build/cjs/integrations/nitro/captureTracingEvents.js +0 -202
- package/build/cjs/integrations/nitro/captureTracingEvents.js.map +0 -1
- package/build/cjs/integrations/nitro/index.js +0 -27
- package/build/cjs/integrations/nitro/index.js.map +0 -1
- package/build/cjs/integrations/nitro/setServerTimingHeaders.js +0 -40
- package/build/cjs/integrations/nitro/setServerTimingHeaders.js.map +0 -1
- package/build/cjs/integrations/node-cron.js +0 -68
- package/build/cjs/integrations/node-cron.js.map +0 -1
- package/build/cjs/integrations/node-schedule.js +0 -76
- package/build/cjs/integrations/node-schedule.js.map +0 -1
- package/build/cjs/integrations/openai-compatible.js +0 -90
- package/build/cjs/integrations/openai-compatible.js.map +0 -1
- package/build/cjs/integrations/openai.js +0 -93
- package/build/cjs/integrations/openai.js.map +0 -1
- package/build/cjs/integrations/pg.js +0 -171
- package/build/cjs/integrations/pg.js.map +0 -1
- package/build/cjs/integrations/pi-durable.js +0 -50
- package/build/cjs/integrations/pi-durable.js.map +0 -1
- package/build/cjs/integrations/postgresjs/index.js +0 -147
- package/build/cjs/integrations/postgresjs/index.js.map +0 -1
- package/build/cjs/integrations/postgresjs/postgresjs-dc-subscriber.js +0 -81
- package/build/cjs/integrations/postgresjs/postgresjs-dc-subscriber.js.map +0 -1
- package/build/cjs/integrations/postgresjs-wrapper.js +0 -219
- package/build/cjs/integrations/postgresjs-wrapper.js.map +0 -1
- package/build/cjs/integrations/prisma/global.js +0 -14
- package/build/cjs/integrations/prisma/global.js.map +0 -1
- package/build/cjs/integrations/prisma/index.js +0 -36
- package/build/cjs/integrations/prisma/index.js.map +0 -1
- package/build/cjs/integrations/prisma/orchestrion.js +0 -137
- package/build/cjs/integrations/prisma/orchestrion.js.map +0 -1
- package/build/cjs/integrations/prisma/tracing-helper.js +0 -241
- package/build/cjs/integrations/prisma/tracing-helper.js.map +0 -1
- package/build/cjs/integrations/redis/index.js +0 -223
- package/build/cjs/integrations/redis/index.js.map +0 -1
- package/build/cjs/integrations/redis/ioredis-channel-subscriber.js +0 -87
- package/build/cjs/integrations/redis/ioredis-channel-subscriber.js.map +0 -1
- package/build/cjs/integrations/redis/redis-cache.js +0 -144
- package/build/cjs/integrations/redis/redis-cache.js.map +0 -1
- package/build/cjs/integrations/redis/redis-dc-subscriber.js +0 -107
- package/build/cjs/integrations/redis/redis-dc-subscriber.js.map +0 -1
- package/build/cjs/integrations/redis/redis-span-name.js +0 -32
- package/build/cjs/integrations/redis/redis-span-name.js.map +0 -1
- package/build/cjs/integrations/redis/redis-statement-serializer.js +0 -34
- package/build/cjs/integrations/redis/redis-statement-serializer.js.map +0 -1
- package/build/cjs/integrations/serveTunnel.js +0 -33
- package/build/cjs/integrations/serveTunnel.js.map +0 -1
- package/build/cjs/integrations/tedious.js +0 -160
- package/build/cjs/integrations/tedious.js.map +0 -1
- package/build/cjs/integrations/together-ai.js +0 -19
- package/build/cjs/integrations/together-ai.js.map +0 -1
- package/build/cjs/integrations/typesafe.js +0 -45
- package/build/cjs/integrations/typesafe.js.map +0 -1
- package/build/cjs/integrations/vercel-ai/gen-ai-recording-mode.js +0 -13
- package/build/cjs/integrations/vercel-ai/gen-ai-recording-mode.js.map +0 -1
- package/build/cjs/integrations/vercel-ai/index.js +0 -34
- package/build/cjs/integrations/vercel-ai/index.js.map +0 -1
- package/build/cjs/integrations/vercel-ai/util.js +0 -108
- package/build/cjs/integrations/vercel-ai/util.js.map +0 -1
- package/build/cjs/integrations/vercel-ai/vercel-ai-dc-subscriber.js +0 -589
- package/build/cjs/integrations/vercel-ai/vercel-ai-dc-subscriber.js.map +0 -1
- package/build/cjs/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.js +0 -409
- package/build/cjs/integrations/vercel-ai/vercel-ai-orchestrion-subscriber.js.map +0 -1
- package/build/cjs/integrations/vercel-ai/vercel-ai-tool-telemetry.js +0 -40
- package/build/cjs/integrations/vercel-ai/vercel-ai-tool-telemetry.js.map +0 -1
- package/build/cjs/opentelemetry.js +0 -45
- package/build/cjs/opentelemetry.js.map +0 -1
- package/build/cjs/orchestrion/bundler/externalRequire.js +0 -82
- package/build/cjs/orchestrion/bundler/externalRequire.js.map +0 -1
- package/build/cjs/orchestrion/bundler/moduleInjectedTransform.js +0 -55
- package/build/cjs/orchestrion/bundler/moduleInjectedTransform.js.map +0 -1
- package/build/cjs/orchestrion/bundler/options.js +0 -25
- package/build/cjs/orchestrion/bundler/options.js.map +0 -1
- package/build/cjs/orchestrion/bundler/resolve.js +0 -27
- package/build/cjs/orchestrion/bundler/resolve.js.map +0 -1
- package/build/cjs/orchestrion/channels.js +0 -92
- package/build/cjs/orchestrion/channels.js.map +0 -1
- package/build/cjs/orchestrion/config/amqplib.js +0 -93
- package/build/cjs/orchestrion/config/amqplib.js.map +0 -1
- package/build/cjs/orchestrion/config/anthropic-ai.js +0 -53
- package/build/cjs/orchestrion/config/anthropic-ai.js.map +0 -1
- package/build/cjs/orchestrion/config/aws-sdk.js +0 -32
- package/build/cjs/orchestrion/config/aws-sdk.js.map +0 -1
- package/build/cjs/orchestrion/config/channel-integration-definitions.js +0 -59
- package/build/cjs/orchestrion/config/channel-integration-definitions.js.map +0 -1
- package/build/cjs/orchestrion/config/cron.js +0 -26
- package/build/cjs/orchestrion/config/cron.js.map +0 -1
- package/build/cjs/orchestrion/config/dataloader.js +0 -53
- package/build/cjs/orchestrion/config/dataloader.js.map +0 -1
- package/build/cjs/orchestrion/config/express.js +0 -81
- package/build/cjs/orchestrion/config/express.js.map +0 -1
- package/build/cjs/orchestrion/config/firebase.js +0 -85
- package/build/cjs/orchestrion/config/firebase.js.map +0 -1
- package/build/cjs/orchestrion/config/flue.js +0 -10
- package/build/cjs/orchestrion/config/flue.js.map +0 -1
- package/build/cjs/orchestrion/config/generic-pool.js +0 -25
- package/build/cjs/orchestrion/config/generic-pool.js.map +0 -1
- package/build/cjs/orchestrion/config/google-genai.js +0 -43
- package/build/cjs/orchestrion/config/google-genai.js.map +0 -1
- package/build/cjs/orchestrion/config/graphql.js +0 -32
- package/build/cjs/orchestrion/config/graphql.js.map +0 -1
- package/build/cjs/orchestrion/config/groq.js +0 -19
- package/build/cjs/orchestrion/config/groq.js.map +0 -1
- package/build/cjs/orchestrion/config/hapi.js +0 -48
- package/build/cjs/orchestrion/config/hapi.js.map +0 -1
- package/build/cjs/orchestrion/config/hono.js +0 -34
- package/build/cjs/orchestrion/config/hono.js.map +0 -1
- package/build/cjs/orchestrion/config/index.js.map +0 -1
- package/build/cjs/orchestrion/config/ioredis.js +0 -41
- package/build/cjs/orchestrion/config/ioredis.js.map +0 -1
- package/build/cjs/orchestrion/config/kafkajs.js +0 -34
- package/build/cjs/orchestrion/config/kafkajs.js.map +0 -1
- package/build/cjs/orchestrion/config/knex.js +0 -43
- package/build/cjs/orchestrion/config/knex.js.map +0 -1
- package/build/cjs/orchestrion/config/koa.js +0 -32
- package/build/cjs/orchestrion/config/koa.js.map +0 -1
- package/build/cjs/orchestrion/config/langchain.js +0 -66
- package/build/cjs/orchestrion/config/langchain.js.map +0 -1
- package/build/cjs/orchestrion/config/langgraph.js +0 -32
- package/build/cjs/orchestrion/config/langgraph.js.map +0 -1
- package/build/cjs/orchestrion/config/lru-memoizer.js +0 -21
- package/build/cjs/orchestrion/config/lru-memoizer.js.map +0 -1
- package/build/cjs/orchestrion/config/mastra.js +0 -54
- package/build/cjs/orchestrion/config/mastra.js.map +0 -1
- package/build/cjs/orchestrion/config/mcp-server.js +0 -41
- package/build/cjs/orchestrion/config/mcp-server.js.map +0 -1
- package/build/cjs/orchestrion/config/mistral.js +0 -57
- package/build/cjs/orchestrion/config/mistral.js.map +0 -1
- package/build/cjs/orchestrion/config/module-names.js +0 -8
- package/build/cjs/orchestrion/config/module-names.js.map +0 -1
- package/build/cjs/orchestrion/config/mongodb.js +0 -71
- package/build/cjs/orchestrion/config/mongodb.js.map +0 -1
- package/build/cjs/orchestrion/config/mongoose.js +0 -113
- package/build/cjs/orchestrion/config/mongoose.js.map +0 -1
- package/build/cjs/orchestrion/config/mysql.js +0 -20
- package/build/cjs/orchestrion/config/mysql.js.map +0 -1
- package/build/cjs/orchestrion/config/mysql2.js +0 -38
- package/build/cjs/orchestrion/config/mysql2.js.map +0 -1
- package/build/cjs/orchestrion/config/neon.js +0 -46
- package/build/cjs/orchestrion/config/neon.js.map +0 -1
- package/build/cjs/orchestrion/config/nestjs.js +0 -130
- package/build/cjs/orchestrion/config/nestjs.js.map +0 -1
- package/build/cjs/orchestrion/config/nitro.js +0 -10
- package/build/cjs/orchestrion/config/nitro.js.map +0 -1
- package/build/cjs/orchestrion/config/node-cron.js +0 -53
- package/build/cjs/orchestrion/config/node-cron.js.map +0 -1
- package/build/cjs/orchestrion/config/node-schedule.js +0 -29
- package/build/cjs/orchestrion/config/node-schedule.js.map +0 -1
- package/build/cjs/orchestrion/config/openai-compatible.js +0 -19
- package/build/cjs/orchestrion/config/openai-compatible.js.map +0 -1
- package/build/cjs/orchestrion/config/openai.js +0 -49
- package/build/cjs/orchestrion/config/openai.js.map +0 -1
- package/build/cjs/orchestrion/config/pg.js +0 -55
- package/build/cjs/orchestrion/config/pg.js.map +0 -1
- package/build/cjs/orchestrion/config/pi-durable.js +0 -34
- package/build/cjs/orchestrion/config/pi-durable.js.map +0 -1
- package/build/cjs/orchestrion/config/postgres.js +0 -58
- package/build/cjs/orchestrion/config/postgres.js.map +0 -1
- package/build/cjs/orchestrion/config/prisma.js +0 -53
- package/build/cjs/orchestrion/config/prisma.js.map +0 -1
- package/build/cjs/orchestrion/config/redis.js +0 -82
- package/build/cjs/orchestrion/config/redis.js.map +0 -1
- package/build/cjs/orchestrion/config/registration-only.js +0 -15
- package/build/cjs/orchestrion/config/registration-only.js.map +0 -1
- package/build/cjs/orchestrion/config/remix-v3.js +0 -55
- package/build/cjs/orchestrion/config/remix-v3.js.map +0 -1
- package/build/cjs/orchestrion/config/remix.js +0 -54
- package/build/cjs/orchestrion/config/remix.js.map +0 -1
- package/build/cjs/orchestrion/config/tedious.js +0 -28
- package/build/cjs/orchestrion/config/tedious.js.map +0 -1
- package/build/cjs/orchestrion/config/together-ai.js +0 -23
- package/build/cjs/orchestrion/config/together-ai.js.map +0 -1
- package/build/cjs/orchestrion/config/typesafe.js +0 -18
- package/build/cjs/orchestrion/config/typesafe.js.map +0 -1
- package/build/cjs/orchestrion/config/vercel-ai.js +0 -56
- package/build/cjs/orchestrion/config/vercel-ai.js.map +0 -1
- package/build/cjs/orchestrion/detect.js +0 -42
- package/build/cjs/orchestrion/detect.js.map +0 -1
- package/build/cjs/orchestrion/instrumentation.js +0 -80
- package/build/cjs/orchestrion/instrumentation.js.map +0 -1
- package/build/cjs/tracing-channel.js +0 -152
- package/build/cjs/tracing-channel.js.map +0 -1
- package/build/cjs/utils/cronMonitoring.js +0 -160
- package/build/cjs/utils/cronMonitoring.js.map +0 -1
- package/build/cjs/utils/diagnosticsChannel.js +0 -48
- package/build/cjs/utils/diagnosticsChannel.js.map +0 -1
- package/build/cjs/utils/moduleInjected.js +0 -18
- package/build/cjs/utils/moduleInjected.js.map +0 -1
- package/build/cjs/utils/monitorStream.js +0 -63
- package/build/cjs/utils/monitorStream.js.map +0 -1
- package/build/cjs/utils/runtime.js +0 -19
- package/build/cjs/utils/runtime.js.map +0 -1
- package/build/cjs/utils/setHttpServerSpanRouteAttribute.js +0 -26
- package/build/cjs/utils/setHttpServerSpanRouteAttribute.js.map +0 -1
- package/build/cjs/utils/sql.js +0 -285
- package/build/cjs/utils/sql.js.map +0 -1
- package/build/cjs/utils/tunnelServer.js +0 -29
- package/build/cjs/utils/tunnelServer.js.map +0 -1
- package/build/cjs/utils/withCleanScopes.js +0 -17
- package/build/cjs/utils/withCleanScopes.js.map +0 -1
- package/build/cjs/utils/wrapServerRequestHandler.js +0 -221
- package/build/cjs/utils/wrapServerRequestHandler.js.map +0 -1
- package/build/cjs/vendored/@apm-js-collab/code-transformer/index.js +0 -8
- package/build/cjs/vendored/@apm-js-collab/code-transformer/index.js.map +0 -1
- package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/index.js +0 -12
- package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/index.js.map +0 -1
- package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/matcher.js +0 -86
- package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/matcher.js.map +0 -1
- package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/transformer.js +0 -316
- package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/transformer.js.map +0 -1
- package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/transforms.js +0 -470
- package/build/cjs/vendored/@apm-js-collab/code-transformer/lib/transforms.js.map +0 -1
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/bun.js +0 -65
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/bun.js.map +0 -1
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/core-Bd0h-mo3.js.map +0 -1
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/esbuild.js.map +0 -1
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/instrumentation-serde-C-Xxv-jj.js.map +0 -1
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/rollup-DCG8HLmh.js.map +0 -1
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/vite.js +0 -14
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/vite.js.map +0 -1
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack-loader-factory.js +0 -117
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack-loader-factory.js.map +0 -1
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack.js +0 -103
- package/build/cjs/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/webpack.js.map +0 -1
- package/build/cjs/vendored/astring/dist/astring.js +0 -1068
- package/build/cjs/vendored/astring/dist/astring.js.map +0 -1
- package/build/cjs/vendored/esquery/dist/esquery.esm.min.js +0 -847
- package/build/cjs/vendored/esquery/dist/esquery.esm.min.js.map +0 -1
- package/build/cjs/vendored/meriyah/dist/meriyah.js +0 -9192
- package/build/cjs/vendored/meriyah/dist/meriyah.js.map +0 -1
- package/build/cjs/vendored/meriyah/dist/meriyah2.js +0 -9209
- package/build/cjs/vendored/meriyah/dist/meriyah2.js.map +0 -1
- package/build/cjs/vendored/module-details-from-path/index.js +0 -43
- package/build/cjs/vendored/module-details-from-path/index.js.map +0 -1
- package/build/cjs/vendored/semifies/index.js +0 -111
- package/build/cjs/vendored/semifies/index.js.map +0 -1
- package/build/cjs/vendored/source-map/lib/array-set.js +0 -73
- package/build/cjs/vendored/source-map/lib/array-set.js.map +0 -1
- package/build/cjs/vendored/source-map/lib/base64-vlq.js +0 -57
- package/build/cjs/vendored/source-map/lib/base64-vlq.js.map +0 -1
- package/build/cjs/vendored/source-map/lib/base64.js +0 -42
- package/build/cjs/vendored/source-map/lib/base64.js.map +0 -1
- package/build/cjs/vendored/source-map/lib/binary-search.js +0 -55
- package/build/cjs/vendored/source-map/lib/binary-search.js.map +0 -1
- package/build/cjs/vendored/source-map/lib/mapping-list.js +0 -42
- package/build/cjs/vendored/source-map/lib/mapping-list.js.map +0 -1
- package/build/cjs/vendored/source-map/lib/quick-sort.js +0 -36
- package/build/cjs/vendored/source-map/lib/quick-sort.js.map +0 -1
- package/build/cjs/vendored/source-map/lib/source-map-consumer.js +0 -612
- package/build/cjs/vendored/source-map/lib/source-map-consumer.js.map +0 -1
- package/build/cjs/vendored/source-map/lib/source-map-generator.js +0 -285
- package/build/cjs/vendored/source-map/lib/source-map-generator.js.map +0 -1
- package/build/cjs/vendored/source-map/lib/source-node.js +0 -270
- package/build/cjs/vendored/source-map/lib/source-node.js.map +0 -1
- package/build/cjs/vendored/source-map/lib/util.js +0 -300
- package/build/cjs/vendored/source-map/lib/util.js.map +0 -1
- package/build/cjs/vendored/source-map/source-map.js +0 -16
- package/build/cjs/vendored/source-map/source-map.js.map +0 -1
- package/build/esm/_virtual/_commonjsHelpers.js +0 -6
- package/build/esm/_virtual/_commonjsHelpers.js.map +0 -1
- package/build/esm/_virtual/array-set.js +0 -4
- package/build/esm/_virtual/array-set.js.map +0 -1
- package/build/esm/_virtual/astring.js +0 -4
- package/build/esm/_virtual/astring.js.map +0 -1
- package/build/esm/_virtual/base64-vlq.js +0 -4
- package/build/esm/_virtual/base64-vlq.js.map +0 -1
- package/build/esm/_virtual/base64.js +0 -4
- package/build/esm/_virtual/base64.js.map +0 -1
- package/build/esm/_virtual/binary-search.js +0 -4
- package/build/esm/_virtual/binary-search.js.map +0 -1
- package/build/esm/_virtual/mapping-list.js +0 -4
- package/build/esm/_virtual/mapping-list.js.map +0 -1
- package/build/esm/_virtual/meriyah.js +0 -4
- package/build/esm/_virtual/meriyah.js.map +0 -1
- package/build/esm/_virtual/quick-sort.js +0 -4
- package/build/esm/_virtual/quick-sort.js.map +0 -1
- package/build/esm/_virtual/source-map-consumer.js +0 -4
- package/build/esm/_virtual/source-map-consumer.js.map +0 -1
- package/build/esm/_virtual/source-map-generator.js +0 -4
- package/build/esm/_virtual/source-map-generator.js.map +0 -1
- package/build/esm/_virtual/source-map.js +0 -4
- package/build/esm/_virtual/source-map.js.map +0 -1
- package/build/esm/_virtual/source-node.js +0 -4
- package/build/esm/_virtual/source-node.js.map +0 -1
- package/build/esm/_virtual/util.js +0 -4
- package/build/esm/_virtual/util.js.map +0 -1
- package/build/esm/ai/pi-durable/models.js +0 -138
- package/build/esm/ai/pi-durable/models.js.map +0 -1
- package/build/esm/index.no-diagnostic-channels.js.map +0 -1
- package/build/esm/index.request-handler.js.map +0 -1
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/core-Bd0h-mo3.js.map +0 -1
- package/build/esm/vendored/@apm-js-collab/code-transformer-bundler-plugins/dist/esm/rollup-DCG8HLmh.js.map +0 -1
- package/build/esm/vendored/esquery/dist/esquery.esm.min.js +0 -845
- package/build/esm/vendored/esquery/dist/esquery.esm.min.js.map +0 -1
- package/build/types/ai/pi-durable/models.d.ts +0 -10
- package/build/types/ai/pi-durable/models.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spans.js","sources":["../../../../src/integrations/graphql/spans.ts"],"sourcesContent":["/*\n * Span builders for the orchestrion graphql channels (v14–16). They emit the same spans as the native\n * `diagnostics_channel` subscriber (`../../../graphql/graphql-dc-subscriber.ts`, graphql >= 17) by\n * reusing its `utils` and conventions — only the data source differs: here the payloads are the raw\n * arguments of the injected `parse`/`validate`/`execute` calls rather than graphql's native events.\n */\n\nimport {\n GRAPHQL_DOCUMENT,\n GRAPHQL_OPERATION_NAME,\n GRAPHQL_OPERATION_TYPE,\n SENTRY_OP,\n SENTRY_ORIGIN,\n} from '@sentry/conventions/attributes';\nimport { GRAPHQL } from '@sentry/conventions/op';\nimport type { Span } from '@sentry/core';\nimport { getClient, hasSpanStreamingEnabled, SPAN_STATUS_ERROR, startInactiveSpan } from '@sentry/core';\nimport type { GraphqlDocumentNode } from './types';\nimport { collectGraphqlDocument, getOperationSpanName, hasResultErrors, renameRootSpanWithOperation } from './utils';\nimport {\n GRAPHQL_DATA_SYMBOL,\n GRAPHQL_PROCESSING_TYPE,\n ORIGIN,\n PROCESSING_TYPE_EXECUTE,\n PROCESSING_TYPE_PARSE,\n PROCESSING_TYPE_VALIDATE,\n SPAN_NAME_EXECUTE,\n SPAN_NAME_PARSE,\n SPAN_NAME_VALIDATE,\n} from './constants';\nimport { getOperation, wrapFields, wrapFieldResolver } from './resolvers';\nimport type {\n DocumentNode,\n GraphQLFieldResolver,\n GraphQLSchema,\n GraphqlResolvedConfig,\n Maybe,\n ObjectWithGraphQLData,\n} from './types';\n\nconst BASE_ATTRIBUTES = {\n [SENTRY_ORIGIN]: ORIGIN,\n [SENTRY_OP]: GRAPHQL,\n} as const;\n\nexport function startParseSpan(): Span {\n const client = getClient();\n\n return startInactiveSpan({\n name: client && hasSpanStreamingEnabled(client) ? `GraphQL ${PROCESSING_TYPE_PARSE}` : SPAN_NAME_PARSE,\n attributes: { ...BASE_ATTRIBUTES, [GRAPHQL_PROCESSING_TYPE]: PROCESSING_TYPE_PARSE },\n });\n}\n\n/** `documentAST` is the 2nd argument to `validate(schema, documentAST, …)`. */\nexport function startValidateSpan(documentAST: unknown): Span {\n const client = getClient();\n\n return startInactiveSpan({\n name: client && hasSpanStreamingEnabled(client) ? `GraphQL ${PROCESSING_TYPE_VALIDATE}` : SPAN_NAME_VALIDATE,\n attributes: {\n ...BASE_ATTRIBUTES,\n [GRAPHQL_PROCESSING_TYPE]: PROCESSING_TYPE_VALIDATE,\n [GRAPHQL_DOCUMENT]: collectGraphqlDocument(documentAST as GraphqlDocumentNode),\n },\n });\n}\n\n/** `result` is validation's return value: a (possibly empty) array of errors. */\nexport function finalizeValidateSpan(span: Span, result: unknown): void {\n if (Array.isArray(result) && result.length > 0) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: 'invalid_argument' });\n }\n}\n\n/** Positional slots of a `graphql.execute(schema, document, …)` call (v14/v15 legacy signature). */\nconst enum ExecuteArg {\n SCHEMA = 0,\n DOCUMENT = 1,\n CONTEXT_VALUE = 3,\n OPERATION_NAME = 5,\n FIELD_RESOLVER = 6,\n}\n\ninterface NormalizedExecuteArgs {\n schema?: GraphQLSchema;\n document?: DocumentNode;\n contextValue: ObjectWithGraphQLData;\n operationName?: Maybe<string>;\n fieldResolver?: Maybe<GraphQLFieldResolver>;\n /** Writes `contextValue`/`fieldResolver` mutations back to the live channel `arguments`. */\n writeBack: (contextValue: ObjectWithGraphQLData, fieldResolver: Maybe<GraphQLFieldResolver>) => void;\n}\n\n/**\n * `execute` accepts either a single `ExecutionArgs` object (modern callers, always in v16) or\n * positional args (v14/v15). Both are normalized here; `writeBack` puts mutations onto the correct\n * slot so they reach the real call.\n */\nfunction normalizeExecuteArgs(argsArray: unknown[]): NormalizedExecuteArgs {\n if (argsArray.length >= 2) {\n return {\n schema: argsArray[ExecuteArg.SCHEMA] as GraphQLSchema | undefined,\n document: argsArray[ExecuteArg.DOCUMENT] as DocumentNode | undefined,\n contextValue: argsArray[ExecuteArg.CONTEXT_VALUE] ?? {},\n operationName: argsArray[ExecuteArg.OPERATION_NAME] as Maybe<string>,\n fieldResolver: argsArray[ExecuteArg.FIELD_RESOLVER] as Maybe<GraphQLFieldResolver>,\n writeBack: (contextValue, fieldResolver) => {\n argsArray[ExecuteArg.CONTEXT_VALUE] = contextValue;\n argsArray[ExecuteArg.FIELD_RESOLVER] = fieldResolver;\n },\n };\n }\n\n const obj = (argsArray[0] ?? {}) as {\n schema?: GraphQLSchema;\n document?: DocumentNode;\n contextValue?: unknown;\n operationName?: Maybe<string>;\n fieldResolver?: Maybe<GraphQLFieldResolver>;\n };\n return {\n schema: obj.schema,\n document: obj.document,\n contextValue: obj.contextValue ?? {},\n operationName: obj.operationName,\n fieldResolver: obj.fieldResolver,\n writeBack: (contextValue, fieldResolver) => {\n obj.contextValue = contextValue;\n obj.fieldResolver = fieldResolver;\n },\n };\n}\n\n/**\n * Opens the execute span and, unless resolver spans are disabled, swaps the schema's field resolvers\n * (and the default field resolver) for span-creating proxies — mutating the live `arguments` in place\n * so the wrapped `execute` call runs with them. Always returns a span; the caller guards against\n * throws (see `safe` in `index.ts`).\n */\nexport function startExecuteSpan(\n argsArray: unknown[],\n self: unknown,\n config: GraphqlResolvedConfig,\n getConfig: () => GraphqlResolvedConfig,\n): Span {\n const args = normalizeExecuteArgs(argsArray);\n const { schema, document } = args;\n let { contextValue, fieldResolver } = args;\n\n // Skip resolver wrapping when disabled or when a parent execute already set up this context\n // (nested execute reusing the same contextValue).\n const alreadyInstrumented = !!contextValue[GRAPHQL_DATA_SYMBOL];\n if (!config.ignoreResolveSpans && !alreadyInstrumented) {\n const isUsingDefaultResolver = fieldResolver == null;\n const defaultFieldResolver = (self as { defaultFieldResolver?: GraphQLFieldResolver } | undefined)\n ?.defaultFieldResolver;\n const fieldResolverForExecute = fieldResolver ?? defaultFieldResolver;\n if (fieldResolverForExecute) {\n fieldResolver = wrapFieldResolver(getConfig, fieldResolverForExecute, isUsingDefaultResolver);\n }\n\n if (schema) {\n wrapFields(schema.getQueryType(), getConfig);\n wrapFields(schema.getMutationType(), getConfig);\n }\n }\n\n // v14–16 channels carry only the raw args, so derive the operation from the document (native v17\n // provides `operationType`/`operationName` on the event directly).\n const operation = getOperation(document as DocumentNode, args.operationName);\n const operationType = operation?.operation;\n const operationName = operation?.name?.value ?? args.operationName ?? undefined;\n\n const client = getClient();\n const streamedName = `GraphQL ${operationType || PROCESSING_TYPE_EXECUTE}`;\n\n const span = startInactiveSpan({\n name:\n client && hasSpanStreamingEnabled(client)\n ? streamedName\n : getOperationSpanName(operationType, operationName || undefined, SPAN_NAME_EXECUTE),\n attributes: {\n ...BASE_ATTRIBUTES,\n [GRAPHQL_PROCESSING_TYPE]: PROCESSING_TYPE_EXECUTE,\n [GRAPHQL_OPERATION_TYPE]: operationType,\n [GRAPHQL_OPERATION_NAME]: operationName || undefined,\n [GRAPHQL_DOCUMENT]: collectGraphqlDocument(document),\n },\n });\n\n if (config.useOperationNameForRootSpan && operationType) {\n renameRootSpanWithOperation(span, operationType, operationName || undefined);\n }\n\n // The resolver proxies read the execute span (and their own bookkeeping) off this symbol.\n contextValue[GRAPHQL_DATA_SYMBOL] = { source: document, span, fields: {} };\n args.writeBack(contextValue, fieldResolver);\n\n return span;\n}\n\n/** `result` is the settled `ExecutionResult`; GraphQL errors surface on `result.errors`, not a throw. */\nexport function finalizeExecuteSpan(span: Span, result: unknown): void {\n if (hasResultErrors(result)) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n }\n}\n"],"names":[],"mappings":";;;;;;;AAwCA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,eAAA,CAAA,CAAA,CAAkB;AAAA,CAAA,CACtB,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,CAAA,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AAAA,CAAA,CACjB,CAAC,SAAS,CAAA,CAAA,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;AACf,CAAA;AAEO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,cAAA,CAAA,CAAA,CAAuB;AACrC,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;AAEzB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O,CAAA,CAAA,CAAA,CAAA;AACT;AAGO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAoB,CAAA,CAAA,CAAA,GAAY,MAAA,CAAA,CAAuB;AACrE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,CAAA,CAAA,CAAG;AAC3B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAU,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,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,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,GAAkB,CAAA;AAAA,CAAA,CACvE;AACF;;"}
|
|
1
|
+
{"version":3,"file":"spans.js","names":[],"sources":["../../../../src/integrations/graphql/spans.ts"],"sourcesContent":["/*\n * Span builders for the orchestrion graphql channels (v14–16). They emit the same spans as the native\n * `diagnostics_channel` subscriber (`../../../graphql/graphql-dc-subscriber.ts`, graphql >= 17) by\n * reusing its `utils` and conventions — only the data source differs: here the payloads are the raw\n * arguments of the injected `parse`/`validate`/`execute` calls rather than graphql's native events.\n */\n\nimport {\n GRAPHQL_DOCUMENT,\n GRAPHQL_OPERATION_NAME,\n GRAPHQL_OPERATION_TYPE,\n SENTRY_OP,\n SENTRY_ORIGIN,\n} from '@sentry/conventions/attributes';\nimport { GRAPHQL } from '@sentry/conventions/op';\nimport type { Span } from '@sentry/core';\nimport { getClient, hasSpanStreamingEnabled, SPAN_STATUS_ERROR, startInactiveSpan } from '@sentry/core';\nimport type { GraphqlDocumentNode } from './types';\nimport { collectGraphqlDocument, getOperationSpanName, hasResultErrors, renameRootSpanWithOperation } from './utils';\nimport {\n GRAPHQL_DATA_SYMBOL,\n GRAPHQL_PROCESSING_TYPE,\n ORIGIN,\n PROCESSING_TYPE_EXECUTE,\n PROCESSING_TYPE_PARSE,\n PROCESSING_TYPE_VALIDATE,\n SPAN_NAME_EXECUTE,\n SPAN_NAME_PARSE,\n SPAN_NAME_VALIDATE,\n} from './constants';\nimport { getOperation, wrapFields, wrapFieldResolver } from './resolvers';\nimport type {\n DocumentNode,\n GraphQLFieldResolver,\n GraphQLSchema,\n GraphqlResolvedConfig,\n Maybe,\n ObjectWithGraphQLData,\n} from './types';\n\nconst BASE_ATTRIBUTES = {\n [SENTRY_ORIGIN]: ORIGIN,\n [SENTRY_OP]: GRAPHQL,\n} as const;\n\nexport function startParseSpan(): Span {\n const client = getClient();\n\n return startInactiveSpan({\n name: client && hasSpanStreamingEnabled(client) ? `GraphQL ${PROCESSING_TYPE_PARSE}` : SPAN_NAME_PARSE,\n attributes: { ...BASE_ATTRIBUTES, [GRAPHQL_PROCESSING_TYPE]: PROCESSING_TYPE_PARSE },\n });\n}\n\n/** `documentAST` is the 2nd argument to `validate(schema, documentAST, …)`. */\nexport function startValidateSpan(documentAST: unknown): Span {\n const client = getClient();\n\n return startInactiveSpan({\n name: client && hasSpanStreamingEnabled(client) ? `GraphQL ${PROCESSING_TYPE_VALIDATE}` : SPAN_NAME_VALIDATE,\n attributes: {\n ...BASE_ATTRIBUTES,\n [GRAPHQL_PROCESSING_TYPE]: PROCESSING_TYPE_VALIDATE,\n [GRAPHQL_DOCUMENT]: collectGraphqlDocument(documentAST as GraphqlDocumentNode),\n },\n });\n}\n\n/** `result` is validation's return value: a (possibly empty) array of errors. */\nexport function finalizeValidateSpan(span: Span, result: unknown): void {\n if (Array.isArray(result) && result.length > 0) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: 'invalid_argument' });\n }\n}\n\n/** Positional slots of a `graphql.execute(schema, document, …)` call (v14/v15 legacy signature). */\nconst enum ExecuteArg {\n SCHEMA = 0,\n DOCUMENT = 1,\n CONTEXT_VALUE = 3,\n OPERATION_NAME = 5,\n FIELD_RESOLVER = 6,\n}\n\ninterface NormalizedExecuteArgs {\n schema?: GraphQLSchema;\n document?: DocumentNode;\n contextValue: ObjectWithGraphQLData;\n operationName?: Maybe<string>;\n fieldResolver?: Maybe<GraphQLFieldResolver>;\n /** Writes `contextValue`/`fieldResolver` mutations back to the live channel `arguments`. */\n writeBack: (contextValue: ObjectWithGraphQLData, fieldResolver: Maybe<GraphQLFieldResolver>) => void;\n}\n\n/**\n * `execute` accepts either a single `ExecutionArgs` object (modern callers, always in v16) or\n * positional args (v14/v15). Both are normalized here; `writeBack` puts mutations onto the correct\n * slot so they reach the real call.\n */\nfunction normalizeExecuteArgs(argsArray: unknown[]): NormalizedExecuteArgs {\n if (argsArray.length >= 2) {\n return {\n schema: argsArray[ExecuteArg.SCHEMA] as GraphQLSchema | undefined,\n document: argsArray[ExecuteArg.DOCUMENT] as DocumentNode | undefined,\n contextValue: argsArray[ExecuteArg.CONTEXT_VALUE] ?? {},\n operationName: argsArray[ExecuteArg.OPERATION_NAME] as Maybe<string>,\n fieldResolver: argsArray[ExecuteArg.FIELD_RESOLVER] as Maybe<GraphQLFieldResolver>,\n writeBack: (contextValue, fieldResolver) => {\n argsArray[ExecuteArg.CONTEXT_VALUE] = contextValue;\n argsArray[ExecuteArg.FIELD_RESOLVER] = fieldResolver;\n },\n };\n }\n\n const obj = (argsArray[0] ?? {}) as {\n schema?: GraphQLSchema;\n document?: DocumentNode;\n contextValue?: unknown;\n operationName?: Maybe<string>;\n fieldResolver?: Maybe<GraphQLFieldResolver>;\n };\n return {\n schema: obj.schema,\n document: obj.document,\n contextValue: obj.contextValue ?? {},\n operationName: obj.operationName,\n fieldResolver: obj.fieldResolver,\n writeBack: (contextValue, fieldResolver) => {\n obj.contextValue = contextValue;\n obj.fieldResolver = fieldResolver;\n },\n };\n}\n\n/**\n * Opens the execute span and, unless resolver spans are disabled, swaps the schema's field resolvers\n * (and the default field resolver) for span-creating proxies — mutating the live `arguments` in place\n * so the wrapped `execute` call runs with them. Always returns a span; the caller guards against\n * throws (see `safe` in `index.ts`).\n */\nexport function startExecuteSpan(\n argsArray: unknown[],\n self: unknown,\n config: GraphqlResolvedConfig,\n getConfig: () => GraphqlResolvedConfig,\n): Span {\n const args = normalizeExecuteArgs(argsArray);\n const { schema, document } = args;\n let { contextValue, fieldResolver } = args;\n\n // Skip resolver wrapping when disabled or when a parent execute already set up this context\n // (nested execute reusing the same contextValue).\n const alreadyInstrumented = !!contextValue[GRAPHQL_DATA_SYMBOL];\n if (!config.ignoreResolveSpans && !alreadyInstrumented) {\n const isUsingDefaultResolver = fieldResolver == null;\n const defaultFieldResolver = (self as { defaultFieldResolver?: GraphQLFieldResolver } | undefined)\n ?.defaultFieldResolver;\n const fieldResolverForExecute = fieldResolver ?? defaultFieldResolver;\n if (fieldResolverForExecute) {\n fieldResolver = wrapFieldResolver(getConfig, fieldResolverForExecute, isUsingDefaultResolver);\n }\n\n if (schema) {\n wrapFields(schema.getQueryType(), getConfig);\n wrapFields(schema.getMutationType(), getConfig);\n }\n }\n\n // v14–16 channels carry only the raw args, so derive the operation from the document (native v17\n // provides `operationType`/`operationName` on the event directly).\n const operation = getOperation(document as DocumentNode, args.operationName);\n const operationType = operation?.operation;\n const operationName = operation?.name?.value ?? args.operationName ?? undefined;\n\n const client = getClient();\n const streamedName = `GraphQL ${operationType || PROCESSING_TYPE_EXECUTE}`;\n\n const span = startInactiveSpan({\n name:\n client && hasSpanStreamingEnabled(client)\n ? streamedName\n : getOperationSpanName(operationType, operationName || undefined, SPAN_NAME_EXECUTE),\n attributes: {\n ...BASE_ATTRIBUTES,\n [GRAPHQL_PROCESSING_TYPE]: PROCESSING_TYPE_EXECUTE,\n [GRAPHQL_OPERATION_TYPE]: operationType,\n [GRAPHQL_OPERATION_NAME]: operationName || undefined,\n [GRAPHQL_DOCUMENT]: collectGraphqlDocument(document),\n },\n });\n\n if (config.useOperationNameForRootSpan && operationType) {\n renameRootSpanWithOperation(span, operationType, operationName || undefined);\n }\n\n // The resolver proxies read the execute span (and their own bookkeeping) off this symbol.\n contextValue[GRAPHQL_DATA_SYMBOL] = { source: document, span, fields: {} };\n args.writeBack(contextValue, fieldResolver);\n\n return span;\n}\n\n/** `result` is the settled `ExecutionResult`; GraphQL errors surface on `result.errors`, not a throw. */\nexport function finalizeExecuteSpan(span: Span, result: unknown): void {\n if (hasResultErrors(result)) {\n span.setStatus({ code: SPAN_STATUS_ERROR, message: 'internal_error' });\n }\n}\n"],"mappings":";;;;;;;AAwCA,MAAM,kBAAkB;EACrB,gBAAgB;EAChB,YAAY;AACf;AAEA,SAAgB,iBAAuB;CACrC,MAAM,SAAS,UAAU;CAEzB,OAAO,kBAAkB;EACvB,MAAM,UAAU,wBAAwB,MAAM,IAAI,WAAW,0BAA0B;EACvF,YAAY;GAAE,GAAG;IAAkB,0BAA0B;EAAsB;CACrF,CAAC;AACH;;AAGA,SAAgB,kBAAkB,aAA4B;CAC5D,MAAM,SAAS,UAAU;CAEzB,OAAO,kBAAkB;EACvB,MAAM,UAAU,wBAAwB,MAAM,IAAI,WAAW,6BAA6B;EAC1F,YAAY;GACV,GAAG;IACF,0BAA0B;IAC1B,mBAAmB,uBAAuB,WAAkC;EAC/E;CACF,CAAC;AACH;;AAGA,SAAgB,qBAAqB,MAAY,QAAuB;CACtE,IAAI,MAAM,QAAQ,MAAM,KAAK,OAAO,SAAS,GAC3C,KAAK,UAAU;EAAE,MAAM;EAAmB,SAAS;CAA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A,qBAAqB,eAAe,iBAAiB,KAAA,GAAW,iBAAiB;EACvF,YAAY;GACV,GAAG;IACF,0BAA0B;IAC1B,yBAAyB;IACzB,yBAAyB,iBAAiB,KAAA;IAC1C,mBAAmB,uBAAuB,QAAQ;EACrD;CACF,CAAC;CAED,IAAI,OAAO,+BAA+B,eACxC,4BAA4B,MAAM,eAAe,iBAAiB,KAAA,CAAS;CAI7E,aAAa,uBAAuB;EAAE,QAAQ;EAAU;EAAM,QAAQ,CAAC;CAAE;CACzE,KAAK,UAAU,cAAc,aAAa;CAE1C,OAAO;AACT;;AAGA,SAAgB,oBAAoB,MAAY,QAAuB;CACrE,IAAI,gBAAgB,MAAM,GACxB,KAAK,UAAU;EAAE,MAAM;EAAmB,SAAS;CAAiB,CAAC;AAEzE"}
|
|
@@ -1,93 +1,98 @@
|
|
|
1
|
-
import { SENTRY_GRAPHQL_OPERATION, SENTRY_SEGMENT_NAME_SOURCE } from
|
|
2
|
-
import { getClient,
|
|
3
|
-
|
|
1
|
+
import { SENTRY_GRAPHQL_OPERATION, SENTRY_SEGMENT_NAME_SOURCE } from "@sentry/conventions/attributes";
|
|
2
|
+
import { getClient, getRootSpan, hasSpanStreamingEnabled, isObjectLike, spanToJSON } from "@sentry/core";
|
|
3
|
+
// src/integrations/graphql/utils.ts
|
|
4
4
|
const ORIGINAL_DESCRIPTION_ATTRIBUTE = "original-description";
|
|
5
|
-
const REDACTED_LITERAL_KINDS = /* @__PURE__ */ new Set([
|
|
5
|
+
const REDACTED_LITERAL_KINDS = /* @__PURE__ */ new Set([
|
|
6
|
+
"Int",
|
|
7
|
+
"Float",
|
|
8
|
+
"String",
|
|
9
|
+
"BlockString"
|
|
10
|
+
]);
|
|
11
|
+
/**
|
|
12
|
+
* Record the operation name(s) on the enclosing root span and, unless span streaming is enabled,
|
|
13
|
+
* rename it to include them, e.g. `GET /graphql (query GetUser)`.
|
|
14
|
+
*/
|
|
6
15
|
function renameRootSpanWithOperation(span, operationType, operationName) {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
if (client && hasSpanStreamingEnabled(client)) {
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
const originalDescription = rootSpanJson.attributes[ORIGINAL_DESCRIPTION_ATTRIBUTE] ?? rootSpanJson.name;
|
|
28
|
-
if (!rootSpanJson.attributes[ORIGINAL_DESCRIPTION_ATTRIBUTE]) {
|
|
29
|
-
rootSpan.setAttribute(ORIGINAL_DESCRIPTION_ATTRIBUTE, originalDescription);
|
|
30
|
-
}
|
|
31
|
-
const source = rootSpanJson.attributes[SENTRY_SEGMENT_NAME_SOURCE];
|
|
32
|
-
rootSpan.updateName(`${originalDescription} (${getGraphqlOperationNamesFromAttribute(operations)})`);
|
|
33
|
-
rootSpan.setAttribute(SENTRY_SEGMENT_NAME_SOURCE, source);
|
|
16
|
+
const rootSpan = getRootSpan(span);
|
|
17
|
+
if (rootSpan === span) return;
|
|
18
|
+
const rootSpanJson = spanToJSON(rootSpan);
|
|
19
|
+
const newOperation = operationName ? `${operationType} ${operationName}` : operationType;
|
|
20
|
+
const existingOperations = rootSpanJson.attributes[SENTRY_GRAPHQL_OPERATION];
|
|
21
|
+
let operations;
|
|
22
|
+
if (Array.isArray(existingOperations)) operations = [...existingOperations, newOperation];
|
|
23
|
+
else if (typeof existingOperations === "string") operations = [existingOperations, newOperation];
|
|
24
|
+
else operations = newOperation;
|
|
25
|
+
rootSpan.setAttribute(SENTRY_GRAPHQL_OPERATION, operations);
|
|
26
|
+
const client = getClient();
|
|
27
|
+
if (client && hasSpanStreamingEnabled(client)) return;
|
|
28
|
+
const originalDescription = rootSpanJson.attributes[ORIGINAL_DESCRIPTION_ATTRIBUTE] ?? rootSpanJson.name;
|
|
29
|
+
if (!rootSpanJson.attributes[ORIGINAL_DESCRIPTION_ATTRIBUTE]) rootSpan.setAttribute(ORIGINAL_DESCRIPTION_ATTRIBUTE, originalDescription);
|
|
30
|
+
const source = rootSpanJson.attributes[SENTRY_SEGMENT_NAME_SOURCE];
|
|
31
|
+
rootSpan.updateName(`${originalDescription} (${getGraphqlOperationNamesFromAttribute(operations)})`);
|
|
32
|
+
rootSpan.setAttribute(SENTRY_SEGMENT_NAME_SOURCE, source);
|
|
34
33
|
}
|
|
34
|
+
/** Format the accumulated operations for the root span name: up to 5 sorted names, then `+N`. */
|
|
35
35
|
function getGraphqlOperationNamesFromAttribute(attr) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
}
|
|
43
|
-
return attr;
|
|
36
|
+
if (Array.isArray(attr)) {
|
|
37
|
+
const sorted = attr.slice().sort();
|
|
38
|
+
if (sorted.length <= 5) return sorted.join(", ");
|
|
39
|
+
return `${sorted.slice(0, 5).join(", ")}, +${sorted.length - 5}`;
|
|
40
|
+
}
|
|
41
|
+
return attr;
|
|
44
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Span name follows the GraphQL semantic conventions: `<operation.type> <operation.name>` when both
|
|
45
|
+
* are available, `<operation.type>` when only the type is, otherwise a static fallback.
|
|
46
|
+
*/
|
|
45
47
|
function getOperationSpanName(operationType, operationName, fallbackName) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
if (operationType) {
|
|
50
|
-
return operationType;
|
|
51
|
-
}
|
|
52
|
-
return fallbackName;
|
|
48
|
+
if (operationType && operationName) return `${operationType} ${operationName}`;
|
|
49
|
+
if (operationType) return operationType;
|
|
50
|
+
return fallbackName;
|
|
53
51
|
}
|
|
52
|
+
/** Whether a graphql execution result carries GraphQL errors (returned on `result.errors`). */
|
|
54
53
|
function hasResultErrors(result) {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
54
|
+
if (isObjectLike(result) && "errors" in result) {
|
|
55
|
+
const errors = result.errors;
|
|
56
|
+
return Array.isArray(errors) && errors.length > 0;
|
|
57
|
+
}
|
|
58
|
+
return false;
|
|
60
59
|
}
|
|
60
|
+
/**
|
|
61
|
+
* Serialize a parsed document into `graphql.document` while redacting every literal argument value:
|
|
62
|
+
* the original source text is preserved verbatim except that string/number literal spans are
|
|
63
|
+
* replaced (`"foo"` -> `"*"`, `42` -> `*`). graphql does not sanitize its channel payload, so this
|
|
64
|
+
* prevents raw inline values (potential PII) from leaving the process. Variable values are never
|
|
65
|
+
* included. Returns `undefined` (rather than throwing) on anything it cannot serialize.
|
|
66
|
+
*/
|
|
61
67
|
function redactGraphqlDocument(document) {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return void 0;
|
|
83
|
-
}
|
|
68
|
+
const loc = document?.loc;
|
|
69
|
+
const body = loc?.source?.body;
|
|
70
|
+
if (typeof body !== "string" || !loc?.startToken) return;
|
|
71
|
+
try {
|
|
72
|
+
const ranges = [];
|
|
73
|
+
for (let token = loc.startToken; token; token = token.next) if (REDACTED_LITERAL_KINDS.has(token.kind)) ranges.push({
|
|
74
|
+
start: token.start,
|
|
75
|
+
end: token.end,
|
|
76
|
+
kind: token.kind
|
|
77
|
+
});
|
|
78
|
+
let out = body;
|
|
79
|
+
for (let i = ranges.length - 1; i >= 0; i--) {
|
|
80
|
+
const { start, end, kind } = ranges[i];
|
|
81
|
+
const replacement = kind === "String" || kind === "BlockString" ? "\"*\"" : "*";
|
|
82
|
+
out = out.slice(0, start) + replacement + out.slice(end);
|
|
83
|
+
}
|
|
84
|
+
return out;
|
|
85
|
+
} catch {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
84
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* Returns the redacted document if `dataCollection.graphQL.document` is enabled, `undefined` otherwise.
|
|
91
|
+
*/
|
|
85
92
|
function collectGraphqlDocument(document) {
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
return redactGraphqlDocument(document);
|
|
93
|
+
if (getClient()?.getDataCollectionOptions().graphQL.document !== true) return;
|
|
94
|
+
return redactGraphqlDocument(document);
|
|
90
95
|
}
|
|
91
|
-
|
|
92
96
|
export { collectGraphqlDocument, getOperationSpanName, hasResultErrors, renameRootSpanWithOperation };
|
|
93
|
-
|
|
97
|
+
|
|
98
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../../src/integrations/graphql/utils.ts"],"sourcesContent":["import { SENTRY_SEGMENT_NAME_SOURCE, SENTRY_GRAPHQL_OPERATION } from '@sentry/conventions/attributes';\nimport type { Span, SpanAttributeValue } from '@sentry/core';\nimport { getClient, hasSpanStreamingEnabled, isObjectLike, getRootSpan, spanToJSON } from '@sentry/core';\nimport type { GraphqlDocumentNode, GraphqlToken } from './types';\n\n// Same key the OTel path uses, so renames stay consistent across both.\nconst ORIGINAL_DESCRIPTION_ATTRIBUTE = 'original-description';\n\n// graphql-js token kinds whose values may carry user data (literal arguments). We\n// replace them in the serialized document so raw inline values can never reach\n// `graphql.document`. Mirrors the legacy OTel instrumentation's redaction set.\nconst REDACTED_LITERAL_KINDS = new Set(['Int', 'Float', 'String', 'BlockString']);\n\n/**\n * Record the operation name(s) on the enclosing root span and, unless span streaming is enabled,\n * rename it to include them, e.g. `GET /graphql (query GetUser)`.\n */\nexport function renameRootSpanWithOperation(span: Span, operationType: string, operationName?: string): void {\n const rootSpan = getRootSpan(span);\n // Nothing to rename if the operation span is itself the root (graphql ran outside any span).\n if (rootSpan === span) {\n return;\n }\n\n const rootSpanJson = spanToJSON(rootSpan);\n\n const newOperation = operationName ? `${operationType} ${operationName}` : operationType;\n\n // A single operation is stored as a string, multiple as an array.\n const existingOperations = rootSpanJson.attributes[SENTRY_GRAPHQL_OPERATION];\n let operations: string | string[];\n if (Array.isArray(existingOperations)) {\n operations = [...(existingOperations as string[]), newOperation];\n } else if (typeof existingOperations === 'string') {\n operations = [existingOperations, newOperation];\n } else {\n operations = newOperation;\n }\n rootSpan.setAttribute(SENTRY_GRAPHQL_OPERATION, operations);\n\n const client = getClient();\n if (client && hasSpanStreamingEnabled(client)) {\n return;\n }\n\n // Keep the pre-rename name so repeated renames don't compound.\n const originalDescription =\n (rootSpanJson.attributes[ORIGINAL_DESCRIPTION_ATTRIBUTE] as string | undefined) ?? rootSpanJson.name;\n if (!rootSpanJson.attributes[ORIGINAL_DESCRIPTION_ATTRIBUTE]) {\n rootSpan.setAttribute(ORIGINAL_DESCRIPTION_ATTRIBUTE, originalDescription);\n }\n\n // `updateName` stamps `source: 'custom'`, so re-set the original source afterwards to preserve it.\n const source = rootSpanJson.attributes[SENTRY_SEGMENT_NAME_SOURCE];\n rootSpan.updateName(`${originalDescription} (${getGraphqlOperationNamesFromAttribute(operations)})`);\n rootSpan.setAttribute(SENTRY_SEGMENT_NAME_SOURCE, source as SpanAttributeValue);\n}\n\n/** Format the accumulated operations for the root span name: up to 5 sorted names, then `+N`. */\nfunction getGraphqlOperationNamesFromAttribute(attr: string | string[]): string {\n if (Array.isArray(attr)) {\n // oxlint-disable-next-line typescript/require-array-sort-compare\n const sorted = attr.slice().sort();\n if (sorted.length <= 5) {\n return sorted.join(', ');\n }\n\n return `${sorted.slice(0, 5).join(', ')}, +${sorted.length - 5}`;\n }\n\n return attr;\n}\n\n/**\n * Span name follows the GraphQL semantic conventions: `<operation.type> <operation.name>` when both\n * are available, `<operation.type>` when only the type is, otherwise a static fallback.\n */\nexport function getOperationSpanName(\n operationType: string | undefined,\n operationName: string | undefined,\n fallbackName: string,\n): string {\n if (operationType && operationName) {\n return `${operationType} ${operationName}`;\n }\n if (operationType) {\n return operationType;\n }\n\n return fallbackName;\n}\n\n/** Whether a graphql execution result carries GraphQL errors (returned on `result.errors`). */\nexport function hasResultErrors(result: unknown): boolean {\n if (isObjectLike(result) && 'errors' in result) {\n const errors = (result as { errors?: unknown }).errors;\n\n return Array.isArray(errors) && errors.length > 0;\n }\n\n return false;\n}\n\n/**\n * Serialize a parsed document into `graphql.document` while redacting every literal argument value:\n * the original source text is preserved verbatim except that string/number literal spans are\n * replaced (`\"foo\"` -> `\"*\"`, `42` -> `*`). graphql does not sanitize its channel payload, so this\n * prevents raw inline values (potential PII) from leaving the process. Variable values are never\n * included. Returns `undefined` (rather than throwing) on anything it cannot serialize.\n */\nfunction redactGraphqlDocument(document: GraphqlDocumentNode | undefined): string | undefined {\n const loc = document?.loc;\n const body = loc?.source?.body;\n if (typeof body !== 'string' || !loc?.startToken) {\n return undefined;\n }\n\n try {\n // Collect literal token spans, then splice them out back-to-front so earlier offsets stay valid.\n const ranges: Array<{ start: number; end: number; kind: string }> = [];\n for (let token: GraphqlToken | null | undefined = loc.startToken; token; token = token.next) {\n if (REDACTED_LITERAL_KINDS.has(token.kind)) {\n ranges.push({ start: token.start, end: token.end, kind: token.kind });\n }\n }\n\n let out = body;\n // Reverse index loop (not `for...of`) so we splice back-to-front; `i` is bounded by the loop, so\n // `ranges[i]` is always present and the `!` just satisfies `noUncheckedIndexedAccess`.\n for (let i = ranges.length - 1; i >= 0; i--) {\n const { start, end, kind } = ranges[i]!;\n const replacement = kind === 'String' || kind === 'BlockString' ? '\"*\"' : '*';\n out = out.slice(0, start) + replacement + out.slice(end);\n }\n\n return out;\n } catch {\n return undefined;\n }\n}\n\n/**\n * Returns the redacted document if `dataCollection.graphQL.document` is enabled, `undefined` otherwise.\n */\nexport function collectGraphqlDocument(document: GraphqlDocumentNode | undefined): string | undefined {\n if (getClient()?.get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ENTRY_GRAPHQL_OPERATION } from '@sentry/conventions/attributes';\nimport type { Span, SpanAttributeValue } from '@sentry/core';\nimport { getClient, hasSpanStreamingEnabled, isObjectLike, getRootSpan, spanToJSON } from '@sentry/core';\nimport type { GraphqlDocumentNode, GraphqlToken } from './types';\n\n// Same key the OTel path uses, so renames stay consistent across both.\nconst ORIGINAL_DESCRIPTION_ATTRIBUTE = 'original-description';\n\n// graphql-js token kinds whose values may carry user data (literal arguments). We\n// replace them in the serialized document so raw inline values can never reach\n// `graphql.document`. Mirrors the legacy OTel instrumentation's redaction set.\nconst REDACTED_LITERAL_KINDS = new Set(['Int', 'Float', 'String', 'BlockString']);\n\n/**\n * Record the operation name(s) on the enclosing root span and, unless span streaming is enabled,\n * rename it to include them, e.g. `GET /graphql (query GetUser)`.\n */\nexport function renameRootSpanWithOperation(span: Span, operationType: string, operationName?: string): void {\n const rootSpan = getRootSpan(span);\n // Nothing to rename if the operation span is itself the root (graphql ran outside any span).\n if (rootSpan === span) {\n return;\n }\n\n const rootSpanJson = spanToJSON(rootSpan);\n\n const newOperation = operationName ? `${operationType} ${operationName}` : operationType;\n\n // A single operation is stored as a string, multiple as an array.\n const existingOperations = rootSpanJson.attributes[SENTRY_GRAPHQL_OPERATION];\n let operations: string | string[];\n if (Array.isArray(existingOperations)) {\n operations = [...(existingOperations as string[]), newOperation];\n } else if (typeof existingOperations === 'string') {\n operations = [existingOperations, newOperation];\n } else {\n operations = newOperation;\n }\n rootSpan.setAttribute(SENTRY_GRAPHQL_OPERATION, operations);\n\n const client = getClient();\n if (client && hasSpanStreamingEnabled(client)) {\n return;\n }\n\n // Keep the pre-rename name so repeated renames don't compound.\n const originalDescription =\n (rootSpanJson.attributes[ORIGINAL_DESCRIPTION_ATTRIBUTE] as string | undefined) ?? rootSpanJson.name;\n if (!rootSpanJson.attributes[ORIGINAL_DESCRIPTION_ATTRIBUTE]) {\n rootSpan.setAttribute(ORIGINAL_DESCRIPTION_ATTRIBUTE, originalDescription);\n }\n\n // `updateName` stamps `source: 'custom'`, so re-set the original source afterwards to preserve it.\n const source = rootSpanJson.attributes[SENTRY_SEGMENT_NAME_SOURCE];\n rootSpan.updateName(`${originalDescription} (${getGraphqlOperationNamesFromAttribute(operations)})`);\n rootSpan.setAttribute(SENTRY_SEGMENT_NAME_SOURCE, source as SpanAttributeValue);\n}\n\n/** Format the accumulated operations for the root span name: up to 5 sorted names, then `+N`. */\nfunction getGraphqlOperationNamesFromAttribute(attr: string | string[]): string {\n if (Array.isArray(attr)) {\n // oxlint-disable-next-line typescript/require-array-sort-compare\n const sorted = attr.slice().sort();\n if (sorted.length <= 5) {\n return sorted.join(', ');\n }\n\n return `${sorted.slice(0, 5).join(', ')}, +${sorted.length - 5}`;\n }\n\n return attr;\n}\n\n/**\n * Span name follows the GraphQL semantic conventions: `<operation.type> <operation.name>` when both\n * are available, `<operation.type>` when only the type is, otherwise a static fallback.\n */\nexport function getOperationSpanName(\n operationType: string | undefined,\n operationName: string | undefined,\n fallbackName: string,\n): string {\n if (operationType && operationName) {\n return `${operationType} ${operationName}`;\n }\n if (operationType) {\n return operationType;\n }\n\n return fallbackName;\n}\n\n/** Whether a graphql execution result carries GraphQL errors (returned on `result.errors`). */\nexport function hasResultErrors(result: unknown): boolean {\n if (isObjectLike(result) && 'errors' in result) {\n const errors = (result as { errors?: unknown }).errors;\n\n return Array.isArray(errors) && errors.length > 0;\n }\n\n return false;\n}\n\n/**\n * Serialize a parsed document into `graphql.document` while redacting every literal argument value:\n * the original source text is preserved verbatim except that string/number literal spans are\n * replaced (`\"foo\"` -> `\"*\"`, `42` -> `*`). graphql does not sanitize its channel payload, so this\n * prevents raw inline values (potential PII) from leaving the process. Variable values are never\n * included. Returns `undefined` (rather than throwing) on anything it cannot serialize.\n */\nfunction redactGraphqlDocument(document: GraphqlDocumentNode | undefined): string | undefined {\n const loc = document?.loc;\n const body = loc?.source?.body;\n if (typeof body !== 'string' || !loc?.startToken) {\n return undefined;\n }\n\n try {\n // Collect literal token spans, then splice them out back-to-front so earlier offsets stay valid.\n const ranges: Array<{ start: number; end: number; kind: string }> = [];\n for (let token: GraphqlToken | null | undefined = loc.startToken; token; token = token.next) {\n if (REDACTED_LITERAL_KINDS.has(token.kind)) {\n ranges.push({ start: token.start, end: token.end, kind: token.kind });\n }\n }\n\n let out = body;\n // Reverse index loop (not `for...of`) so we splice back-to-front; `i` is bounded by the loop, so\n // `ranges[i]` is always present and the `!` just satisfies `noUncheckedIndexedAccess`.\n for (let i = ranges.length - 1; i >= 0; i--) {\n const { start, end, kind } = ranges[i]!;\n const replacement = kind === 'String' || kind === 'BlockString' ? '\"*\"' : '*';\n out = out.slice(0, start) + replacement + out.slice(end);\n }\n\n return out;\n } catch {\n return undefined;\n }\n}\n\n/**\n * Returns the redacted document if `dataCollection.graphQL.document` is enabled, `undefined` otherwise.\n */\nexport function collectGraphqlDocument(document: GraphqlDocumentNode | undefined): string | undefined {\n if (getClient()?.getDataCollectionOptions().graphQL.document !== true) {\n return undefined;\n }\n return redactGraphqlDocument(document);\n}\n"],"mappings":";;;AAMA,MAAM,iCAAiC;AAKvC,MAAM,yCAAyB,IAAI,IAAI;CAAC;CAAO;CAAS;CAAU;AAAa,CAAC;;;;;AAMhF,SAAgB,4BAA4B,MAAY,eAAuB,eAA8B;CAC3G,MAAM,WAAW,YAAY,IAAI;CAEjC,IAAI,aAAa,MACf;CAGF,MAAM,eAAe,WAAW,QAAQ;CAExC,MAAM,eAAe,gBAAgB,GAAG,cAAc,GAAG,kBAAkB;CAG3E,MAAM,qBAAqB,aAAa,WAAW;CACnD,IAAI;CACJ,IAAI,MAAM,QAAQ,kBAAkB,GAClC,aAAa,CAAC,GAAI,oBAAiC,YAAY;MAC1D,IAAI,OAAO,uBAAuB,UACvC,aAAa,CAAC,oBAAoB,YAAY;MAE9C,aAAa;CAEf,SAAS,aAAa,0BAA0B,UAAU;CAE1D,MAAM,SAAS,UAAU;CACzB,IAAI,UAAU,wBAAwB,MAAM,GAC1C;CAIF,M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AAO,SAAS,GAAG,KAAK,GAAG,KAAK;GAC3C,MAAM,EAAE,OAAO,KAAK,SAAS,OAAO;GACpC,MAAM,cAAc,SAAS,YAAY,SAAS,gBAAgB,UAAQ;GAC1E,MAAM,IAAI,MAAM,GAAG,KAAK,IAAI,cAAc,IAAI,MAAM,GAAG;EACzD;EAEA,OAAO;CACT,QAAQ;EACN;CACF;AACF;;;;AAKA,SAAgB,uBAAuB,UAA+D;CACpG,IAAI,UAAU,CAAC,EAAE,yBAAyB,CAAC,CAAC,QAAQ,aAAa,MAC/D;CAEF,OAAO,sBAAsB,QAAQ;AACvC"}
|
|
@@ -1,18 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
1
|
+
import { CHANNELS } from "../orchestrion/channels.js";
|
|
2
|
+
import { groqModuleNames } from "../orchestrion/config/groq.js";
|
|
3
|
+
import { createOpenAiCompatibleIntegration } from "./openai-compatible.js";
|
|
4
|
+
import { defineIntegration } from "@sentry/core";
|
|
5
|
+
// src/integrations/groq.ts
|
|
6
6
|
const GROQ_INTEGRATION_NAME = "Groq";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Instruments the `groq-sdk` client (chat completions and embeddings). Groq speaks the OpenAI wire format,
|
|
9
|
+
* so this reuses the openai span/streaming logic; see `createOpenAiCompatibleIntegration`. Requires the
|
|
10
|
+
* Sentry runtime hook or bundler plugin so the diagnostics channels get injected into `groq-sdk`.
|
|
11
|
+
*/
|
|
12
|
+
const groqIntegration = defineIntegration(createOpenAiCompatibleIntegration({
|
|
13
|
+
integrationName: GROQ_INTEGRATION_NAME,
|
|
14
|
+
providerName: "groq",
|
|
15
|
+
origin: "auto.ai.groq",
|
|
16
|
+
moduleNames: groqModuleNames,
|
|
17
|
+
channels: {
|
|
18
|
+
chat: CHANNELS.GROQ_CHAT,
|
|
19
|
+
embeddings: CHANNELS.GROQ_EMBEDDINGS
|
|
20
|
+
}
|
|
21
|
+
}));
|
|
17
22
|
export { GROQ_INTEGRATION_NAME, groqIntegration };
|
|
18
|
-
|
|
23
|
+
|
|
24
|
+
//# sourceMappingURL=groq.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"groq.js","sources":["../../../src/integrations/groq.ts"],"sourcesContent":["import { defineIntegration } from '@sentry/core';\nimport { CHANNELS } from '../orchestrion/channels';\nimport { groqModuleNames } from '../orchestrion/config/groq';\nimport { createOpenAiCompatibleIntegration } from './openai-compatible';\n\n// Exported so LangChain can add it to its provider-skip list: `@langchain/groq` drives `groq-sdk`, so\n// a `ChatGroq` call would otherwise open both a LangChain span and this integration's Groq span.\nexport const GROQ_INTEGRATION_NAME = 'Groq' as const;\n\n/**\n * Instruments the `groq-sdk` client (chat completions and embeddings). Groq speaks the OpenAI wire format,\n * so this reuses the openai span/streaming logic; see `createOpenAiCompatibleIntegration`. Requires the\n * Sentry runtime hook or bundler plugin so the diagnostics channels get injected into `groq-sdk`.\n */\nexport const groqIntegration = defineIntegration(\n createOpenAiCompatibleIntegration({\n integrationName: GROQ_INTEGRATION_NAME,\n providerName: 'groq',\n origin: 'auto.ai.groq',\n moduleNames: groqModuleNames,\n channels: { chat: CHANNELS.GROQ_CHAT, embeddings: CHANNELS.GROQ_EMBEDDINGS },\n }),\n);\n"],"
|
|
1
|
+
{"version":3,"file":"groq.js","names":[],"sources":["../../../src/integrations/groq.ts"],"sourcesContent":["import { defineIntegration } from '@sentry/core';\nimport { CHANNELS } from '../orchestrion/channels';\nimport { groqModuleNames } from '../orchestrion/config/groq';\nimport { createOpenAiCompatibleIntegration } from './openai-compatible';\n\n// Exported so LangChain can add it to its provider-skip list: `@langchain/groq` drives `groq-sdk`, so\n// a `ChatGroq` call would otherwise open both a LangChain span and this integration's Groq span.\nexport const GROQ_INTEGRATION_NAME = 'Groq' as const;\n\n/**\n * Instruments the `groq-sdk` client (chat completions and embeddings). Groq speaks the OpenAI wire format,\n * so this reuses the openai span/streaming logic; see `createOpenAiCompatibleIntegration`. Requires the\n * Sentry runtime hook or bundler plugin so the diagnostics channels get injected into `groq-sdk`.\n */\nexport const groqIntegration = defineIntegration(\n createOpenAiCompatibleIntegration({\n integrationName: GROQ_INTEGRATION_NAME,\n providerName: 'groq',\n origin: 'auto.ai.groq',\n moduleNames: groqModuleNames,\n channels: { chat: CHANNELS.GROQ_CHAT, embeddings: CHANNELS.GROQ_EMBEDDINGS },\n }),\n);\n"],"mappings":";;;;;AAOA,MAAa,wBAAwB;;;;;;AAOrC,MAAa,kBAAkB,kBAC7B,kCAAkC;CAChC,iBAAiB;CACjB,cAAc;CACd,QAAQ;CACR,aAAa;CACb,UAAU;EAAE,MAAM,SAAS;EAAW,YAAY,SAAS;CAAgB;AAC7E,CAAC,CACH"}
|
|
@@ -1,44 +1,53 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import { DEBUG_BUILD } from "../../debug-build.js";
|
|
2
|
+
import { defaultShouldHandleError } from "./hapi-utils.js";
|
|
3
|
+
import { addNonEnumerableProperty, captureException, debug, getDefaultIsolationScope, getIsolationScope } from "@sentry/core";
|
|
4
|
+
// src/integrations/hapi/hapi-error-handler.ts
|
|
5
5
|
const ERROR_HANDLER_STATE = "__SENTRY_HAPI_ERROR_HANDLER_STATE__";
|
|
6
6
|
function isErrorEvent(event) {
|
|
7
|
-
|
|
7
|
+
return !!(event && typeof event === "object" && "error" in event && event.error);
|
|
8
8
|
}
|
|
9
|
+
/**
|
|
10
|
+
* Attach a Sentry error listener to a Hapi server's shared event emitter.
|
|
11
|
+
*
|
|
12
|
+
* The listener sets the isolation scope's transaction name from the errored
|
|
13
|
+
* route and captures the error. It is attached once per server: hapi shares one
|
|
14
|
+
* event emitter (`core.events`) across the root server and every plugin clone,
|
|
15
|
+
* so a single listener covers all requests.
|
|
16
|
+
*
|
|
17
|
+
* Idempotent — the emitter carries the handler state, so auto-registration (via
|
|
18
|
+
* the `start` / `initialize` channels) and any explicit `setupHapiErrorHandler`
|
|
19
|
+
* call never stack up multiple listeners.
|
|
20
|
+
*
|
|
21
|
+
* `shouldHandleError` gates which errors are captured (defaults to
|
|
22
|
+
* {@link defaultShouldHandleError}). When omitted, a previously installed
|
|
23
|
+
* predicate is left untouched; when provided, it overrides whatever was set
|
|
24
|
+
* before — so the integration's configured predicate wins over a prior
|
|
25
|
+
* default-valued attach, regardless of ordering.
|
|
26
|
+
*/
|
|
9
27
|
function attachHapiErrorHandler(server, shouldHandleError) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
if (isErrorEvent(event) && state.shouldHandleError(event.error, request)) {
|
|
33
|
-
captureException(event.error, {
|
|
34
|
-
mechanism: {
|
|
35
|
-
type: "auto.function.hapi",
|
|
36
|
-
handled: false
|
|
37
|
-
}
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
});
|
|
28
|
+
const events = server?.events;
|
|
29
|
+
if (!events) return;
|
|
30
|
+
const existingState = events[ERROR_HANDLER_STATE];
|
|
31
|
+
if (existingState) {
|
|
32
|
+
if (shouldHandleError) existingState.shouldHandleError = shouldHandleError;
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const state = { shouldHandleError: shouldHandleError ?? defaultShouldHandleError };
|
|
36
|
+
addNonEnumerableProperty(events, ERROR_HANDLER_STATE, state);
|
|
37
|
+
events.on({
|
|
38
|
+
name: "request",
|
|
39
|
+
channels: ["error"]
|
|
40
|
+
}, (request, event) => {
|
|
41
|
+
if (getIsolationScope() !== getDefaultIsolationScope()) {
|
|
42
|
+
const route = request.route;
|
|
43
|
+
if (route?.path) getIsolationScope().setTransactionName(`${request.method.toUpperCase()} ${route.path}`);
|
|
44
|
+
} else DEBUG_BUILD && debug.warn("Isolation scope is still the default isolation scope - skipping setting transactionName");
|
|
45
|
+
if (isErrorEvent(event) && state.shouldHandleError(event.error, request)) captureException(event.error, { mechanism: {
|
|
46
|
+
type: "auto.function.hapi",
|
|
47
|
+
handled: false
|
|
48
|
+
} });
|
|
49
|
+
});
|
|
41
50
|
}
|
|
42
|
-
|
|
43
51
|
export { attachHapiErrorHandler };
|
|
44
|
-
|
|
52
|
+
|
|
53
|
+
//# sourceMappingURL=hapi-error-handler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hapi-error-handler.js","sources":["../../../../src/integrations/hapi/hapi-error-handler.ts"],"sourcesContent":["import {\n addNonEnumerableProperty,\n captureException,\n debug,\n getDefaultIsolationScope,\n getIsolationScope,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport type { HapiRequest, HapiRequestEvent, HapiServer, HapiServerEvents, HapiShouldHandleError } from './hapi-types';\nimport { defaultShouldHandleError } from './hapi-utils';\n\n// Holds the Sentry error-handling state on a server's shared event emitter. Its\n// presence means the single Sentry error listener is already attached, so repeat\n// attachments only ever register one listener — whether reached via the `start`\n// and `initialize` channels, a plugin clone that shares the same emitter, or a\n// manual `setupHapiErrorHandler` call.\n//\n// The `shouldHandleError` predicate lives on this shared object (rather than\n// being captured by the listener) so a later attach carrying an explicit\n// predicate can upgrade it in place: the integration's configured\n// `shouldHandleError` must win even when a default-valued attach (e.g. the\n// deprecated `setupHapiErrorHandler`, which precedes `server.start()`) ran first.\nconst ERROR_HANDLER_STATE = '__SENTRY_HAPI_ERROR_HANDLER_STATE__';\n\ninterface HapiErrorHandlerState {\n shouldHandleError: HapiShouldHandleError;\n}\n\ntype MarkedServerEvents = HapiServerEvents & { [ERROR_HANDLER_STATE]?: HapiErrorHandlerState };\n\nfunction isErrorEvent(event: HapiRequestEvent): boolean {\n return !!(event && typeof event === 'object' && 'error' in event && event.error);\n}\n\n/**\n * Attach a Sentry error listener to a Hapi server's shared event emitter.\n *\n * The listener sets the isolation scope's transaction name from the errored\n * route and captures the error. It is attached once per server: hapi shares one\n * event emitter (`core.events`) across the root server and every plugin clone,\n * so a single listener covers all requests.\n *\n * Idempotent — the emitter carries the handler state, so auto-registration (via\n * the `start` / `initialize` channels) and any explicit `setupHapiErrorHandler`\n * call never stack up multiple listeners.\n *\n * `shouldHandleError` gates which errors are captured (defaults to\n * {@link defaultShouldHandleError}). When omitted, a previously installed\n * predicate is left untouched; when provided, it overrides whatever was set\n * before — so the integration's configured predicate wins over a prior\n * default-valued attach, regardless of ordering.\n */\nexport function attachHapiErrorHandler(server: HapiServer, shouldHandleError?: HapiShouldHandleError): void {\n const events = server?.events as MarkedServerEvents | undefined;\n if (!events) {\n return;\n }\n\n const existingState = events[ERROR_HANDLER_STATE];\n if (existingState) {\n // Listener already attached: only an explicit predicate upgrades it, so a\n // later default-valued attach never downgrades a configured one.\n if (shouldHandleError) {\n existingState.shouldHandleError = shouldHandleError;\n }\n return;\n }\n\n const state: HapiErrorHandlerState = { shouldHandleError: shouldHandleError ?? defaultShouldHandleError };\n addNonEnumerableProperty(events, ERROR_HANDLER_STATE, state);\n\n events.on({ name: 'request', channels: ['error'] }, (request: HapiRequest, event: HapiRequestEvent) => {\n if (getIsolationScope() !== getDefaultIsolationScope()) {\n const route = request.route;\n if (route?.path) {\n getIsolationScope().setTransactionName(`${request.method.toUpperCase()} ${route.path}`);\n }\n } else {\n DEBUG_BUILD &&\n debug.warn('Isolation scope is still the default isolation scope - skipping setting transactionName');\n }\n\n if (isErrorEvent(event) && state.shouldHandleError(event.error, request)) {\n captureException(event.error, {\n mechanism: {\n type: 'auto.function.hapi',\n handled: false,\n },\n });\n }\n });\n}\n"],"
|
|
1
|
+
{"version":3,"file":"hapi-error-handler.js","names":[],"sources":["../../../../src/integrations/hapi/hapi-error-handler.ts"],"sourcesContent":["import {\n addNonEnumerableProperty,\n captureException,\n debug,\n getDefaultIsolationScope,\n getIsolationScope,\n} from '@sentry/core';\nimport { DEBUG_BUILD } from '../../debug-build';\nimport type { HapiRequest, HapiRequestEvent, HapiServer, HapiServerEvents, HapiShouldHandleError } from './hapi-types';\nimport { defaultShouldHandleError } from './hapi-utils';\n\n// Holds the Sentry error-handling state on a server's shared event emitter. Its\n// presence means the single Sentry error listener is already attached, so repeat\n// attachments only ever register one listener — whether reached via the `start`\n// and `initialize` channels, a plugin clone that shares the same emitter, or a\n// manual `setupHapiErrorHandler` call.\n//\n// The `shouldHandleError` predicate lives on this shared object (rather than\n// being captured by the listener) so a later attach carrying an explicit\n// predicate can upgrade it in place: the integration's configured\n// `shouldHandleError` must win even when a default-valued attach (e.g. the\n// deprecated `setupHapiErrorHandler`, which precedes `server.start()`) ran first.\nconst ERROR_HANDLER_STATE = '__SENTRY_HAPI_ERROR_HANDLER_STATE__';\n\ninterface HapiErrorHandlerState {\n shouldHandleError: HapiShouldHandleError;\n}\n\ntype MarkedServerEvents = HapiServerEvents & { [ERROR_HANDLER_STATE]?: HapiErrorHandlerState };\n\nfunction isErrorEvent(event: HapiRequestEvent): boolean {\n return !!(event && typeof event === 'object' && 'error' in event && event.error);\n}\n\n/**\n * Attach a Sentry error listener to a Hapi server's shared event emitter.\n *\n * The listener sets the isolation scope's transaction name from the errored\n * route and captures the error. It is attached once per server: hapi shares one\n * event emitter (`core.events`) across the root server and every plugin clone,\n * so a single listener covers all requests.\n *\n * Idempotent — the emitter carries the handler state, so auto-registration (via\n * the `start` / `initialize` channels) and any explicit `setupHapiErrorHandler`\n * call never stack up multiple listeners.\n *\n * `shouldHandleError` gates which errors are captured (defaults to\n * {@link defaultShouldHandleError}). When omitted, a previously installed\n * predicate is left untouched; when provided, it overrides whatever was set\n * before — so the integration's configured predicate wins over a prior\n * default-valued attach, regardless of ordering.\n */\nexport function attachHapiErrorHandler(server: HapiServer, shouldHandleError?: HapiShouldHandleError): void {\n const events = server?.events as MarkedServerEvents | undefined;\n if (!events) {\n return;\n }\n\n const existingState = events[ERROR_HANDLER_STATE];\n if (existingState) {\n // Listener already attached: only an explicit predicate upgrades it, so a\n // later default-valued attach never downgrades a configured one.\n if (shouldHandleError) {\n existingState.shouldHandleError = shouldHandleError;\n }\n return;\n }\n\n const state: HapiErrorHandlerState = { shouldHandleError: shouldHandleError ?? defaultShouldHandleError };\n addNonEnumerableProperty(events, ERROR_HANDLER_STATE, state);\n\n events.on({ name: 'request', channels: ['error'] }, (request: HapiRequest, event: HapiRequestEvent) => {\n if (getIsolationScope() !== getDefaultIsolationScope()) {\n const route = request.route;\n if (route?.path) {\n getIsolationScope().setTransactionName(`${request.method.toUpperCase()} ${route.path}`);\n }\n } else {\n DEBUG_BUILD &&\n debug.warn('Isolation scope is still the default isolation scope - skipping setting transactionName');\n }\n\n if (isErrorEvent(event) && state.shouldHandleError(event.error, request)) {\n captureException(event.error, {\n mechanism: {\n type: 'auto.function.hapi',\n handled: false,\n },\n });\n }\n });\n}\n"],"mappings":";;;;AAsBA,MAAM,sBAAsB;AAQ5B,SAAS,aAAa,OAAkC;CACtD,OAAO,CAAC,EAAE,SAAS,OAAO,UAAU,YAAY,WAAW,SAAS,MAAM;AAC5E;;;;;;;;;;;;;;;;;;;AAoBA,SAAgB,uBAAuB,QAAoB,mBAAiD;CAC1G,MAAM,SAAS,QAAQ;CACvB,IAAI,CAAC,QACH;CAGF,MAAM,gBAAgB,OAAO;CAC7B,IAAI,eAAe;EAGjB,IAAI,mBACF,cAAc,oBAAoB;EAEpC;CACF;CAEA,MAAM,QAA+B,EAAE,mBAAmB,qBAAqB,yBAAyB;CACxG,yBAAyB,QAAQ,qBAAqB,KAAK;CAE3D,OAAO,GAAG;EAAE,MAAM;EAAW,UAAU,CAAC,OAAO;CAAE,IAAI,SAAsB,UAA4B;EACrG,IAAI,kBAAkB,MAAM,yBAAyB,GAAG;GACtD,MAAM,QAAQ,QAAQ;GACtB,IAAI,OAAO,MACT,kBAAkB,CAAC,CAAC,mBAAmB,GAAG,QAAQ,OAAO,YAAY,EAAE,GAAG,MAAM,MAAM;EAE1F,OACE,eACE,MAAM,KAAK,yFAAyF;EAGxG,IAAI,aAAa,KAAK,KAAK,MAAM,kBAAkB,MAAM,OAAO,OAAO,GACrE,iBAAiB,MAAM,OAAO,EAC5B,WAAW;GACT,MAAM;GACN,SAAS;EACX,EACF,CAAC;CAEL,CAAC;AACH"}
|
|
@@ -1,19 +1,26 @@
|
|
|
1
|
+
// src/integrations/hapi/hapi-types.ts
|
|
1
2
|
const LIFECYCLE_EXT_POINTS = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
"onPreAuth",
|
|
4
|
+
"onCredentials",
|
|
5
|
+
"onPostAuth",
|
|
6
|
+
"onPreHandler",
|
|
7
|
+
"onPostHandler",
|
|
8
|
+
"onPreResponse",
|
|
9
|
+
"onRequest"
|
|
9
10
|
];
|
|
10
|
-
|
|
11
|
+
/**
|
|
12
|
+
* This symbol is used to mark a Hapi route handler or server extension handler as
|
|
13
|
+
* already patched, since it's possible to use these handlers multiple times
|
|
14
|
+
* i.e. when allowing multiple versions of one plugin, or when registering a plugin
|
|
15
|
+
* multiple times on different servers.
|
|
16
|
+
*/
|
|
17
|
+
const handlerPatched = Symbol("hapi-handler-patched");
|
|
11
18
|
const HapiLayerType = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
19
|
+
ROUTER: "router",
|
|
20
|
+
PLUGIN: "plugin",
|
|
21
|
+
EXT: "server.ext"
|
|
15
22
|
};
|
|
16
23
|
const HapiLifecycleMethodNames = new Set(LIFECYCLE_EXT_POINTS);
|
|
17
|
-
|
|
18
24
|
export { HapiLayerType, HapiLifecycleMethodNames, handlerPatched };
|
|
19
|
-
|
|
25
|
+
|
|
26
|
+
//# sourceMappingURL=hapi-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hapi-types.js","sources":["../../../../src/integrations/hapi/hapi-types.ts"],"sourcesContent":["/*\n * Structural type definitions and constants ported from the vendored\n * `@opentelemetry/instrumentation-hapi` types, with all `@hapi/*` and\n * `@opentelemetry/*` dependencies removed. Only the shapes actually accessed by\n * the orchestrion hapi subscriber are kept.\n */\n\n// Single source of truth for the request lifecycle extension points, so the\n// `ServerRequestExtType` union and the runtime `HapiLifecycleMethodNames` set\n// below can't drift apart.\nconst LIFECYCLE_EXT_POINTS = [\n 'onPreAuth',\n 'onCredentials',\n 'onPostAuth',\n 'onPreHandler',\n 'onPostHandler',\n 'onPreResponse',\n 'onRequest',\n] as const;\n\nexport type ServerRequestExtType = (typeof LIFECYCLE_EXT_POINTS)[number];\n\nexport type LifecycleMethod = (request: unknown, h: unknown, err?: Error) => unknown;\n\nexport interface ServerRouteOptions {\n handler?: LifecycleMethod | unknown;\n [key: string]: unknown;\n}\n\nexport interface ServerRoute {\n path: string;\n method: string | string[];\n handler?: LifecycleMethod | unknown;\n options?: ((server: unknown) => ServerRouteOptions) | ServerRouteOptions;\n [key: string]: unknown;\n}\n\nexport interface ServerExtEventsObject {\n type: string;\n [key: string]: unknown;\n}\n\nexport interface ServerExtEventsRequestObject {\n type: ServerRequestExtType;\n method: LifecycleMethod;\n [key: string]: unknown;\n}\n\nexport interface ServerExtOptions {\n [key: string]: unknown;\n}\n\n/**\n * This symbol is used to mark a Hapi route handler or server extension handler as\n * already patched, since it's possible to use these handlers multiple times\n * i.e. when allowing multiple versions of one plugin, or when registering a plugin\n * multiple times on different servers.\n */\nexport const handlerPatched: unique symbol = Symbol('hapi-handler-patched');\n\nexport type PatchableServerRoute = ServerRoute & {\n [handlerPatched]?: boolean;\n};\n\nexport type PatchableExtMethod = LifecycleMethod & {\n [handlerPatched]?: boolean;\n};\n\nexport type ServerExtDirectInput = [ServerRequestExtType, LifecycleMethod, (ServerExtOptions | undefined)?];\n\nexport const HapiLayerType = {\n ROUTER: 'router',\n PLUGIN: 'plugin',\n EXT: 'server.ext',\n} as const;\n\nexport const HapiLifecycleMethodNames = new Set<string>(LIFECYCLE_EXT_POINTS);\n\n/** The `request`/`error` event payload passed to the error listener. */\nexport interface HapiRequestEvent {\n error?: unknown;\n [key: string]: unknown;\n}\n\n/**\n * The final response attached to a hapi request. On error it is a Boom object\n * (`isBoom`, with the HTTP status under `output.statusCode`); otherwise a normal\n * response carrying `statusCode`. Both are read to derive the status for\n * `shouldHandleError`.\n */\nexport interface HapiResponse {\n statusCode?: number;\n isBoom?: boolean;\n output?: { statusCode?: number };\n}\n\n/** The subset of a hapi request the error listener reads. */\nexport interface HapiRequest {\n method: string;\n route: { path?: string; method: string };\n response?: HapiResponse;\n [key: string]: unknown;\n}\n\n/**\n * Callback deciding whether an error surfaced by hapi should be captured and\n * sent to Sentry. Receives the error and the hapi request (whose `response`\n * carries the resolved HTTP status).\n */\nexport type HapiShouldHandleError = (error: unknown, request: HapiRequest) => boolean;\n\n/** The shared hapi server event emitter (`core.events`, a Podium instance). */\nexport interface HapiServerEvents {\n on(\n criteria: { name: string; channels: string[] },\n listener: (request: HapiRequest, event: HapiRequestEvent) => void,\n ): void;\n [key: string]: unknown;\n}\n\n/** The subset of a hapi server the error handler needs. */\nexport interface HapiServer {\n events: HapiServerEvents;\n [key: string]: unknown;\n}\n"],"
|
|
1
|
+
{"version":3,"file":"hapi-types.js","names":[],"sources":["../../../../src/integrations/hapi/hapi-types.ts"],"sourcesContent":["/*\n * Structural type definitions and constants ported from the vendored\n * `@opentelemetry/instrumentation-hapi` types, with all `@hapi/*` and\n * `@opentelemetry/*` dependencies removed. Only the shapes actually accessed by\n * the orchestrion hapi subscriber are kept.\n */\n\n// Single source of truth for the request lifecycle extension points, so the\n// `ServerRequestExtType` union and the runtime `HapiLifecycleMethodNames` set\n// below can't drift apart.\nconst LIFECYCLE_EXT_POINTS = [\n 'onPreAuth',\n 'onCredentials',\n 'onPostAuth',\n 'onPreHandler',\n 'onPostHandler',\n 'onPreResponse',\n 'onRequest',\n] as const;\n\nexport type ServerRequestExtType = (typeof LIFECYCLE_EXT_POINTS)[number];\n\nexport type LifecycleMethod = (request: unknown, h: unknown, err?: Error) => unknown;\n\nexport interface ServerRouteOptions {\n handler?: LifecycleMethod | unknown;\n [key: string]: unknown;\n}\n\nexport interface ServerRoute {\n path: string;\n method: string | string[];\n handler?: LifecycleMethod | unknown;\n options?: ((server: unknown) => ServerRouteOptions) | ServerRouteOptions;\n [key: string]: unknown;\n}\n\nexport interface ServerExtEventsObject {\n type: string;\n [key: string]: unknown;\n}\n\nexport interface ServerExtEventsRequestObject {\n type: ServerRequestExtType;\n method: LifecycleMethod;\n [key: string]: unknown;\n}\n\nexport interface ServerExtOptions {\n [key: string]: unknown;\n}\n\n/**\n * This symbol is used to mark a Hapi route handler or server extension handler as\n * already patched, since it's possible to use these handlers multiple times\n * i.e. when allowing multiple versions of one plugin, or when registering a plugin\n * multiple times on different servers.\n */\nexport const handlerPatched: unique symbol = Symbol('hapi-handler-patched');\n\nexport type PatchableServerRoute = ServerRoute & {\n [handlerPatched]?: boolean;\n};\n\nexport type PatchableExtMethod = LifecycleMethod & {\n [handlerPatched]?: boolean;\n};\n\nexport type ServerExtDirectInput = [ServerRequestExtType, LifecycleMethod, (ServerExtOptions | undefined)?];\n\nexport const HapiLayerType = {\n ROUTER: 'router',\n PLUGIN: 'plugin',\n EXT: 'server.ext',\n} as const;\n\nexport const HapiLifecycleMethodNames = new Set<string>(LIFECYCLE_EXT_POINTS);\n\n/** The `request`/`error` event payload passed to the error listener. */\nexport interface HapiRequestEvent {\n error?: unknown;\n [key: string]: unknown;\n}\n\n/**\n * The final response attached to a hapi request. On error it is a Boom object\n * (`isBoom`, with the HTTP status under `output.statusCode`); otherwise a normal\n * response carrying `statusCode`. Both are read to derive the status for\n * `shouldHandleError`.\n */\nexport interface HapiResponse {\n statusCode?: number;\n isBoom?: boolean;\n output?: { statusCode?: number };\n}\n\n/** The subset of a hapi request the error listener reads. */\nexport interface HapiRequest {\n method: string;\n route: { path?: string; method: string };\n response?: HapiResponse;\n [key: string]: unknown;\n}\n\n/**\n * Callback deciding whether an error surfaced by hapi should be captured and\n * sent to Sentry. Receives the error and the hapi request (whose `response`\n * carries the resolved HTTP status).\n */\nexport type HapiShouldHandleError = (error: unknown, request: HapiRequest) => boolean;\n\n/** The shared hapi server event emitter (`core.events`, a Podium instance). */\nexport interface HapiServerEvents {\n on(\n criteria: { name: string; channels: string[] },\n listener: (request: HapiRequest, event: HapiRequestEvent) => void,\n ): void;\n [key: string]: unknown;\n}\n\n/** The subset of a hapi server the error handler needs. */\nexport interface HapiServer {\n events: HapiServerEvents;\n [key: string]: unknown;\n}\n"],"mappings":";AAUA,MAAM,uBAAuB;CAC3B;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;AAwCA,MAAa,iBAAgC,OAAO,sBAAsB;AAY1E,MAAa,gBAAgB;CAC3B,QAAQ;CACR,QAAQ;CACR,KAAK;AACP;AAEA,MAAa,2BAA2B,IAAI,IAAY,oBAAoB"}
|