@sentry/server-utils 10.65.0 → 10.66.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/cjs/graphql/graphql-dc-subscriber.js +2 -4
- package/build/cjs/graphql/graphql-dc-subscriber.js.map +1 -1
- package/build/cjs/graphql/utils.js +7 -1
- package/build/cjs/graphql/utils.js.map +1 -1
- package/build/cjs/index.js +11 -8
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/dataloader.js +95 -0
- package/build/cjs/integrations/tracing-channel/dataloader.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/generic-pool.js +34 -0
- package/build/cjs/integrations/tracing-channel/generic-pool.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/graphql/spans.js +2 -2
- package/build/cjs/integrations/tracing-channel/graphql/spans.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/ioredis.js +29 -26
- package/build/cjs/integrations/tracing-channel/ioredis.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/kafkajs/consumer.js +71 -0
- package/build/cjs/integrations/tracing-channel/kafkajs/consumer.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/kafkajs/index.js +70 -0
- package/build/cjs/integrations/tracing-channel/kafkajs/index.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/kafkajs/semconv.js +22 -0
- package/build/cjs/integrations/tracing-channel/kafkajs/semconv.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/kafkajs/spans.js +119 -0
- package/build/cjs/integrations/tracing-channel/kafkajs/spans.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/knex.js +188 -0
- package/build/cjs/integrations/tracing-channel/knex.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/mysql2.js +83 -0
- package/build/cjs/integrations/tracing-channel/mysql2.js.map +1 -0
- package/build/cjs/orchestrion/bundler/esbuild.js +11 -0
- package/build/cjs/orchestrion/bundler/esbuild.js.map +1 -0
- package/build/cjs/orchestrion/bundler/options.js +15 -0
- package/build/cjs/orchestrion/bundler/options.js.map +1 -0
- package/build/cjs/orchestrion/bundler/rollup.js +11 -0
- package/build/cjs/orchestrion/bundler/rollup.js.map +1 -0
- package/build/cjs/orchestrion/bundler/vite.js +4 -21
- package/build/cjs/orchestrion/bundler/vite.js.map +1 -1
- package/build/cjs/orchestrion/bundler/webpack.js +32 -0
- package/build/cjs/orchestrion/bundler/webpack.js.map +1 -0
- package/build/cjs/orchestrion/channels.js +50 -20
- package/build/cjs/orchestrion/channels.js.map +1 -1
- package/build/cjs/orchestrion/config/dataloader.js +53 -0
- package/build/cjs/orchestrion/config/dataloader.js.map +1 -0
- package/build/cjs/orchestrion/config/firebase.js +8 -0
- package/build/cjs/orchestrion/config/firebase.js.map +1 -0
- package/build/cjs/orchestrion/config/generic-pool.js +21 -0
- package/build/cjs/orchestrion/config/generic-pool.js.map +1 -0
- package/build/cjs/orchestrion/config/index.js +55 -23
- package/build/cjs/orchestrion/config/index.js.map +1 -1
- package/build/cjs/orchestrion/config/kafkajs.js +30 -0
- package/build/cjs/orchestrion/config/kafkajs.js.map +1 -0
- package/build/cjs/orchestrion/config/knex.js +43 -0
- package/build/cjs/orchestrion/config/knex.js.map +1 -0
- package/build/cjs/orchestrion/config/langchain.js +8 -0
- package/build/cjs/orchestrion/config/langchain.js.map +1 -0
- package/build/cjs/orchestrion/config/langgraph.js +8 -0
- package/build/cjs/orchestrion/config/langgraph.js.map +1 -0
- package/build/cjs/orchestrion/config/mongodb.js +8 -0
- package/build/cjs/orchestrion/config/mongodb.js.map +1 -0
- package/build/cjs/orchestrion/config/mongoose.js +8 -0
- package/build/cjs/orchestrion/config/mongoose.js.map +1 -0
- package/build/cjs/orchestrion/config/mysql2.js +32 -0
- package/build/cjs/orchestrion/config/mysql2.js.map +1 -0
- package/build/cjs/orchestrion/config/nestjs.js +122 -0
- package/build/cjs/orchestrion/config/nestjs.js.map +1 -0
- package/build/cjs/orchestrion/config/prisma.js +8 -0
- package/build/cjs/orchestrion/config/prisma.js.map +1 -0
- package/build/cjs/orchestrion/config/react-router.js +8 -0
- package/build/cjs/orchestrion/config/react-router.js.map +1 -0
- package/build/cjs/orchestrion/config/remix.js +8 -0
- package/build/cjs/orchestrion/config/remix.js.map +1 -0
- package/build/cjs/orchestrion/config/tedious.js +8 -0
- package/build/cjs/orchestrion/config/tedious.js.map +1 -0
- package/build/cjs/orchestrion/detect.js +12 -11
- package/build/cjs/orchestrion/detect.js.map +1 -1
- package/build/cjs/orchestrion/index.js +16 -1
- package/build/cjs/orchestrion/index.js.map +1 -1
- package/build/cjs/orchestrion/runtime/register.js +25 -14
- package/build/cjs/orchestrion/runtime/register.js.map +1 -1
- package/build/cjs/prisma/global.js +14 -0
- package/build/cjs/prisma/global.js.map +1 -0
- package/build/cjs/prisma/index.js +27 -0
- package/build/cjs/prisma/index.js.map +1 -0
- package/build/cjs/prisma/tracing-helper.js +211 -0
- package/build/cjs/prisma/tracing-helper.js.map +1 -0
- package/build/cjs/vercel-ai/util.js +0 -11
- package/build/cjs/vercel-ai/util.js.map +1 -1
- package/build/cjs/vercel-ai/vercel-ai-dc-subscriber.js +9 -9
- package/build/cjs/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -1
- package/build/esm/graphql/graphql-dc-subscriber.js +3 -5
- package/build/esm/graphql/graphql-dc-subscriber.js.map +1 -1
- package/build/esm/graphql/utils.js +8 -2
- package/build/esm/graphql/utils.js.map +1 -1
- package/build/esm/index.js +1 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/integrations/tracing-channel/dataloader.js +93 -0
- package/build/esm/integrations/tracing-channel/dataloader.js.map +1 -0
- package/build/esm/integrations/tracing-channel/generic-pool.js +32 -0
- package/build/esm/integrations/tracing-channel/generic-pool.js.map +1 -0
- package/build/esm/integrations/tracing-channel/graphql/spans.js +3 -3
- package/build/esm/integrations/tracing-channel/graphql/spans.js.map +1 -1
- package/build/esm/integrations/tracing-channel/ioredis.js +29 -27
- package/build/esm/integrations/tracing-channel/ioredis.js.map +1 -1
- package/build/esm/integrations/tracing-channel/kafkajs/consumer.js +67 -0
- package/build/esm/integrations/tracing-channel/kafkajs/consumer.js.map +1 -0
- package/build/esm/integrations/tracing-channel/kafkajs/index.js +68 -0
- package/build/esm/integrations/tracing-channel/kafkajs/index.js.map +1 -0
- package/build/esm/integrations/tracing-channel/kafkajs/semconv.js +12 -0
- package/build/esm/integrations/tracing-channel/kafkajs/semconv.js.map +1 -0
- package/build/esm/integrations/tracing-channel/kafkajs/spans.js +112 -0
- package/build/esm/integrations/tracing-channel/kafkajs/spans.js.map +1 -0
- package/build/esm/integrations/tracing-channel/knex.js +186 -0
- package/build/esm/integrations/tracing-channel/knex.js.map +1 -0
- package/build/esm/integrations/tracing-channel/mysql2.js +81 -0
- package/build/esm/integrations/tracing-channel/mysql2.js.map +1 -0
- package/build/esm/orchestrion/bundler/esbuild.js +9 -0
- package/build/esm/orchestrion/bundler/esbuild.js.map +1 -0
- package/build/esm/orchestrion/bundler/options.js +13 -0
- package/build/esm/orchestrion/bundler/options.js.map +1 -0
- package/build/esm/orchestrion/bundler/rollup.js +9 -0
- package/build/esm/orchestrion/bundler/rollup.js.map +1 -0
- package/build/esm/orchestrion/bundler/vite.js +5 -22
- package/build/esm/orchestrion/bundler/vite.js.map +1 -1
- package/build/esm/orchestrion/bundler/webpack.js +27 -0
- package/build/esm/orchestrion/bundler/webpack.js.map +1 -0
- package/build/esm/orchestrion/channels.js +50 -20
- package/build/esm/orchestrion/channels.js.map +1 -1
- package/build/esm/orchestrion/config/dataloader.js +50 -0
- package/build/esm/orchestrion/config/dataloader.js.map +1 -0
- package/build/esm/orchestrion/config/firebase.js +5 -0
- package/build/esm/orchestrion/config/firebase.js.map +1 -0
- package/build/esm/orchestrion/config/generic-pool.js +18 -0
- package/build/esm/orchestrion/config/generic-pool.js.map +1 -0
- package/build/esm/orchestrion/config/index.js +55 -24
- package/build/esm/orchestrion/config/index.js.map +1 -1
- package/build/esm/orchestrion/config/kafkajs.js +27 -0
- package/build/esm/orchestrion/config/kafkajs.js.map +1 -0
- package/build/esm/orchestrion/config/knex.js +40 -0
- package/build/esm/orchestrion/config/knex.js.map +1 -0
- package/build/esm/orchestrion/config/langchain.js +5 -0
- package/build/esm/orchestrion/config/langchain.js.map +1 -0
- package/build/esm/orchestrion/config/langgraph.js +5 -0
- package/build/esm/orchestrion/config/langgraph.js.map +1 -0
- package/build/esm/orchestrion/config/mongodb.js +5 -0
- package/build/esm/orchestrion/config/mongodb.js.map +1 -0
- package/build/esm/orchestrion/config/mongoose.js +5 -0
- package/build/esm/orchestrion/config/mongoose.js.map +1 -0
- package/build/esm/orchestrion/config/mysql2.js +29 -0
- package/build/esm/orchestrion/config/mysql2.js.map +1 -0
- package/build/esm/orchestrion/config/nestjs.js +119 -0
- package/build/esm/orchestrion/config/nestjs.js.map +1 -0
- package/build/esm/orchestrion/config/prisma.js +5 -0
- package/build/esm/orchestrion/config/prisma.js.map +1 -0
- package/build/esm/orchestrion/config/react-router.js +5 -0
- package/build/esm/orchestrion/config/react-router.js.map +1 -0
- package/build/esm/orchestrion/config/remix.js +5 -0
- package/build/esm/orchestrion/config/remix.js.map +1 -0
- package/build/esm/orchestrion/config/tedious.js +5 -0
- package/build/esm/orchestrion/config/tedious.js.map +1 -0
- package/build/esm/orchestrion/detect.js +13 -12
- package/build/esm/orchestrion/detect.js.map +1 -1
- package/build/esm/orchestrion/index.js +11 -2
- package/build/esm/orchestrion/index.js.map +1 -1
- package/build/esm/orchestrion/runtime/register.js +27 -16
- package/build/esm/orchestrion/runtime/register.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/prisma/global.js +12 -0
- package/build/esm/prisma/global.js.map +1 -0
- package/build/esm/prisma/index.js +24 -0
- package/build/esm/prisma/index.js.map +1 -0
- package/build/esm/prisma/tracing-helper.js +209 -0
- package/build/esm/prisma/tracing-helper.js.map +1 -0
- package/build/esm/vercel-ai/util.js +1 -11
- package/build/esm/vercel-ai/util.js.map +1 -1
- package/build/esm/vercel-ai/vercel-ai-dc-subscriber.js +11 -11
- package/build/esm/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -1
- package/build/types/graphql/utils.d.ts +2 -6
- package/build/types/graphql/utils.d.ts.map +1 -1
- package/build/types/index.d.ts +2 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/dataloader.d.ts +11 -0
- package/build/types/integrations/tracing-channel/dataloader.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/generic-pool.d.ts +10 -0
- package/build/types/integrations/tracing-channel/generic-pool.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/ioredis.d.ts +20 -0
- package/build/types/integrations/tracing-channel/ioredis.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/kafkajs/consumer.d.ts +8 -0
- package/build/types/integrations/tracing-channel/kafkajs/consumer.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/kafkajs/index.d.ts +17 -0
- package/build/types/integrations/tracing-channel/kafkajs/index.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/kafkajs/semconv.d.ts +10 -0
- package/build/types/integrations/tracing-channel/kafkajs/semconv.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/kafkajs/spans.d.ts +38 -0
- package/build/types/integrations/tracing-channel/kafkajs/spans.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/kafkajs/types.d.ts +40 -0
- package/build/types/integrations/tracing-channel/kafkajs/types.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/knex.d.ts +11 -0
- package/build/types/integrations/tracing-channel/knex.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/mysql2.d.ts +15 -0
- package/build/types/integrations/tracing-channel/mysql2.d.ts.map +1 -0
- package/build/types/orchestrion/bundler/esbuild.d.ts +21 -0
- package/build/types/orchestrion/bundler/esbuild.d.ts.map +1 -0
- package/build/types/orchestrion/bundler/options.d.ts +19 -0
- package/build/types/orchestrion/bundler/options.d.ts.map +1 -0
- package/build/types/orchestrion/bundler/rollup.d.ts +17 -0
- package/build/types/orchestrion/bundler/rollup.d.ts.map +1 -0
- package/build/types/orchestrion/bundler/vite.d.ts +4 -17
- package/build/types/orchestrion/bundler/vite.d.ts.map +1 -1
- package/build/types/orchestrion/bundler/webpack.d.ts +19 -0
- package/build/types/orchestrion/bundler/webpack.d.ts.map +1 -0
- package/build/types/orchestrion/channels.d.ts +64 -37
- package/build/types/orchestrion/channels.d.ts.map +1 -1
- package/build/types/orchestrion/config/dataloader.d.ts +46 -0
- package/build/types/orchestrion/config/dataloader.d.ts.map +1 -0
- package/build/types/orchestrion/config/firebase.d.ts +4 -0
- package/build/types/orchestrion/config/firebase.d.ts.map +1 -0
- package/build/types/orchestrion/config/generic-pool.d.ts +31 -0
- package/build/types/orchestrion/config/generic-pool.d.ts.map +1 -0
- package/build/types/orchestrion/config/index.d.ts +18 -5
- package/build/types/orchestrion/config/index.d.ts.map +1 -1
- package/build/types/orchestrion/config/kafkajs.d.ts +17 -0
- package/build/types/orchestrion/config/kafkajs.d.ts.map +1 -0
- package/build/types/orchestrion/config/knex.d.ts +9 -0
- package/build/types/orchestrion/config/knex.d.ts.map +1 -0
- package/build/types/orchestrion/config/langchain.d.ts +4 -0
- package/build/types/orchestrion/config/langchain.d.ts.map +1 -0
- package/build/types/orchestrion/config/langgraph.d.ts +4 -0
- package/build/types/orchestrion/config/langgraph.d.ts.map +1 -0
- package/build/types/orchestrion/config/mongodb.d.ts +4 -0
- package/build/types/orchestrion/config/mongodb.d.ts.map +1 -0
- package/build/types/orchestrion/config/mongoose.d.ts +4 -0
- package/build/types/orchestrion/config/mongoose.d.ts.map +1 -0
- package/build/types/orchestrion/config/mysql2.d.ts +18 -0
- package/build/types/orchestrion/config/mysql2.d.ts.map +1 -0
- package/build/types/orchestrion/config/nestjs.d.ts +24 -0
- package/build/types/orchestrion/config/nestjs.d.ts.map +1 -0
- package/build/types/orchestrion/config/prisma.d.ts +4 -0
- package/build/types/orchestrion/config/prisma.d.ts.map +1 -0
- package/build/types/orchestrion/config/react-router.d.ts +4 -0
- package/build/types/orchestrion/config/react-router.d.ts.map +1 -0
- package/build/types/orchestrion/config/remix.d.ts +4 -0
- package/build/types/orchestrion/config/remix.d.ts.map +1 -0
- package/build/types/orchestrion/config/tedious.d.ts +4 -0
- package/build/types/orchestrion/config/tedious.d.ts.map +1 -0
- package/build/types/orchestrion/detect.d.ts +3 -10
- package/build/types/orchestrion/detect.d.ts.map +1 -1
- package/build/types/orchestrion/index.d.ts +25 -1
- package/build/types/orchestrion/index.d.ts.map +1 -1
- package/build/types/orchestrion/runtime/register.d.ts +11 -9
- package/build/types/orchestrion/runtime/register.d.ts.map +1 -1
- package/build/types/prisma/global.d.ts +5 -0
- package/build/types/prisma/global.d.ts.map +1 -0
- package/build/types/prisma/index.d.ts +45 -0
- package/build/types/prisma/index.d.ts.map +1 -0
- package/build/types/prisma/tracing-helper.d.ts +46 -0
- package/build/types/prisma/tracing-helper.d.ts.map +1 -0
- package/build/types/prisma/types.d.ts +37 -0
- package/build/types/prisma/types.d.ts.map +1 -0
- package/build/types/vercel-ai/util.d.ts +0 -2
- package/build/types/vercel-ai/util.d.ts.map +1 -1
- package/build/types/vercel-ai/vercel-ai-dc-subscriber.d.ts.map +1 -1
- package/build/types-ts3.8/graphql/utils.d.ts +2 -6
- package/build/types-ts3.8/index.d.ts +2 -0
- package/build/types-ts3.8/integrations/tracing-channel/dataloader.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing-channel/generic-pool.d.ts +10 -0
- package/build/types-ts3.8/integrations/tracing-channel/ioredis.d.ts +20 -0
- package/build/types-ts3.8/integrations/tracing-channel/kafkajs/consumer.d.ts +8 -0
- package/build/types-ts3.8/integrations/tracing-channel/kafkajs/index.d.ts +17 -0
- package/build/types-ts3.8/integrations/tracing-channel/kafkajs/semconv.d.ts +10 -0
- package/build/types-ts3.8/integrations/tracing-channel/kafkajs/spans.d.ts +38 -0
- package/build/types-ts3.8/integrations/tracing-channel/kafkajs/types.d.ts +40 -0
- package/build/types-ts3.8/integrations/tracing-channel/knex.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing-channel/mysql2.d.ts +15 -0
- package/build/types-ts3.8/orchestrion/bundler/esbuild.d.ts +21 -0
- package/build/types-ts3.8/orchestrion/bundler/options.d.ts +19 -0
- package/build/types-ts3.8/orchestrion/bundler/rollup.d.ts +17 -0
- package/build/types-ts3.8/orchestrion/bundler/vite.d.ts +4 -17
- package/build/types-ts3.8/orchestrion/bundler/webpack.d.ts +19 -0
- package/build/types-ts3.8/orchestrion/channels.d.ts +64 -37
- package/build/types-ts3.8/orchestrion/config/dataloader.d.ts +46 -0
- package/build/types-ts3.8/orchestrion/config/firebase.d.ts +4 -0
- package/build/types-ts3.8/orchestrion/config/generic-pool.d.ts +31 -0
- package/build/types-ts3.8/orchestrion/config/index.d.ts +18 -5
- package/build/types-ts3.8/orchestrion/config/kafkajs.d.ts +17 -0
- package/build/types-ts3.8/orchestrion/config/knex.d.ts +9 -0
- package/build/types-ts3.8/orchestrion/config/langchain.d.ts +4 -0
- package/build/types-ts3.8/orchestrion/config/langgraph.d.ts +4 -0
- package/build/types-ts3.8/orchestrion/config/mongodb.d.ts +4 -0
- package/build/types-ts3.8/orchestrion/config/mongoose.d.ts +4 -0
- package/build/types-ts3.8/orchestrion/config/mysql2.d.ts +18 -0
- package/build/types-ts3.8/orchestrion/config/nestjs.d.ts +24 -0
- package/build/types-ts3.8/orchestrion/config/prisma.d.ts +4 -0
- package/build/types-ts3.8/orchestrion/config/react-router.d.ts +4 -0
- package/build/types-ts3.8/orchestrion/config/remix.d.ts +4 -0
- package/build/types-ts3.8/orchestrion/config/tedious.d.ts +4 -0
- package/build/types-ts3.8/orchestrion/detect.d.ts +3 -10
- package/build/types-ts3.8/orchestrion/index.d.ts +25 -1
- package/build/types-ts3.8/orchestrion/runtime/register.d.ts +11 -9
- package/build/types-ts3.8/prisma/global.d.ts +5 -0
- package/build/types-ts3.8/prisma/index.d.ts +45 -0
- package/build/types-ts3.8/prisma/tracing-helper.d.ts +52 -0
- package/build/types-ts3.8/prisma/types.d.ts +40 -0
- package/build/types-ts3.8/vercel-ai/util.d.ts +0 -2
- package/package.json +41 -8
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
declare global {
|
|
2
|
-
var __SENTRY_ORCHESTRION__: {
|
|
3
|
-
runtime?: boolean;
|
|
4
|
-
bundler?: boolean;
|
|
5
|
-
} | undefined;
|
|
6
|
-
}
|
|
7
1
|
/**
|
|
8
2
|
* Whether orchestrion has injected the diagnostics channels into this process,
|
|
9
3
|
* either by the runtime `--import` hook / init-time registration (`runtime`)
|
|
@@ -17,7 +11,9 @@ export declare function isOrchestrionInjected(): boolean;
|
|
|
17
11
|
/**
|
|
18
12
|
* Verifies that the diagnostics channels have been injected either by the
|
|
19
13
|
* runtime `--import` hook (or init-time registration), a bundler plugin, or
|
|
20
|
-
* both, and warns if not.
|
|
14
|
+
* both, and warns if not. When at least one injector is active, logs for each
|
|
15
|
+
* mechanism whether it hooked (a defined array, even empty, means it did) and
|
|
16
|
+
* which libraries it injected.
|
|
21
17
|
*
|
|
22
18
|
* Both injectors being active at once is fine: they operate on disjoint module
|
|
23
19
|
* sets (a module is either loaded through Node's loader and transformed by the
|
|
@@ -25,9 +21,6 @@ export declare function isOrchestrionInjected(): boolean;
|
|
|
25
21
|
* a single module can't be double-wrapped. A hybrid setup, with some deps
|
|
26
22
|
* external and runtime-instrumented, others bundled and plugin-instrumented,
|
|
27
23
|
* is fine.
|
|
28
|
-
*
|
|
29
|
-
* Note: intentionally does NOT warn in production, only in debug builds,
|
|
30
|
-
* because production warnings are reserved for truly critical issues.
|
|
31
24
|
*/
|
|
32
25
|
export declare function detectOrchestrionSetup(): void;
|
|
33
26
|
//# sourceMappingURL=detect.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../../src/orchestrion/detect.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../../src/orchestrion/detect.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CAE/C;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAsB7C"}
|
|
@@ -1,18 +1,24 @@
|
|
|
1
1
|
import { amqplibChannelIntegration } from '../integrations/tracing-channel/amqplib';
|
|
2
2
|
import { anthropicChannelIntegration } from '../integrations/tracing-channel/anthropic';
|
|
3
|
+
import { dataloaderChannelIntegration } from '../integrations/tracing-channel/dataloader';
|
|
4
|
+
import { genericPoolChannelIntegration } from '../integrations/tracing-channel/generic-pool';
|
|
3
5
|
import { googleGenAIChannelIntegration } from '../integrations/tracing-channel/google-genai';
|
|
4
6
|
import { graphqlChannelIntegration } from '../integrations/tracing-channel/graphql';
|
|
5
7
|
import { hapiChannelIntegration } from '../integrations/tracing-channel/hapi';
|
|
6
8
|
import { ioredisChannelIntegration } from '../integrations/tracing-channel/ioredis';
|
|
9
|
+
import { kafkajsChannelIntegration } from '../integrations/tracing-channel/kafkajs';
|
|
10
|
+
import { knexChannelIntegration } from '../integrations/tracing-channel/knex';
|
|
7
11
|
import { lruMemoizerChannelIntegration } from '../integrations/tracing-channel/lru-memoizer';
|
|
8
12
|
import { mysqlChannelIntegration } from '../integrations/tracing-channel/mysql';
|
|
13
|
+
import { mysql2ChannelIntegration } from '../integrations/tracing-channel/mysql2';
|
|
9
14
|
import { openaiChannelIntegration } from '../integrations/tracing-channel/openai';
|
|
10
15
|
import { postgresChannelIntegration } from '../integrations/tracing-channel/postgres';
|
|
11
16
|
import { postgresJsChannelIntegration } from '../integrations/tracing-channel/postgres-js';
|
|
12
17
|
import { vercelAiChannelIntegration } from '../integrations/tracing-channel/vercel-ai';
|
|
13
18
|
import { expressChannelIntegration } from '../integrations/tracing-channel/express';
|
|
14
19
|
export { detectOrchestrionSetup, isOrchestrionInjected } from './detect';
|
|
15
|
-
export {
|
|
20
|
+
export { nestjsChannels } from './config/nestjs';
|
|
21
|
+
export { amqplibChannelIntegration, anthropicChannelIntegration, dataloaderChannelIntegration, genericPoolChannelIntegration, googleGenAIChannelIntegration, graphqlChannelIntegration, hapiChannelIntegration, ioredisChannelIntegration, kafkajsChannelIntegration, knexChannelIntegration, lruMemoizerChannelIntegration, mysqlChannelIntegration, mysql2ChannelIntegration, openaiChannelIntegration, postgresChannelIntegration, postgresJsChannelIntegration, vercelAiChannelIntegration, expressChannelIntegration, };
|
|
16
22
|
export type { IORedisChannelIntegrationOptions, IORedisResponseHook } from '../integrations/tracing-channel/ioredis';
|
|
17
23
|
export type { PostgresJsChannelIntegrationOptions } from '../integrations/tracing-channel/postgres-js';
|
|
18
24
|
export { redisChannelIntegration } from '../integrations/tracing-channel/redis';
|
|
@@ -30,6 +36,15 @@ export type * from '../integrations/tracing-channel/graphql/graphql-types';
|
|
|
30
36
|
* NOTE: `ioredisChannelIntegration` and `redisChannelIntegration` are intentionally NOT here. They
|
|
31
37
|
* only partially replace the composite OTel `Redis` integration and need the node SDK's redis cache
|
|
32
38
|
* `responseHook` (which can't live in `server-utils`), so `@sentry/node` wires them up separately.
|
|
39
|
+
*
|
|
40
|
+
* Framework SDKs that own their own channel listener (e.g. `@sentry/nestjs`'s `Nest`) are NOT here
|
|
41
|
+
* either: their transform config is still in `SENTRY_INSTRUMENTATIONS`, but the listener lives in
|
|
42
|
+
* their package and picks the channel-vs-OTel path itself at `setupOnce`, so it needs no central swap.
|
|
43
|
+
*
|
|
44
|
+
* NOTE: `dataloaderChannelIntegration` is also NOT here. Everything in this map is auto-appended to
|
|
45
|
+
* the default integrations, but the OTel `Dataloader` integration is opt-in (never a default). Like
|
|
46
|
+
* `@sentry/nestjs`'s `Nest`, its `@sentry/node` factory picks the channel-vs-OTel path itself at
|
|
47
|
+
* `setupOnce` (via `isOrchestrionInjected()`), so there's nothing for the central swap to do.
|
|
33
48
|
*/
|
|
34
49
|
export declare const channelIntegrations: {
|
|
35
50
|
readonly postgresIntegration: (options?: {
|
|
@@ -43,6 +58,12 @@ export declare const channelIntegrations: {
|
|
|
43
58
|
readonly mysqlIntegration: () => import("@sentry/core").Integration & {
|
|
44
59
|
name: "Mysql";
|
|
45
60
|
};
|
|
61
|
+
readonly mysql2Integration: () => import("@sentry/core").Integration & {
|
|
62
|
+
name: "Mysql2";
|
|
63
|
+
};
|
|
64
|
+
readonly genericPoolIntegration: () => import("@sentry/core").Integration & {
|
|
65
|
+
name: "GenericPool";
|
|
66
|
+
};
|
|
46
67
|
readonly lruMemoizerIntegration: () => import("@sentry/core").Integration & {
|
|
47
68
|
name: "LruMemoizer";
|
|
48
69
|
};
|
|
@@ -77,5 +98,8 @@ export declare const channelIntegrations: {
|
|
|
77
98
|
name: "Graphql";
|
|
78
99
|
setupOnce: () => void | undefined;
|
|
79
100
|
};
|
|
101
|
+
readonly kafkajsIntegration: () => import("@sentry/core").Integration & {
|
|
102
|
+
name: "Kafka";
|
|
103
|
+
};
|
|
80
104
|
};
|
|
81
105
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/orchestrion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EACL,yBAAyB,EAE1B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAEpF,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/orchestrion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAC1F,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EACL,yBAAyB,EAE1B,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,wBAAwB,EAAE,MAAM,wCAAwC,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,EAAE,4BAA4B,EAAE,MAAM,6CAA6C,CAAC;AAC3F,OAAO,EAAE,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AACvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAEpF,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAGzE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EACL,yBAAyB,EACzB,2BAA2B,EAC3B,4BAA4B,EAC5B,6BAA6B,EAC7B,6BAA6B,EAC7B,yBAAyB,EACzB,sBAAsB,EACtB,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,6BAA6B,EAC7B,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,4BAA4B,EAC5B,0BAA0B,EAC1B,yBAAyB,GAC1B,CAAC;AACF,YAAY,EAAE,gCAAgC,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AACrH,YAAY,EAAE,mCAAmC,EAAE,MAAM,6CAA6C,CAAC;AACvG,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAChF,YAAY,EAAE,8BAA8B,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAI/G,mBAAmB,uDAAuD,CAAC;AAE3E;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgBtB,CAAC"}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
export interface RegisterDiagnosticsChannelInjectionOptions {
|
|
2
|
+
/**
|
|
3
|
+
* Absolute directory of the `@apm-js-collab/tracing-hooks` package (forward slashes).
|
|
4
|
+
*
|
|
5
|
+
* Needed when SDK code is bundled into an app's server build: the default bare-specifier
|
|
6
|
+
* require then resolves from the emitted chunk, which fails under isolated installs (pnpm).
|
|
7
|
+
* Framework SDKs (e.g. `@sentry/nextjs`) resolve the package at build time and pass its
|
|
8
|
+
* location here; it is loaded through an opaque `createRequire` that bundlers can't trace.
|
|
9
|
+
*/
|
|
10
|
+
tracingHooksDir?: string;
|
|
6
11
|
}
|
|
7
12
|
/**
|
|
8
13
|
* Synchronously register the diagnostics-channel injection module hooks.
|
|
@@ -15,9 +20,6 @@ declare global {
|
|
|
15
20
|
*
|
|
16
21
|
* Libraries imported *after* this call publish the `tracingChannel` events that
|
|
17
22
|
* the channel-based integrations subscribe to.
|
|
18
|
-
*
|
|
19
|
-
* Idempotent via `globalThis.__SENTRY_ORCHESTRION__` — a no-op if the runtime
|
|
20
|
-
* `--import` hook or a bundler plugin already injected the channels.
|
|
21
23
|
*/
|
|
22
|
-
export declare function registerDiagnosticsChannelInjection(): void;
|
|
24
|
+
export declare function registerDiagnosticsChannelInjection(options?: RegisterDiagnosticsChannelInjectionOptions): void;
|
|
23
25
|
//# sourceMappingURL=register.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../src/orchestrion/runtime/register.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../src/orchestrion/runtime/register.ts"],"names":[],"mappings":"AAqBA,MAAM,WAAW,0CAA0C;IACzD;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAgBD;;;;;;;;;;;GAWG;AACH,wBAAgB,mCAAmC,CAAC,OAAO,CAAC,EAAE,0CAA0C,GAAG,IAAI,CA6G9G"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { TracingHelper } from './types';
|
|
2
|
+
export declare function getGlobalTracingHelper(): TracingHelper | undefined;
|
|
3
|
+
export declare function setGlobalTracingHelper(helper: TracingHelper): void;
|
|
4
|
+
export declare function clearGlobalTracingHelper(): void;
|
|
5
|
+
//# sourceMappingURL=global.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"global.d.ts","sourceRoot":"","sources":["../../../src/prisma/global.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAoC,aAAa,EAAE,MAAM,SAAS,CAAC;AAe/E,wBAAgB,sBAAsB,IAAI,aAAa,GAAG,SAAS,CAUlE;AAED,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,aAAa,GAAG,IAAI,CAKlE;AAED,wBAAgB,wBAAwB,IAAI,IAAI,CAG/C"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export interface PrismaInstrumentationConfig {
|
|
2
|
+
/**
|
|
3
|
+
* Span types that should not be traced. Matched against the full span name (e.g. `prisma:client:operation`),
|
|
4
|
+
* either exactly (string) or by pattern (RegExp).
|
|
5
|
+
*/
|
|
6
|
+
ignoreSpanTypes?: (string | RegExp)[];
|
|
7
|
+
}
|
|
8
|
+
export interface PrismaOptions {
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated This is no longer used, v5 works out of the box.
|
|
11
|
+
*/
|
|
12
|
+
prismaInstrumentation?: unknown;
|
|
13
|
+
/**
|
|
14
|
+
* Configuration for the Prisma tracing helper.
|
|
15
|
+
*/
|
|
16
|
+
instrumentationConfig?: PrismaInstrumentationConfig;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Sets up the global Prisma tracing helper that Prisma looks up on `globalThis` to emit tracing data.
|
|
20
|
+
*
|
|
21
|
+
* Prisma reads `globalThis.PRISMA_INSTRUMENTATION` (and its versioned variant) to find a "TracingHelper"
|
|
22
|
+
* which it uses internally to create spans, so it can produce tracing data without depending on
|
|
23
|
+
* OpenTelemetry. The helper we install here mints spans through Sentry's span APIs. A single helper
|
|
24
|
+
* serves both Prisma v5 (which calls `createEngineSpan`) and v6/v7 (which call `dispatchEngineSpans`),
|
|
25
|
+
* so it doesn't blow up on version mismatches.
|
|
26
|
+
*/
|
|
27
|
+
export declare function instrumentPrisma(options?: PrismaOptions): void;
|
|
28
|
+
/**
|
|
29
|
+
* Adds Sentry tracing instrumentation for the [prisma](https://www.npmjs.com/package/prisma) library.
|
|
30
|
+
* For more information, see the [`prismaIntegration` documentation](https://docs.sentry.io/platforms/javascript/guides/node/configuration/integrations/prisma/).
|
|
31
|
+
*
|
|
32
|
+
* NOTE: This integration works out of the box with Prisma v6, and v7.
|
|
33
|
+
* On Prisma versions prior to v6, add `previewFeatures = ["tracing"]` to the client generator block of your Prisma schema:
|
|
34
|
+
*
|
|
35
|
+
* ```
|
|
36
|
+
* generator client {
|
|
37
|
+
* provider = "prisma-client-js"
|
|
38
|
+
* previewFeatures = ["tracing"]
|
|
39
|
+
* }
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare const prismaIntegration: (options?: PrismaOptions | undefined) => import("@sentry/core").Integration & {
|
|
43
|
+
name: "Prisma";
|
|
44
|
+
};
|
|
45
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/prisma/index.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,eAAe,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CACvC;AAED,MAAM,WAAW,aAAa;IAC5B;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;OAEG;IACH,qBAAqB,CAAC,EAAE,2BAA2B,CAAC;CACrD;AAED;;;;;;;;GAQG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,CAAC,EAAE,aAAa,GAAG,IAAI,CAM9D;AAWD;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,iBAAiB;;CAAwC,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { Span } from '@sentry/core';
|
|
2
|
+
import type { EngineSpan, ExtendedSpanOptions, SpanCallback, TracingHelper } from './types';
|
|
3
|
+
type Options = {
|
|
4
|
+
ignoreSpanTypes: (string | RegExp)[];
|
|
5
|
+
};
|
|
6
|
+
type V5EngineSpanEvent = {
|
|
7
|
+
span: boolean;
|
|
8
|
+
spans: V5EngineSpan[];
|
|
9
|
+
};
|
|
10
|
+
type V5EngineSpanKind = 'client' | 'internal';
|
|
11
|
+
type V5EngineSpan = {
|
|
12
|
+
span: boolean;
|
|
13
|
+
name: string;
|
|
14
|
+
trace_id: string;
|
|
15
|
+
span_id: string;
|
|
16
|
+
parent_span_id: string;
|
|
17
|
+
start_time: [number, number];
|
|
18
|
+
end_time: [number, number];
|
|
19
|
+
attributes?: Record<string, string>;
|
|
20
|
+
links?: {
|
|
21
|
+
trace_id: string;
|
|
22
|
+
span_id: string;
|
|
23
|
+
}[];
|
|
24
|
+
kind: V5EngineSpanKind;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* This satisifes the TracingHelper interface for Prisma v5 and v6/v7.
|
|
28
|
+
*/
|
|
29
|
+
export declare class ActiveTracingHelper implements TracingHelper {
|
|
30
|
+
private ignoreSpanTypes;
|
|
31
|
+
constructor({ ignoreSpanTypes }: Options);
|
|
32
|
+
isEnabled(): boolean;
|
|
33
|
+
getTraceParent(span?: Span): string;
|
|
34
|
+
dispatchEngineSpans(spans: EngineSpan[]): void;
|
|
35
|
+
/**
|
|
36
|
+
* Prisma v5 broke the tracing helper interface with the v6 major, replacing `createEngineSpan` with
|
|
37
|
+
* `dispatchEngineSpans`. We implement the v6/v7 interface (`dispatchEngineSpans`) but also keep this
|
|
38
|
+
* v5-only method so the same helper doesn't blow up in Prisma 5 users' faces, minting v5 engine spans
|
|
39
|
+
* through Sentry's span APIs instead of crashing.
|
|
40
|
+
*/
|
|
41
|
+
createEngineSpan(engineSpanEvent: V5EngineSpanEvent): void;
|
|
42
|
+
getActiveContext(): Span | undefined;
|
|
43
|
+
runInChildSpan<R>(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback<R>): R;
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=tracing-helper.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tracing-helper.d.ts","sourceRoot":"","sources":["../../../src/prisma/tracing-helper.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AAWzD,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAiB5F,KAAK,OAAO,GAAG;IACb,eAAe,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;CACtC,CAAC;AAGF,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,KAAK,EAAE,YAAY,EAAE,CAAC;CACvB,CAAC;AAEF,KAAK,gBAAgB,GAAG,QAAQ,GAAG,UAAU,CAAC;AAE9C,KAAK,YAAY,GAAG;IAClB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7B,QAAQ,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,KAAK,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAC;IAChD,IAAI,EAAE,gBAAgB,CAAC;CACxB,CAAC;AAkGF;;GAEG;AACH,qBAAa,mBAAoB,YAAW,aAAa;IACvD,OAAO,CAAC,eAAe,CAAsB;gBAE1B,EAAE,eAAe,EAAE,EAAE,OAAO;IAIxC,SAAS,IAAI,OAAO;IAIpB,cAAc,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM;IAQnC,mBAAmB,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI;IASrD;;;;;OAKG;IACI,gBAAgB,CAAC,eAAe,EAAE,iBAAiB,GAAG,IAAI;IAiB1D,gBAAgB,IAAI,IAAI,GAAG,SAAS;IAIpC,cAAc,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,GAAG,mBAAmB,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC;CAsCpG"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Span, SpanAttributes, SpanKindValue, SpanLink, SpanTimeInput } from '@sentry/core';
|
|
2
|
+
export type SpanCallback<R> = (span?: Span, parentSpan?: Span) => R;
|
|
3
|
+
export interface ExtendedSpanOptions {
|
|
4
|
+
/** The name of the span */
|
|
5
|
+
name: string;
|
|
6
|
+
internal?: boolean;
|
|
7
|
+
/** Whether it propagates context (?=true) */
|
|
8
|
+
active?: boolean;
|
|
9
|
+
attributes?: SpanAttributes;
|
|
10
|
+
kind?: SpanKindValue;
|
|
11
|
+
links?: SpanLink[];
|
|
12
|
+
startTime?: SpanTimeInput;
|
|
13
|
+
}
|
|
14
|
+
export type EngineSpanId = string;
|
|
15
|
+
export type HrTime = [number, number];
|
|
16
|
+
export type EngineSpanKind = 'client' | 'internal';
|
|
17
|
+
export type EngineSpan = {
|
|
18
|
+
id: EngineSpanId;
|
|
19
|
+
parentId: string | null;
|
|
20
|
+
name: string;
|
|
21
|
+
startTime: HrTime;
|
|
22
|
+
endTime: HrTime;
|
|
23
|
+
kind: EngineSpanKind;
|
|
24
|
+
attributes?: Record<string, unknown>;
|
|
25
|
+
links?: EngineSpanId[];
|
|
26
|
+
};
|
|
27
|
+
export interface TracingHelper {
|
|
28
|
+
isEnabled(): boolean;
|
|
29
|
+
getTraceParent(span?: Span): string;
|
|
30
|
+
dispatchEngineSpans(spans: EngineSpan[]): void;
|
|
31
|
+
getActiveContext(): Span | undefined;
|
|
32
|
+
runInChildSpan<R>(nameOrOptions: string | ExtendedSpanOptions, callback: SpanCallback<R>): R;
|
|
33
|
+
}
|
|
34
|
+
export interface PrismaInstrumentationGlobalValue {
|
|
35
|
+
helper?: TracingHelper;
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/prisma/types.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEjG,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,UAAU,CAAC,EAAE,IAAI,KAAK,CAAC,CAAC;AAEpE,MAAM,WAAW,mBAAmB;IAClC,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IAEb,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,cAAc,CAAC;IAC5B,IAAI,CAAC,EAAE,aAAa,CAAC;IACrB,KAAK,CAAC,EAAE,QAAQ,EAAE,CAAC;IACnB,SAAS,CAAC,EAAE,aAAa,CAAC;CAC3B;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAElC,MAAM,MAAM,MAAM,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;AAEtC,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEnD,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,YAAY,CAAC;IACjB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,cAAc,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,KAAK,CAAC,EAAE,YAAY,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,WAAW,aAAa;IAC5B,SAAS,IAAI,OAAO,CAAC;IACrB,cAAc,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM,CAAC;IACpC,mBAAmB,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAC/C,gBAAgB,IAAI,IAAI,GAAG,SAAS,CAAC;IACrC,cAAc,CAAC,CAAC,EAAE,aAAa,EAAE,MAAM,GAAG,mBAAmB,EAAE,QAAQ,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;CAC9F;AAED,MAAM,WAAW,gCAAgC;IAC/C,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB"}
|
|
@@ -5,8 +5,6 @@ export declare function asString(value: unknown): string | undefined;
|
|
|
5
5
|
export declare function asNumber(value: unknown): number | undefined;
|
|
6
6
|
/** Add two optional numbers, treating a missing operand as `0` but returning `undefined` when both are absent. */
|
|
7
7
|
export declare function sum(a: number | undefined, b: number | undefined): number | undefined;
|
|
8
|
-
/** Stringify a value, passing strings through and falling back to a placeholder on circular/unserializable input. */
|
|
9
|
-
export declare function safeStringify(value: unknown): string;
|
|
10
8
|
/** The aggregate handed back once a streamed model call finishes, in the shape `enrichSpanOnEnd` expects. */
|
|
11
9
|
export interface StreamedModelCallResult {
|
|
12
10
|
text?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/vercel-ai/util.ts"],"names":[],"mappings":"AAAA,iHAAiH;AAIjH,4DAA4D;AAC5D,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAE3D;AAED,qFAAqF;AACrF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAE3D;AAED,kHAAkH;AAClH,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAEpF;
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["../../../src/vercel-ai/util.ts"],"names":[],"mappings":"AAAA,iHAAiH;AAIjH,4DAA4D;AAC5D,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAE3D;AAED,qFAAqF;AACrF,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAE3D;AAED,kHAAkH;AAClH,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,SAAS,EAAE,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAEpF;AAoCD,6GAA6G;AAC7G,MAAM,WAAW,uBAAuB;IACtC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;IAC1C,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,8GAA8G;AAC9G,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,cAAc,CAAC,OAAO,CAAC,CAMjF;AAED;;;;;;;;GAQG;AACH,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,cAAc,CAAC,OAAO,CAAC,EAC/B,OAAO,EAAE,CAAC,MAAM,EAAE,uBAAuB,KAAK,IAAI,EAClD,OAAO,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,GAChC,cAAc,CAAC,OAAO,CAAC,CAkDzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vercel-ai-dc-subscriber.d.ts","sourceRoot":"","sources":["../../../src/vercel-ai/vercel-ai-dc-subscriber.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"vercel-ai-dc-subscriber.d.ts","sourceRoot":"","sources":["../../../src/vercel-ai/vercel-ai-dc-subscriber.ts"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,IAAI,EAAkB,MAAM,cAAc,CAAC;AAmBzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,EAAwC,KAAK,uBAAuB,EAA2B,MAAM,QAAQ,CAAC;AAyDrH,2GAA2G;AAC3G,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,sBAAsB,GAAG,IAAI,CAQnE;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAIzD;AA0CD,sEAAsE;AACtE,MAAM,MAAM,gBAAgB,GACxB,cAAc,GACd,YAAY,GACZ,gBAAgB,GAChB,MAAM,GACN,mBAAmB,GACnB,aAAa,GACb,OAAO,GACP,WAAW,GACX,QAAQ,CAAC;AAEb;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,SAAS,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,cAAc,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;AAErG,mHAAmH;AACnH,MAAM,WAAW,sBAAsB;IACrC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,+BAA+B,CAC7C,cAAc,EAAE,6BAA6B,EAC7C,OAAO,GAAE,sBAA2B,GACnC,IAAI,CAgBN;AAwCD,yGAAyG;AACzG,wBAAgB,6BAA6B,CAAC,KAAK,EAAE,uBAAuB,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAuBrG;AA4CD;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,sBAAsB,EAC5B,cAAc,EAAE,sBAAsB,GACrC,IAAI,GAAG,SAAS,CAuDlB;AA6ED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,sBAAsB,EAC5B,cAAc,EAAE,sBAAsB,GACrC,IAAI,CAsFN;AAuED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,sBAAsB,EAAE,KAAK,EAAE,OAAO,GAAG,IAAI,CA0B/F"}
|
|
@@ -29,12 +29,8 @@ export declare function getOperationSpanName(operationType: string | undefined,
|
|
|
29
29
|
/** Whether a graphql execution result carries GraphQL errors (returned on `result.errors`). */
|
|
30
30
|
export declare function hasResultErrors(result: unknown): boolean;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
33
|
-
* the original source text is preserved verbatim except that string/number literal spans are
|
|
34
|
-
* replaced (`"foo"` -> `"*"`, `42` -> `*`). graphql does not sanitize its channel payload, so this
|
|
35
|
-
* prevents raw inline values (potential PII) from leaving the process. Variable values are never
|
|
36
|
-
* included. Returns `undefined` (rather than throwing) on anything it cannot serialize.
|
|
32
|
+
* Returns the redacted document if `dataCollection.graphQL.document` is enabled, `undefined` otherwise.
|
|
37
33
|
*/
|
|
38
|
-
export declare function
|
|
34
|
+
export declare function collectGraphqlDocument(document: GraphqlDocumentNode | undefined): string | undefined;
|
|
39
35
|
export {};
|
|
40
36
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
export { graphqlIntegration } from './graphql';
|
|
8
8
|
export { mongooseIntegration } from './mongoose';
|
|
9
9
|
export { mysql2Integration } from './mysql2';
|
|
10
|
+
export { instrumentPrisma, prismaIntegration } from './prisma';
|
|
11
|
+
export { PrismaInstrumentationConfig, PrismaOptions } from './prisma';
|
|
10
12
|
export { redisIntegration, RedisDiagnosticChannelsOptions } from './redis';
|
|
11
13
|
export { RedisDiagnosticChannelResponseHook } from './redis/redis-dc-subscriber';
|
|
12
14
|
export { defaultDbStatementSerializer } from './redis/redis-statement-serializer';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EXPERIMENTAL: orchestrion-driven `dataloader` integration.
|
|
3
|
+
*
|
|
4
|
+
* Subscribes to the `orchestrion:dataloader:*` diagnostics_channels that the orchestrion code
|
|
5
|
+
* transform injects into `dataloader`'s constructor and prototype methods. Requires the orchestrion
|
|
6
|
+
* runtime hook or bundler plugin to be active.
|
|
7
|
+
*/
|
|
8
|
+
export declare const dataloaderChannelIntegration: () => import("@sentry/core").Integration & {
|
|
9
|
+
name: "Dataloader";
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=dataloader.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EXPERIMENTAL — orchestrion-driven generic-pool integration. Subscribes to
|
|
3
|
+
* `orchestrion:generic-pool:acquire` (injected into `generic-pool/lib/Pool.js`'s
|
|
4
|
+
* `Pool.prototype.acquire`). Creates a `generic-pool.acquire` span for each
|
|
5
|
+
* acquisition. Requires the orchestrion runtime hook or bundler plugin.
|
|
6
|
+
*/
|
|
7
|
+
export declare const genericPoolChannelIntegration: () => import("@sentry/core").Integration & {
|
|
8
|
+
name: "GenericPool";
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=generic-pool.d.ts.map
|
|
@@ -4,6 +4,25 @@ export type IORedisResponseHook = (span: Span, command: string, args: Array<stri
|
|
|
4
4
|
export interface IORedisChannelIntegrationOptions {
|
|
5
5
|
responseHook?: IORedisResponseHook;
|
|
6
6
|
}
|
|
7
|
+
interface RedisClientLike {
|
|
8
|
+
options?: {
|
|
9
|
+
host?: string;
|
|
10
|
+
port?: number;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
interface IORedisCommandContext {
|
|
14
|
+
arguments?: unknown[];
|
|
15
|
+
self?: RedisClientLike;
|
|
16
|
+
result?: unknown;
|
|
17
|
+
error?: unknown;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Builds the db span for an `orchestrion:ioredis:command` payload, or returns `undefined` to skip
|
|
21
|
+
* it: for a non-command payload, or the offline-queue re-send of an already-traced command.
|
|
22
|
+
*
|
|
23
|
+
* Exported for unit testing.
|
|
24
|
+
*/
|
|
25
|
+
export declare function startIORedisCommandSpan(data: IORedisCommandContext): Span | undefined;
|
|
7
26
|
/**
|
|
8
27
|
* EXPERIMENTAL — orchestrion-driven ioredis integration. Subscribes to
|
|
9
28
|
* `orchestrion:ioredis:command` / `:connect` (injected into ioredis' `<5.11.0`
|
|
@@ -14,4 +33,5 @@ export interface IORedisChannelIntegrationOptions {
|
|
|
14
33
|
export declare const ioredisChannelIntegration: (options?: IORedisChannelIntegrationOptions | undefined) => import("@sentry/core").Integration & {
|
|
15
34
|
name: "IORedis";
|
|
16
35
|
};
|
|
36
|
+
export {};
|
|
17
37
|
//# sourceMappingURL=ioredis.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { EachBatchHandler, EachMessageHandler } from './types';
|
|
2
|
+
/** Whether `fn` is a callback this module already wrapped, so callers skip re-wrapping it. */
|
|
3
|
+
export declare function isWrappedConsumerCallback(fn: unknown): boolean;
|
|
4
|
+
/** Wraps `eachMessage` so each processed message becomes a consumer span parented to the message's producer. */
|
|
5
|
+
export declare function wrapEachMessage(original: EachMessageHandler): EachMessageHandler;
|
|
6
|
+
/** Wraps `eachBatch` so the batch pull becomes a fresh-root receiving span with a process span per message. */
|
|
7
|
+
export declare function wrapEachBatch(original: EachBatchHandler): EachBatchHandler;
|
|
8
|
+
//# sourceMappingURL=consumer.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EXPERIMENTAL — orchestrion-driven kafkajs integration.
|
|
3
|
+
*
|
|
4
|
+
* Subscribes to the `orchestrion:kafkajs:*` diagnostics_channels that the orchestrion code transform
|
|
5
|
+
* injects into `kafkajs`'s `producer/messageProducer.js` (`sendBatch`) and `consumer/index.js` (`run`).
|
|
6
|
+
* Requires the orchestrion runtime hook or bundler plugin to be active — wire that up via
|
|
7
|
+
* `experimentalUseDiagnosticsChannelInjection`.
|
|
8
|
+
*
|
|
9
|
+
* Known limitation vs. the OTel integration it replaces: the wrapping producer-`transaction` span is
|
|
10
|
+
* not emitted (the transformer can't replace `transaction()`'s return value to patch commit/abort).
|
|
11
|
+
* Transactional `send`/`sendBatch` calls still produce producer spans, since they route through the
|
|
12
|
+
* same instrumented `sendBatch`.
|
|
13
|
+
*/
|
|
14
|
+
export declare const kafkajsChannelIntegration: () => import("@sentry/core").Integration & {
|
|
15
|
+
name: "Kafka";
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const ATTR_MESSAGING_DESTINATION_PARTITION_ID: "messaging.destination.partition.id";
|
|
2
|
+
export declare const ATTR_MESSAGING_KAFKA_MESSAGE_KEY: "messaging.kafka.message.key";
|
|
3
|
+
export declare const ATTR_MESSAGING_KAFKA_MESSAGE_TOMBSTONE: "messaging.kafka.message.tombstone";
|
|
4
|
+
export declare const ATTR_MESSAGING_KAFKA_OFFSET: "messaging.kafka.offset";
|
|
5
|
+
export declare const MESSAGING_OPERATION_TYPE_VALUE_PROCESS: "process";
|
|
6
|
+
export declare const MESSAGING_OPERATION_TYPE_VALUE_RECEIVE: "receive";
|
|
7
|
+
export declare const MESSAGING_OPERATION_TYPE_VALUE_SEND: "send";
|
|
8
|
+
export declare const MESSAGING_SYSTEM_VALUE_KAFKA: "kafka";
|
|
9
|
+
export declare const ERROR_TYPE_VALUE_OTHER: "_OTHER";
|
|
10
|
+
//# sourceMappingURL=semconv.d.ts.map
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { Span, SpanAttributes, SpanLink } from '@sentry/core';
|
|
2
|
+
import { KafkaMessage, Message } from './types';
|
|
3
|
+
interface ConsumerSpanOptions {
|
|
4
|
+
topic: string;
|
|
5
|
+
message: KafkaMessage | undefined;
|
|
6
|
+
operationType: string;
|
|
7
|
+
attributes: SpanAttributes;
|
|
8
|
+
links?: SpanLink[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Reads a header value off a kafkajs message as a string. kafkajs delivers headers as `Buffer`s (or
|
|
12
|
+
* arrays of them), so we normalize to a string before handing them to Sentry's trace helpers.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getHeaderAsString(headers: KafkaMessage['headers'], key: string): string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Builds a span link to the producer span carried in the message headers, mirroring the upstream
|
|
17
|
+
* behavior of linking each batch-processed message to its originating producer span.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getLinksFromHeaders(headers: KafkaMessage['headers']): SpanLink[] | undefined;
|
|
20
|
+
/** Starts an inactive consumer (process/receive) span carrying the kafkajs messaging attributes. */
|
|
21
|
+
export declare function startConsumerSpan({ topic, message, operationType, links, attributes }: ConsumerSpanOptions): Span;
|
|
22
|
+
/** Starts an inactive producer span and propagates its trace into the message headers. */
|
|
23
|
+
export declare function startProducerSpan(topic: string, message: Message): Span;
|
|
24
|
+
/**
|
|
25
|
+
* Marks all `spans` with the error status and `error.type` derived from a settle-time `reason`,
|
|
26
|
+
* WITHOUT ending them. Mirrors the vendored `endSpansOnPromise` catch block. The producer path (which
|
|
27
|
+
* receives discrete `error`/`asyncEnd` channel events) applies the error on `error` and ends on
|
|
28
|
+
* `asyncEnd`; the consumer path folds this into `endSpansOnPromise`.
|
|
29
|
+
*/
|
|
30
|
+
export declare function applyErrorToSpans(spans: Span[], reason: unknown): void;
|
|
31
|
+
/**
|
|
32
|
+
* Resolves once `promise` settles, applying the error status to all `spans` on failure and ending
|
|
33
|
+
* them regardless. Used by the consumer path, which invokes the user callback directly (and so holds a
|
|
34
|
+
* real promise). Verbatim from the vendored `endSpansOnPromise`.
|
|
35
|
+
*/
|
|
36
|
+
export declare function endSpansOnPromise<T>(spans: Span[], promise: Promise<T>): Promise<T>;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=spans.d.ts.map
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface Message {
|
|
2
|
+
key?: Buffer | string | null;
|
|
3
|
+
value: Buffer | string | null;
|
|
4
|
+
partition?: number;
|
|
5
|
+
headers?: Record<string, Buffer | string | (Buffer | string)[] | undefined>;
|
|
6
|
+
timestamp?: string;
|
|
7
|
+
}
|
|
8
|
+
export type KafkaMessage = {
|
|
9
|
+
[key: string]: unknown;
|
|
10
|
+
} & Message;
|
|
11
|
+
/** A single `{ topic, messages }` entry of a `sendBatch({ topicMessages })` call. */
|
|
12
|
+
export interface TopicMessages {
|
|
13
|
+
topic: string;
|
|
14
|
+
messages: Message[];
|
|
15
|
+
}
|
|
16
|
+
/** The `sendBatch`/`send` argument shape after kafkajs normalizes `send` into `sendBatch`. */
|
|
17
|
+
export interface ProducerBatch {
|
|
18
|
+
topicMessages?: TopicMessages[];
|
|
19
|
+
}
|
|
20
|
+
export interface EachMessagePayload {
|
|
21
|
+
topic: string;
|
|
22
|
+
partition: number;
|
|
23
|
+
message: KafkaMessage;
|
|
24
|
+
}
|
|
25
|
+
export interface Batch {
|
|
26
|
+
topic: string;
|
|
27
|
+
partition: number;
|
|
28
|
+
messages: KafkaMessage[];
|
|
29
|
+
}
|
|
30
|
+
export interface EachBatchPayload {
|
|
31
|
+
batch: Batch;
|
|
32
|
+
}
|
|
33
|
+
export type EachMessageHandler = (payload: EachMessagePayload) => Promise<void>;
|
|
34
|
+
export type EachBatchHandler = (payload: EachBatchPayload) => Promise<void>;
|
|
35
|
+
/** The `consumer.run(config)` argument shape; only the two callbacks are read/swapped. */
|
|
36
|
+
export interface ConsumerRunConfig {
|
|
37
|
+
eachMessage?: EachMessageHandler | null;
|
|
38
|
+
eachBatch?: EachBatchHandler | null;
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EXPERIMENTAL - orchestrion-driven knex integration.
|
|
3
|
+
*
|
|
4
|
+
* Subscribes to the `orchestrion:knex:*` diagnostics_channels that the orchestrion code transform
|
|
5
|
+
* injects into knex's `Runner.query` (span) and `Client.queryBuilder`/`schemaBuilder`/`raw` (parent-span
|
|
6
|
+
* bookkeeping). Requires the orchestrion runtime hook or bundler plugin to be active.
|
|
7
|
+
*/
|
|
8
|
+
export declare const knexChannelIntegration: () => import("@sentry/core").Integration & {
|
|
9
|
+
name: "Knex";
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=knex.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orchestrion-driven mysql2 integration.
|
|
3
|
+
*
|
|
4
|
+
* Adds Sentry tracing instrumentation for the [mysql2](https://www.npmjs.com/package/mysql2) library
|
|
5
|
+
* via diagnostics-channel injection. See {@link instrumentMysql2} for how the two mysql2 version
|
|
6
|
+
* ranges are covered.
|
|
7
|
+
*
|
|
8
|
+
* Known limitation vs. the OTel integration it replaces: the callback-less streaming form
|
|
9
|
+
* (`connection.query(sql).on('result', ...)`) is not traced — see the `mysql2` orchestrion config for
|
|
10
|
+
* why. The callback and promise forms (the common case) are fully instrumented.
|
|
11
|
+
*/
|
|
12
|
+
export declare const mysql2ChannelIntegration: () => import("@sentry/core").Integration & {
|
|
13
|
+
name: "Mysql2";
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=mysql2.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import codeTransformer from '@apm-js-collab/code-transformer-bundler-plugins/esbuild';
|
|
2
|
+
import { PluginOptions } from './options';
|
|
3
|
+
/**
|
|
4
|
+
* esbuild plugin that runs the orchestrion code transform on the bundled output.
|
|
5
|
+
*
|
|
6
|
+
* Use when bundling a Node app with esbuild. For unbundled Node processes use the
|
|
7
|
+
* runtime hook instead (`node --import @sentry/node/orchestrion app.js`).
|
|
8
|
+
*
|
|
9
|
+
* esbuild does not flatten nested `plugins` arrays, so this returns a single
|
|
10
|
+
* plugin that strips instrumented packages from an `external` denylist before
|
|
11
|
+
* delegating to the upstream transform.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* // build.mjs
|
|
16
|
+
* import { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/esbuild';
|
|
17
|
+
* await esbuild.build({ plugins: [sentryOrchestrionPlugin()] });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export declare function sentryOrchestrionPlugin(options?: PluginOptions): ReturnType<typeof codeTransformer>;
|
|
21
|
+
//# sourceMappingURL=esbuild.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { InstrumentationConfig } from '@apm-js-collab/code-transformer';
|
|
2
|
+
import codeTransformer from '@apm-js-collab/code-transformer-bundler-plugins/rollup';
|
|
3
|
+
export type PluginOptions = {
|
|
4
|
+
/**
|
|
5
|
+
* Additional instrumentations to include with the default instrumentation.
|
|
6
|
+
*/
|
|
7
|
+
instrumentations?: InstrumentationConfig[];
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* The `@apm-js-collab/code-transformer-bundler-plugins` options shared by every
|
|
11
|
+
* orchestrion bundler plugin.
|
|
12
|
+
*
|
|
13
|
+
* `injectDiagnostics` sets `globalThis.__SENTRY_ORCHESTRION__.bundler = ["mysql"]` at
|
|
14
|
+
* app boot so the `_experimentalSetupOrchestrion()` detector can confirm the
|
|
15
|
+
* bundler path ran (rather than relying on a build-time flag that wouldn't be
|
|
16
|
+
* visible to the runtime).
|
|
17
|
+
*/
|
|
18
|
+
export declare function orchestrionTransformOptions(options: PluginOptions): Parameters<typeof codeTransformer>[0];
|
|
19
|
+
//# sourceMappingURL=options.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import codeTransformer from '@apm-js-collab/code-transformer-bundler-plugins/rollup';
|
|
2
|
+
import { PluginOptions } from './options';
|
|
3
|
+
/**
|
|
4
|
+
* Rollup plugin that runs the orchestrion code transform on the bundled output.
|
|
5
|
+
*
|
|
6
|
+
* Use when bundling a Node app with Rollup. For unbundled Node processes use the
|
|
7
|
+
* runtime hook instead (`node --import @sentry/node/orchestrion app.js`).
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* ```ts
|
|
11
|
+
* // rollup.config.js
|
|
12
|
+
* import { sentryOrchestrionPlugin } from '@sentry/server-utils/orchestrion/rollup';
|
|
13
|
+
* export default { plugins: [sentryOrchestrionPlugin()] };
|
|
14
|
+
* ```
|
|
15
|
+
*/
|
|
16
|
+
export declare function sentryOrchestrionPlugin(options?: PluginOptions): ReturnType<typeof codeTransformer>;
|
|
17
|
+
//# sourceMappingURL=rollup.d.ts.map
|