@sentry/server-utils 10.64.0 → 10.65.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 +125 -0
- package/build/cjs/graphql/graphql-dc-subscriber.js.map +1 -0
- package/build/cjs/graphql/index.js +23 -0
- package/build/cjs/graphql/index.js.map +1 -0
- package/build/cjs/graphql/utils.js +86 -0
- package/build/cjs/graphql/utils.js.map +1 -0
- package/build/cjs/index.js +10 -11
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/amqplib.js +420 -0
- package/build/cjs/integrations/tracing-channel/amqplib.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/express/index.js +24 -0
- package/build/cjs/integrations/tracing-channel/express/index.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/express/instrumentation.js +173 -0
- package/build/cjs/integrations/tracing-channel/express/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/express/route.js +76 -0
- package/build/cjs/integrations/tracing-channel/express/route.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/fastify/instrumentation.js +1 -1
- package/build/cjs/integrations/tracing-channel/fastify/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/google-genai.js +96 -0
- package/build/cjs/integrations/tracing-channel/google-genai.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/graphql/constants.js +26 -0
- package/build/cjs/integrations/tracing-channel/graphql/constants.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/graphql/index.js +66 -0
- package/build/cjs/integrations/tracing-channel/graphql/index.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/graphql/resolvers.js +168 -0
- package/build/cjs/integrations/tracing-channel/graphql/resolvers.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/graphql/spans.js +102 -0
- package/build/cjs/integrations/tracing-channel/graphql/spans.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/ioredis.js +14 -14
- package/build/cjs/integrations/tracing-channel/ioredis.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/mysql.js +1 -1
- package/build/cjs/integrations/tracing-channel/mysql.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/openai.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/postgres-js.js +191 -0
- package/build/cjs/integrations/tracing-channel/postgres-js.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/postgres.js +5 -5
- package/build/cjs/integrations/tracing-channel/postgres.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/redis.js +227 -0
- package/build/cjs/integrations/tracing-channel/redis.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/vercel-ai.js +2 -2
- package/build/cjs/integrations/tracing-channel/vercel-ai.js.map +1 -1
- package/build/cjs/mongoose/mongoose-dc-subscriber.js +1 -1
- package/build/cjs/mongoose/mongoose-dc-subscriber.js.map +1 -1
- package/build/cjs/mysql2/index.js +23 -0
- package/build/cjs/mysql2/index.js.map +1 -0
- package/build/cjs/mysql2/mysql2-dc-subscriber.js +68 -0
- package/build/cjs/mysql2/mysql2-dc-subscriber.js.map +1 -0
- package/build/cjs/orchestrion/channels.js +13 -1
- package/build/cjs/orchestrion/channels.js.map +1 -1
- package/build/cjs/orchestrion/config/amqplib.js +81 -0
- package/build/cjs/orchestrion/config/amqplib.js.map +1 -0
- package/build/cjs/orchestrion/config/express.js +76 -0
- package/build/cjs/orchestrion/config/express.js.map +1 -0
- package/build/cjs/orchestrion/config/google-genai.js +38 -0
- package/build/cjs/orchestrion/config/google-genai.js.map +1 -0
- package/build/cjs/orchestrion/config/graphql.js +28 -0
- package/build/cjs/orchestrion/config/graphql.js.map +1 -0
- package/build/cjs/orchestrion/config/index.js +15 -2
- package/build/cjs/orchestrion/config/index.js.map +1 -1
- package/build/cjs/orchestrion/config/postgres.js +50 -0
- package/build/cjs/orchestrion/config/postgres.js.map +1 -0
- package/build/cjs/orchestrion/config/redis.js +76 -0
- package/build/cjs/orchestrion/config/redis.js.map +1 -0
- package/build/cjs/orchestrion/config/vercel-ai.js +18 -14
- package/build/cjs/orchestrion/config/vercel-ai.js.map +1 -1
- package/build/cjs/orchestrion/index.js +18 -1
- package/build/cjs/orchestrion/index.js.map +1 -1
- package/build/cjs/redis/index.js +23 -0
- package/build/cjs/redis/index.js.map +1 -0
- package/build/cjs/redis/redis-dc-subscriber.js +23 -35
- package/build/cjs/redis/redis-dc-subscriber.js.map +1 -1
- package/build/cjs/tracing-channel.js +7 -6
- package/build/cjs/tracing-channel.js.map +1 -1
- package/build/cjs/vercel-ai/util.js +123 -0
- package/build/cjs/vercel-ai/util.js.map +1 -0
- package/build/cjs/vercel-ai/vercel-ai-dc-subscriber.js +138 -74
- package/build/cjs/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -1
- package/build/cjs/vercel-ai/{vercel-ai-orchestrion-v6-subscriber.js → vercel-ai-orchestrion-subscriber.js} +153 -23
- package/build/cjs/vercel-ai/vercel-ai-orchestrion-subscriber.js.map +1 -0
- package/build/esm/graphql/graphql-dc-subscriber.js +118 -0
- package/build/esm/graphql/graphql-dc-subscriber.js.map +1 -0
- package/build/esm/graphql/index.js +21 -0
- package/build/esm/graphql/index.js.map +1 -0
- package/build/esm/graphql/utils.js +81 -0
- package/build/esm/graphql/utils.js.map +1 -0
- package/build/esm/index.js +3 -1
- package/build/esm/index.js.map +1 -1
- package/build/esm/integrations/tracing-channel/amqplib.js +418 -0
- package/build/esm/integrations/tracing-channel/amqplib.js.map +1 -0
- package/build/esm/integrations/tracing-channel/anthropic.js +1 -1
- package/build/esm/integrations/tracing-channel/express/index.js +22 -0
- package/build/esm/integrations/tracing-channel/express/index.js.map +1 -0
- package/build/esm/integrations/tracing-channel/express/instrumentation.js +171 -0
- package/build/esm/integrations/tracing-channel/express/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing-channel/express/route.js +68 -0
- package/build/esm/integrations/tracing-channel/express/route.js.map +1 -0
- package/build/esm/integrations/tracing-channel/fastify/instrumentation.js +2 -2
- package/build/esm/integrations/tracing-channel/fastify/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing-channel/google-genai.js +94 -0
- package/build/esm/integrations/tracing-channel/google-genai.js.map +1 -0
- package/build/esm/integrations/tracing-channel/graphql/constants.js +14 -0
- package/build/esm/integrations/tracing-channel/graphql/constants.js.map +1 -0
- package/build/esm/integrations/tracing-channel/graphql/index.js +63 -0
- package/build/esm/integrations/tracing-channel/graphql/index.js.map +1 -0
- package/build/esm/integrations/tracing-channel/graphql/resolvers.js +164 -0
- package/build/esm/integrations/tracing-channel/graphql/resolvers.js.map +1 -0
- package/build/esm/integrations/tracing-channel/graphql/spans.js +96 -0
- package/build/esm/integrations/tracing-channel/graphql/spans.js.map +1 -0
- package/build/esm/integrations/tracing-channel/ioredis.js +15 -15
- package/build/esm/integrations/tracing-channel/ioredis.js.map +1 -1
- package/build/esm/integrations/tracing-channel/mysql.js +2 -2
- package/build/esm/integrations/tracing-channel/mysql.js.map +1 -1
- package/build/esm/integrations/tracing-channel/openai.js +1 -1
- package/build/esm/integrations/tracing-channel/openai.js.map +1 -1
- package/build/esm/integrations/tracing-channel/postgres-js.js +189 -0
- package/build/esm/integrations/tracing-channel/postgres-js.js.map +1 -0
- package/build/esm/integrations/tracing-channel/postgres.js +6 -6
- package/build/esm/integrations/tracing-channel/postgres.js.map +1 -1
- package/build/esm/integrations/tracing-channel/redis.js +225 -0
- package/build/esm/integrations/tracing-channel/redis.js.map +1 -0
- package/build/esm/integrations/tracing-channel/vercel-ai.js +1 -1
- package/build/esm/integrations/tracing-channel/vercel-ai.js.map +1 -1
- package/build/esm/mongoose/mongoose-dc-subscriber.js +2 -2
- package/build/esm/mongoose/mongoose-dc-subscriber.js.map +1 -1
- package/build/esm/mysql2/index.js +21 -0
- package/build/esm/mysql2/index.js.map +1 -0
- package/build/esm/mysql2/mysql2-dc-subscriber.js +62 -0
- package/build/esm/mysql2/mysql2-dc-subscriber.js.map +1 -0
- package/build/esm/orchestrion/channels.js +13 -1
- package/build/esm/orchestrion/channels.js.map +1 -1
- package/build/esm/orchestrion/config/amqplib.js +78 -0
- package/build/esm/orchestrion/config/amqplib.js.map +1 -0
- package/build/esm/orchestrion/config/express.js +73 -0
- package/build/esm/orchestrion/config/express.js.map +1 -0
- package/build/esm/orchestrion/config/google-genai.js +35 -0
- package/build/esm/orchestrion/config/google-genai.js.map +1 -0
- package/build/esm/orchestrion/config/graphql.js +25 -0
- package/build/esm/orchestrion/config/graphql.js.map +1 -0
- package/build/esm/orchestrion/config/index.js +15 -2
- package/build/esm/orchestrion/config/index.js.map +1 -1
- package/build/esm/orchestrion/config/postgres.js +47 -0
- package/build/esm/orchestrion/config/postgres.js.map +1 -0
- package/build/esm/orchestrion/config/redis.js +73 -0
- package/build/esm/orchestrion/config/redis.js.map +1 -0
- package/build/esm/orchestrion/config/vercel-ai.js +18 -14
- package/build/esm/orchestrion/config/vercel-ai.js.map +1 -1
- package/build/esm/orchestrion/index.js +14 -2
- package/build/esm/orchestrion/index.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/redis/index.js +21 -0
- package/build/esm/redis/index.js.map +1 -0
- package/build/esm/redis/redis-dc-subscriber.js +24 -36
- package/build/esm/redis/redis-dc-subscriber.js.map +1 -1
- package/build/esm/tracing-channel.js +8 -7
- package/build/esm/tracing-channel.js.map +1 -1
- package/build/esm/vercel-ai/util.js +116 -0
- package/build/esm/vercel-ai/util.js.map +1 -0
- package/build/esm/vercel-ai/vercel-ai-dc-subscriber.js +112 -50
- package/build/esm/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -1
- package/build/esm/vercel-ai/{vercel-ai-orchestrion-v6-subscriber.js → vercel-ai-orchestrion-subscriber.js} +153 -23
- package/build/esm/vercel-ai/vercel-ai-orchestrion-subscriber.js.map +1 -0
- package/build/types/graphql/graphql-dc-subscriber.d.ts +94 -0
- package/build/types/graphql/graphql-dc-subscriber.d.ts.map +1 -0
- package/build/types/graphql/index.d.ts +12 -0
- package/build/types/graphql/index.d.ts.map +1 -0
- package/build/types/graphql/utils.d.ts +40 -0
- package/build/types/graphql/utils.d.ts.map +1 -0
- package/build/types/index.d.ts +4 -2
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/amqplib.d.ts +11 -0
- package/build/types/integrations/tracing-channel/amqplib.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/express/index.d.ts +18 -0
- package/build/types/integrations/tracing-channel/express/index.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/express/instrumentation.d.ts +4 -0
- package/build/types/integrations/tracing-channel/express/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/express/route.d.ts +28 -0
- package/build/types/integrations/tracing-channel/express/route.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/express/types.d.ts +64 -0
- package/build/types/integrations/tracing-channel/express/types.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/fastify/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/google-genai.d.ts +12 -0
- package/build/types/integrations/tracing-channel/google-genai.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/graphql/constants.d.ts +12 -0
- package/build/types/integrations/tracing-channel/graphql/constants.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/graphql/graphql-types.d.ts +135 -0
- package/build/types/integrations/tracing-channel/graphql/graphql-types.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/graphql/index.d.ts +28 -0
- package/build/types/integrations/tracing-channel/graphql/index.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/graphql/resolvers.d.ts +13 -0
- package/build/types/integrations/tracing-channel/graphql/resolvers.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/graphql/spans.d.ts +17 -0
- package/build/types/integrations/tracing-channel/graphql/spans.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/graphql/types.d.ts +25 -0
- package/build/types/integrations/tracing-channel/graphql/types.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/ioredis.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/mysql.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/openai.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/postgres-js.d.ts +26 -0
- package/build/types/integrations/tracing-channel/postgres-js.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/postgres.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/redis.d.ts +16 -0
- package/build/types/integrations/tracing-channel/redis.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/vercel-ai.d.ts +1 -1
- package/build/types/mongoose/mongoose-dc-subscriber.d.ts.map +1 -1
- package/build/types/mysql2/index.d.ts +11 -0
- package/build/types/mysql2/index.d.ts.map +1 -0
- package/build/types/mysql2/mysql2-dc-subscriber.d.ts +59 -0
- package/build/types/mysql2/mysql2-dc-subscriber.d.ts.map +1 -0
- package/build/types/orchestrion/channels.d.ts +34 -0
- package/build/types/orchestrion/channels.d.ts.map +1 -1
- package/build/types/orchestrion/config/amqplib.d.ts +66 -0
- package/build/types/orchestrion/config/amqplib.d.ts.map +1 -0
- package/build/types/orchestrion/config/express.d.ts +32 -0
- package/build/types/orchestrion/config/express.d.ts.map +1 -0
- package/build/types/orchestrion/config/google-genai.d.ts +30 -0
- package/build/types/orchestrion/config/google-genai.d.ts.map +1 -0
- package/build/types/orchestrion/config/graphql.d.ts +29 -0
- package/build/types/orchestrion/config/graphql.d.ts.map +1 -0
- package/build/types/orchestrion/config/index.d.ts.map +1 -1
- package/build/types/orchestrion/config/postgres.d.ts +9 -0
- package/build/types/orchestrion/config/postgres.d.ts.map +1 -0
- package/build/types/orchestrion/config/redis.d.ts +37 -0
- package/build/types/orchestrion/config/redis.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/orchestrion/index.d.ts +31 -4
- package/build/types/orchestrion/index.d.ts.map +1 -1
- package/build/types/redis/index.d.ts +18 -0
- package/build/types/redis/index.d.ts.map +1 -0
- package/build/types/redis/redis-dc-subscriber.d.ts +0 -5
- package/build/types/redis/redis-dc-subscriber.d.ts.map +1 -1
- package/build/types/tracing-channel.d.ts +5 -0
- package/build/types/tracing-channel.d.ts.map +1 -1
- package/build/types/vercel-ai/util.d.ts +32 -0
- package/build/types/vercel-ai/util.d.ts.map +1 -0
- package/build/types/vercel-ai/vercel-ai-dc-subscriber.d.ts +6 -2
- package/build/types/vercel-ai/vercel-ai-dc-subscriber.d.ts.map +1 -1
- package/build/types/vercel-ai/{vercel-ai-orchestrion-v6-subscriber.d.ts → vercel-ai-orchestrion-subscriber.d.ts} +1 -1
- package/build/types/vercel-ai/vercel-ai-orchestrion-subscriber.d.ts.map +1 -0
- package/build/types-ts3.8/graphql/graphql-dc-subscriber.d.ts +94 -0
- package/build/types-ts3.8/graphql/index.d.ts +12 -0
- package/build/types-ts3.8/graphql/utils.d.ts +40 -0
- package/build/types-ts3.8/index.d.ts +4 -2
- package/build/types-ts3.8/integrations/tracing-channel/amqplib.d.ts +11 -0
- package/build/types-ts3.8/integrations/tracing-channel/express/index.d.ts +18 -0
- package/build/types-ts3.8/integrations/tracing-channel/express/instrumentation.d.ts +4 -0
- package/build/types-ts3.8/integrations/tracing-channel/express/route.d.ts +28 -0
- package/build/types-ts3.8/integrations/tracing-channel/express/types.d.ts +64 -0
- package/build/types-ts3.8/integrations/tracing-channel/google-genai.d.ts +12 -0
- package/build/types-ts3.8/integrations/tracing-channel/graphql/constants.d.ts +12 -0
- package/build/types-ts3.8/integrations/tracing-channel/graphql/graphql-types.d.ts +135 -0
- package/build/types-ts3.8/integrations/tracing-channel/graphql/index.d.ts +30 -0
- package/build/types-ts3.8/integrations/tracing-channel/graphql/resolvers.d.ts +13 -0
- package/build/types-ts3.8/integrations/tracing-channel/graphql/spans.d.ts +17 -0
- package/build/types-ts3.8/integrations/tracing-channel/graphql/types.d.ts +25 -0
- package/build/types-ts3.8/integrations/tracing-channel/postgres-js.d.ts +26 -0
- package/build/types-ts3.8/integrations/tracing-channel/redis.d.ts +16 -0
- package/build/types-ts3.8/integrations/tracing-channel/vercel-ai.d.ts +1 -1
- package/build/types-ts3.8/mysql2/index.d.ts +11 -0
- package/build/types-ts3.8/mysql2/mysql2-dc-subscriber.d.ts +59 -0
- package/build/types-ts3.8/orchestrion/channels.d.ts +34 -0
- package/build/types-ts3.8/orchestrion/config/amqplib.d.ts +66 -0
- package/build/types-ts3.8/orchestrion/config/express.d.ts +32 -0
- package/build/types-ts3.8/orchestrion/config/google-genai.d.ts +30 -0
- package/build/types-ts3.8/orchestrion/config/graphql.d.ts +29 -0
- package/build/types-ts3.8/orchestrion/config/postgres.d.ts +9 -0
- package/build/types-ts3.8/orchestrion/config/redis.d.ts +37 -0
- package/build/types-ts3.8/orchestrion/config/vercel-ai.d.ts +1 -0
- package/build/types-ts3.8/orchestrion/index.d.ts +33 -4
- package/build/types-ts3.8/redis/index.d.ts +18 -0
- package/build/types-ts3.8/redis/redis-dc-subscriber.d.ts +0 -5
- package/build/types-ts3.8/tracing-channel.d.ts +5 -0
- package/build/types-ts3.8/vercel-ai/util.d.ts +32 -0
- package/build/types-ts3.8/vercel-ai/vercel-ai-dc-subscriber.d.ts +6 -2
- package/build/types-ts3.8/vercel-ai/{vercel-ai-orchestrion-v6-subscriber.d.ts → vercel-ai-orchestrion-subscriber.d.ts} +1 -1
- package/package.json +2 -2
- package/build/cjs/vercel-ai/vercel-ai-orchestrion-v6-subscriber.js.map +0 -1
- package/build/esm/vercel-ai/vercel-ai-orchestrion-v6-subscriber.js.map +0 -1
- package/build/types/vercel-ai/vercel-ai-orchestrion-v6-subscriber.d.ts.map +0 -1
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Span } from '@sentry/core';
|
|
2
|
+
import { GRAPHQL_DATA_SYMBOL, GRAPHQL_PATCHED_SYMBOL } from './constants';
|
|
3
|
+
import { DocumentNode } from './graphql-types';
|
|
4
|
+
export * from './graphql-types';
|
|
5
|
+
/** Bookkeeping we attach to `contextValue` to parent resolver spans under the execute span. */
|
|
6
|
+
interface GraphQLSpanData {
|
|
7
|
+
source?: DocumentNode;
|
|
8
|
+
span: Span;
|
|
9
|
+
fields: Record<string, {
|
|
10
|
+
span: Span;
|
|
11
|
+
} | undefined>;
|
|
12
|
+
}
|
|
13
|
+
export interface ObjectWithGraphQLData {
|
|
14
|
+
[GRAPHQL_DATA_SYMBOL]?: GraphQLSpanData;
|
|
15
|
+
}
|
|
16
|
+
export interface Patched {
|
|
17
|
+
[GRAPHQL_PATCHED_SYMBOL]?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/** Resolved integration config (defaults applied), shared by the span + resolver builders. */
|
|
20
|
+
export interface GraphqlResolvedConfig {
|
|
21
|
+
ignoreResolveSpans: boolean;
|
|
22
|
+
ignoreTrivialResolveSpans: boolean;
|
|
23
|
+
useOperationNameForRootSpan: boolean;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { PostgresConnectionContext, Span } from '@sentry/core';
|
|
2
|
+
export interface PostgresJsChannelIntegrationOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Only create spans when there's already an active parent span. Defaults to
|
|
5
|
+
* `true`, matching the OTel `postgresJsIntegration`.
|
|
6
|
+
*/
|
|
7
|
+
requireParentSpan?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Hook to modify the query span before the query runs. Receives the span, the
|
|
10
|
+
* sanitized SQL, and (when resolvable) the connection context.
|
|
11
|
+
*/
|
|
12
|
+
requestHook?: (span: Span, sanitizedSqlQuery: string, postgresConnectionContext?: PostgresConnectionContext) => void;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* EXPERIMENTAL — orchestrion-driven postgres.js (`postgres` v3.x) integration.
|
|
16
|
+
*
|
|
17
|
+
* Subscribes to the `orchestrion:postgres:handle` / `:connection` / `:execute` /
|
|
18
|
+
* `:connect` diagnostics channels injected into postgres.js' `Query.prototype.handle`
|
|
19
|
+
* and `Connection`/`execute`/`connect` (in `src/*` and `cjs/src/*`) and creates db
|
|
20
|
+
* spans matching the OTel `postgresJsIntegration`. Requires the orchestrion runtime
|
|
21
|
+
* hook or bundler plugin.
|
|
22
|
+
*/
|
|
23
|
+
export declare const postgresJsChannelIntegration: (options?: PostgresJsChannelIntegrationOptions | undefined) => import("@sentry/core").Integration & {
|
|
24
|
+
name: "PostgresJs";
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=postgres-js.d.ts.map
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Span } from '@sentry/core';
|
|
2
|
+
/** Mirrors `@opentelemetry/instrumentation-redis`' response hook. Not called for failed commands. */
|
|
3
|
+
export type RedisResponseHook = (span: Span, command: string, args: Array<string | Buffer>, result: unknown) => void;
|
|
4
|
+
export interface RedisChannelIntegrationOptions {
|
|
5
|
+
responseHook?: RedisResponseHook;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* EXPERIMENTAL — orchestrion-driven redis integration for `redis` v2-v3 and
|
|
9
|
+
* node-redis v4/v5 `<5.12.0` (`@redis/client`). Covers single commands, `connect`,
|
|
10
|
+
* and multi/pipeline batches, fully replacing `@opentelemetry/instrumentation-redis`.
|
|
11
|
+
* Requires the orchestrion runtime hook or bundler plugin.
|
|
12
|
+
*/
|
|
13
|
+
export declare const redisChannelIntegration: (options?: RedisChannelIntegrationOptions | undefined) => import("@sentry/core").Integration & {
|
|
14
|
+
name: "RedisChannel";
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=redis.d.ts.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Auto-instrument the `ai` SDK. Supported are:
|
|
3
3
|
* - v7 via native `ai:telemetry` tracing channel
|
|
4
|
-
* - v6 via orchestrion `orchestrion:ai:*` channels
|
|
4
|
+
* - v4, v5 & v6 via orchestrion `orchestrion:ai:*` channels
|
|
5
5
|
*/
|
|
6
6
|
export declare const vercelAiChannelIntegration: (options?: {
|
|
7
7
|
recordInputs?: boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-instrument the [mysql2](https://www.npmjs.com/package/mysql2) library via its native
|
|
3
|
+
* `node:diagnostics_channel` tracing channels (mysql2 >= 3.20.0).
|
|
4
|
+
*
|
|
5
|
+
* On older mysql2 versions the channels are never published to, so this integration is inert and
|
|
6
|
+
* the vendored OTel instrumentation (gated to `< 3.20.0`) handles instrumentation instead.
|
|
7
|
+
*/
|
|
8
|
+
export declare const mysql2Integration: () => import("@sentry/core").Integration & {
|
|
9
|
+
name: string;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { TracingChannel } from 'node:diagnostics_channel';
|
|
2
|
+
export declare const MYSQL2_DC_CHANNEL_QUERY = "mysql2:query";
|
|
3
|
+
export declare const MYSQL2_DC_CHANNEL_EXECUTE = "mysql2:execute";
|
|
4
|
+
export declare const MYSQL2_DC_CHANNEL_CONNECT = "mysql2:connect";
|
|
5
|
+
export declare const MYSQL2_DC_CHANNEL_POOL_CONNECT = "mysql2:pool:connect";
|
|
6
|
+
/**
|
|
7
|
+
* Shape of the context object mysql2 >= 3.20.0 publishes on its query/execute
|
|
8
|
+
* tracing channels (see mysql2 `lib/base/connection.js`).
|
|
9
|
+
*
|
|
10
|
+
* Node's `traceCallback`/`tracePromise` mutate this same object with
|
|
11
|
+
* `result`/`error` once the operation settles, which `bindTracingChannelToSpan`
|
|
12
|
+
* reads in its lifecycle handlers — hence both are declared optional here.
|
|
13
|
+
*
|
|
14
|
+
* `query` is the SQL statement. On the `query` channel mysql2 has already
|
|
15
|
+
* inlined `values` into it (`Connection.format`), so it carries raw user data;
|
|
16
|
+
* on the `execute` channel it keeps `?` placeholders. Either way we sanitize it
|
|
17
|
+
* before emitting `db.query.text` and never attach `values`.
|
|
18
|
+
*/
|
|
19
|
+
export interface MySQL2QueryData {
|
|
20
|
+
query?: string;
|
|
21
|
+
values?: unknown;
|
|
22
|
+
database?: string;
|
|
23
|
+
serverAddress?: string;
|
|
24
|
+
/** Absent for unix-socket connections, where `serverAddress` is the socket path. */
|
|
25
|
+
serverPort?: number;
|
|
26
|
+
result?: unknown;
|
|
27
|
+
error?: Error;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Shape of the context object mysql2 >= 3.20.0 publishes on its
|
|
31
|
+
* `connect`/`pool:connect` channels.
|
|
32
|
+
*/
|
|
33
|
+
export interface MySQL2ConnectData {
|
|
34
|
+
database?: string;
|
|
35
|
+
serverAddress?: string;
|
|
36
|
+
serverPort?: number;
|
|
37
|
+
user?: string;
|
|
38
|
+
result?: unknown;
|
|
39
|
+
error?: Error;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Platform-provided factory that creates a native tracing channel for the given name. The
|
|
43
|
+
* subscriber binds the span and its lifecycle onto the channel via `bindTracingChannelToSpan`,
|
|
44
|
+
* which propagates the active span through the runtime's async context.
|
|
45
|
+
*
|
|
46
|
+
* Node passes `node:diagnostics_channel`'s `tracingChannel` directly.
|
|
47
|
+
*/
|
|
48
|
+
export type MySQL2TracingChannelFactory = <T extends object>(name: string) => TracingChannel<T, T>;
|
|
49
|
+
/**
|
|
50
|
+
* Subscribe Sentry span handlers to mysql2's diagnostics-channel events
|
|
51
|
+
* (`mysql2:query`, `:execute`, `:connect`, `:pool:connect`), published by
|
|
52
|
+
* mysql2 >= 3.20.0.
|
|
53
|
+
*
|
|
54
|
+
* On older mysql2 versions the channels are never published to, so the
|
|
55
|
+
* subscribers are inert — there is no double-instrumentation against the
|
|
56
|
+
* vendored OTel patcher, which is gated to `< 3.20.0`.
|
|
57
|
+
*/
|
|
58
|
+
export declare function subscribeMysql2DiagnosticChannels(tracingChannel: MySQL2TracingChannelFactory): void;
|
|
59
|
+
//# sourceMappingURL=mysql2-dc-subscriber.d.ts.map
|
|
@@ -12,14 +12,44 @@
|
|
|
12
12
|
* they don't drift apart and silently stop firing.
|
|
13
13
|
*/
|
|
14
14
|
export declare const CHANNELS: {
|
|
15
|
+
readonly GRAPHQL_PARSE: "orchestrion:graphql:parse";
|
|
16
|
+
readonly GRAPHQL_VALIDATE: "orchestrion:graphql:validate";
|
|
17
|
+
readonly GRAPHQL_EXECUTE: "orchestrion:graphql:execute";
|
|
18
|
+
readonly EXPRESS_HANDLE: "orchestrion:express:handle";
|
|
19
|
+
readonly ROUTER_HANDLE: "orchestrion:router:handle";
|
|
20
|
+
readonly EXPRESS_ROUTE: "orchestrion:express:route";
|
|
21
|
+
readonly EXPRESS_USE: "orchestrion:express:use";
|
|
22
|
+
readonly ROUTER_ROUTE: "orchestrion:router:route";
|
|
23
|
+
readonly ROUTER_USE: "orchestrion:router:use";
|
|
24
|
+
readonly REDIS_COMMAND: "orchestrion:redis:command";
|
|
25
|
+
readonly NODE_REDIS_COMMAND: "orchestrion:@redis/client:command";
|
|
26
|
+
readonly NODE_REDIS_EXECUTOR: "orchestrion:@redis/client:executor";
|
|
27
|
+
readonly NODE_REDIS_CONNECT: "orchestrion:@redis/client:connect";
|
|
28
|
+
readonly NODE_REDIS_MULTI: "orchestrion:@redis/client:multi";
|
|
29
|
+
readonly NODE_REDIS_PIPELINE: "orchestrion:@redis/client:pipeline";
|
|
30
|
+
readonly NODE_REDIS_BATCH: "orchestrion:@redis/client:batch";
|
|
15
31
|
readonly HAPI_ROUTE: "orchestrion:@hapi/hapi:route";
|
|
16
32
|
readonly HAPI_EXT: "orchestrion:@hapi/hapi:ext";
|
|
33
|
+
readonly AMQPLIB_PUBLISH: "orchestrion:amqplib:publish";
|
|
34
|
+
readonly AMQPLIB_CONFIRM_PUBLISH: "orchestrion:amqplib:confirmPublish";
|
|
35
|
+
readonly AMQPLIB_CONSUME: "orchestrion:amqplib:consume";
|
|
36
|
+
readonly AMQPLIB_DISPATCH: "orchestrion:amqplib:dispatch";
|
|
37
|
+
readonly AMQPLIB_ACK: "orchestrion:amqplib:ack";
|
|
38
|
+
readonly AMQPLIB_NACK: "orchestrion:amqplib:nack";
|
|
39
|
+
readonly AMQPLIB_REJECT: "orchestrion:amqplib:reject";
|
|
40
|
+
readonly AMQPLIB_ACK_ALL: "orchestrion:amqplib:ackAll";
|
|
41
|
+
readonly AMQPLIB_NACK_ALL: "orchestrion:amqplib:nackAll";
|
|
42
|
+
readonly AMQPLIB_CONNECT: "orchestrion:amqplib:connect";
|
|
17
43
|
readonly VERCEL_AI_GENERATE_TEXT: "orchestrion:ai:generateText";
|
|
18
44
|
readonly VERCEL_AI_STREAM_TEXT: "orchestrion:ai:streamText";
|
|
45
|
+
readonly VERCEL_AI_GENERATE_OBJECT: "orchestrion:ai:generateObject";
|
|
19
46
|
readonly VERCEL_AI_EMBED: "orchestrion:ai:embed";
|
|
20
47
|
readonly VERCEL_AI_EMBED_MANY: "orchestrion:ai:embedMany";
|
|
21
48
|
readonly VERCEL_AI_EXECUTE_TOOL_CALL: "orchestrion:ai:executeToolCall";
|
|
22
49
|
readonly VERCEL_AI_RESOLVE_LANGUAGE_MODEL: "orchestrion:ai:resolveLanguageModel";
|
|
50
|
+
readonly GOOGLE_GENAI_GENERATE_CONTENT: "orchestrion:@google/genai:generate-content";
|
|
51
|
+
readonly GOOGLE_GENAI_EMBED_CONTENT: "orchestrion:@google/genai:embed-content";
|
|
52
|
+
readonly GOOGLE_GENAI_CHAT: "orchestrion:@google/genai:chat";
|
|
23
53
|
readonly ANTHROPIC_CHAT: "orchestrion:@anthropic-ai/sdk:chat";
|
|
24
54
|
readonly ANTHROPIC_MODELS: "orchestrion:@anthropic-ai/sdk:models";
|
|
25
55
|
readonly ANTHROPIC_MESSAGES_STREAM: "orchestrion:@anthropic-ai/sdk:messages-stream";
|
|
@@ -27,6 +57,10 @@ export declare const CHANNELS: {
|
|
|
27
57
|
readonly OPENAI_RESPONSES: "orchestrion:openai:responses";
|
|
28
58
|
readonly OPENAI_EMBEDDINGS: "orchestrion:openai:embeddings";
|
|
29
59
|
readonly OPENAI_CONVERSATIONS: "orchestrion:openai:conversations";
|
|
60
|
+
readonly POSTGRESJS_HANDLE: "orchestrion:postgres:handle";
|
|
61
|
+
readonly POSTGRESJS_CONNECTION: "orchestrion:postgres:connection";
|
|
62
|
+
readonly POSTGRESJS_EXECUTE: "orchestrion:postgres:execute";
|
|
63
|
+
readonly POSTGRESJS_CONNECT: "orchestrion:postgres:connect";
|
|
30
64
|
readonly PG_QUERY: "orchestrion:pg:query";
|
|
31
65
|
readonly PG_CONNECT: "orchestrion:pg:connect";
|
|
32
66
|
readonly PGPOOL_CONNECT: "orchestrion:pg-pool:connect";
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
export declare const amqplibConfig: ({
|
|
2
|
+
channelName: string;
|
|
3
|
+
module: {
|
|
4
|
+
filePath: string;
|
|
5
|
+
name: "amqplib";
|
|
6
|
+
versionRange: ">=0.5.5 <2";
|
|
7
|
+
};
|
|
8
|
+
functionQuery: {
|
|
9
|
+
className: string;
|
|
10
|
+
methodName: string;
|
|
11
|
+
kind: "Sync";
|
|
12
|
+
functionName?: undefined;
|
|
13
|
+
};
|
|
14
|
+
} | {
|
|
15
|
+
channelName: string;
|
|
16
|
+
module: {
|
|
17
|
+
filePath: string;
|
|
18
|
+
name: "amqplib";
|
|
19
|
+
versionRange: ">=0.5.5 <2";
|
|
20
|
+
};
|
|
21
|
+
functionQuery: {
|
|
22
|
+
className: string;
|
|
23
|
+
methodName: string;
|
|
24
|
+
kind: "Callback";
|
|
25
|
+
functionName?: undefined;
|
|
26
|
+
};
|
|
27
|
+
} | {
|
|
28
|
+
channelName: string;
|
|
29
|
+
module: {
|
|
30
|
+
filePath: string;
|
|
31
|
+
name: "amqplib";
|
|
32
|
+
versionRange: ">=0.5.5 <2";
|
|
33
|
+
};
|
|
34
|
+
functionQuery: {
|
|
35
|
+
className: string;
|
|
36
|
+
methodName: string;
|
|
37
|
+
kind: "Async";
|
|
38
|
+
functionName?: undefined;
|
|
39
|
+
};
|
|
40
|
+
} | {
|
|
41
|
+
channelName: string;
|
|
42
|
+
module: {
|
|
43
|
+
filePath: string;
|
|
44
|
+
name: "amqplib";
|
|
45
|
+
versionRange: ">=0.5.5 <2";
|
|
46
|
+
};
|
|
47
|
+
functionQuery: {
|
|
48
|
+
functionName: string;
|
|
49
|
+
kind: "Callback";
|
|
50
|
+
className?: undefined;
|
|
51
|
+
methodName?: undefined;
|
|
52
|
+
};
|
|
53
|
+
})[];
|
|
54
|
+
export declare const amqplibChannels: {
|
|
55
|
+
readonly AMQPLIB_PUBLISH: "orchestrion:amqplib:publish";
|
|
56
|
+
readonly AMQPLIB_CONFIRM_PUBLISH: "orchestrion:amqplib:confirmPublish";
|
|
57
|
+
readonly AMQPLIB_CONSUME: "orchestrion:amqplib:consume";
|
|
58
|
+
readonly AMQPLIB_DISPATCH: "orchestrion:amqplib:dispatch";
|
|
59
|
+
readonly AMQPLIB_ACK: "orchestrion:amqplib:ack";
|
|
60
|
+
readonly AMQPLIB_NACK: "orchestrion:amqplib:nack";
|
|
61
|
+
readonly AMQPLIB_REJECT: "orchestrion:amqplib:reject";
|
|
62
|
+
readonly AMQPLIB_ACK_ALL: "orchestrion:amqplib:ackAll";
|
|
63
|
+
readonly AMQPLIB_NACK_ALL: "orchestrion:amqplib:nackAll";
|
|
64
|
+
readonly AMQPLIB_CONNECT: "orchestrion:amqplib:connect";
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=amqplib.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const expressConfig: ({
|
|
2
|
+
channelName: string;
|
|
3
|
+
module: {
|
|
4
|
+
name: string;
|
|
5
|
+
versionRange: string;
|
|
6
|
+
filePath: string;
|
|
7
|
+
};
|
|
8
|
+
functionQuery: {
|
|
9
|
+
expressionName: string;
|
|
10
|
+
kind: "Callback";
|
|
11
|
+
};
|
|
12
|
+
} | {
|
|
13
|
+
channelName: string;
|
|
14
|
+
module: {
|
|
15
|
+
name: string;
|
|
16
|
+
versionRange: string;
|
|
17
|
+
filePath: string;
|
|
18
|
+
};
|
|
19
|
+
functionQuery: {
|
|
20
|
+
expressionName: string;
|
|
21
|
+
kind: "Sync";
|
|
22
|
+
};
|
|
23
|
+
})[];
|
|
24
|
+
export declare const expressChannels: {
|
|
25
|
+
readonly EXPRESS_HANDLE: "orchestrion:express:handle";
|
|
26
|
+
readonly ROUTER_HANDLE: "orchestrion:router:handle";
|
|
27
|
+
readonly EXPRESS_ROUTE: "orchestrion:express:route";
|
|
28
|
+
readonly EXPRESS_USE: "orchestrion:express:use";
|
|
29
|
+
readonly ROUTER_ROUTE: "orchestrion:router:route";
|
|
30
|
+
readonly ROUTER_USE: "orchestrion:router:use";
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=express.d.ts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export declare const googleGenAiConfig: ({
|
|
2
|
+
channelName: string;
|
|
3
|
+
module: {
|
|
4
|
+
name: string;
|
|
5
|
+
versionRange: string;
|
|
6
|
+
filePath: string;
|
|
7
|
+
};
|
|
8
|
+
functionQuery: {
|
|
9
|
+
expressionName: "generateContent" | "generateContentStream";
|
|
10
|
+
kind: "Auto";
|
|
11
|
+
};
|
|
12
|
+
} | {
|
|
13
|
+
channelName: string;
|
|
14
|
+
module: {
|
|
15
|
+
name: string;
|
|
16
|
+
versionRange: string;
|
|
17
|
+
filePath: string;
|
|
18
|
+
};
|
|
19
|
+
functionQuery: {
|
|
20
|
+
className: string;
|
|
21
|
+
methodName: string;
|
|
22
|
+
kind: "Auto";
|
|
23
|
+
};
|
|
24
|
+
})[];
|
|
25
|
+
export declare const googleGenAiChannels: {
|
|
26
|
+
readonly GOOGLE_GENAI_GENERATE_CONTENT: "orchestrion:@google/genai:generate-content";
|
|
27
|
+
readonly GOOGLE_GENAI_EMBED_CONTENT: "orchestrion:@google/genai:embed-content";
|
|
28
|
+
readonly GOOGLE_GENAI_CHAT: "orchestrion:@google/genai:chat";
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=google-genai.d.ts.map
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const graphqlConfig: ({
|
|
2
|
+
channelName: string;
|
|
3
|
+
module: {
|
|
4
|
+
name: string;
|
|
5
|
+
versionRange: string;
|
|
6
|
+
filePath: string;
|
|
7
|
+
};
|
|
8
|
+
functionQuery: {
|
|
9
|
+
functionName: string;
|
|
10
|
+
kind: "Sync";
|
|
11
|
+
};
|
|
12
|
+
} | {
|
|
13
|
+
channelName: string;
|
|
14
|
+
module: {
|
|
15
|
+
name: string;
|
|
16
|
+
versionRange: string;
|
|
17
|
+
filePath: string;
|
|
18
|
+
};
|
|
19
|
+
functionQuery: {
|
|
20
|
+
functionName: string;
|
|
21
|
+
kind: "Auto";
|
|
22
|
+
};
|
|
23
|
+
})[];
|
|
24
|
+
export declare const graphqlChannels: {
|
|
25
|
+
readonly GRAPHQL_PARSE: "orchestrion:graphql:parse";
|
|
26
|
+
readonly GRAPHQL_VALIDATE: "orchestrion:graphql:validate";
|
|
27
|
+
readonly GRAPHQL_EXECUTE: "orchestrion:graphql:execute";
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=graphql.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InstrumentationConfig } from '@apm-js-collab/code-transformer';
|
|
2
|
+
export declare const postgresJsConfig: InstrumentationConfig[];
|
|
3
|
+
export declare const postgresJsChannels: {
|
|
4
|
+
readonly POSTGRESJS_HANDLE: "orchestrion:postgres:handle";
|
|
5
|
+
readonly POSTGRESJS_CONNECTION: "orchestrion:postgres:connection";
|
|
6
|
+
readonly POSTGRESJS_EXECUTE: "orchestrion:postgres:execute";
|
|
7
|
+
readonly POSTGRESJS_CONNECT: "orchestrion:postgres:connect";
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=postgres.d.ts.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export declare const redisConfig: ({
|
|
2
|
+
channelName: string;
|
|
3
|
+
module: {
|
|
4
|
+
name: string;
|
|
5
|
+
versionRange: string;
|
|
6
|
+
filePath: string;
|
|
7
|
+
};
|
|
8
|
+
functionQuery: {
|
|
9
|
+
expressionName: string;
|
|
10
|
+
kind: "Sync";
|
|
11
|
+
className?: undefined;
|
|
12
|
+
methodName?: undefined;
|
|
13
|
+
};
|
|
14
|
+
} | {
|
|
15
|
+
channelName: string;
|
|
16
|
+
module: {
|
|
17
|
+
name: string;
|
|
18
|
+
versionRange: string;
|
|
19
|
+
filePath: string;
|
|
20
|
+
};
|
|
21
|
+
functionQuery: {
|
|
22
|
+
className: string;
|
|
23
|
+
methodName: string;
|
|
24
|
+
kind: "Async";
|
|
25
|
+
expressionName?: undefined;
|
|
26
|
+
};
|
|
27
|
+
})[];
|
|
28
|
+
export declare const redisChannels: {
|
|
29
|
+
readonly REDIS_COMMAND: "orchestrion:redis:command";
|
|
30
|
+
readonly NODE_REDIS_COMMAND: "orchestrion:@redis/client:command";
|
|
31
|
+
readonly NODE_REDIS_EXECUTOR: "orchestrion:@redis/client:executor";
|
|
32
|
+
readonly NODE_REDIS_CONNECT: "orchestrion:@redis/client:connect";
|
|
33
|
+
readonly NODE_REDIS_MULTI: "orchestrion:@redis/client:multi";
|
|
34
|
+
readonly NODE_REDIS_PIPELINE: "orchestrion:@redis/client:pipeline";
|
|
35
|
+
readonly NODE_REDIS_BATCH: "orchestrion:@redis/client:batch";
|
|
36
|
+
};
|
|
37
|
+
//# sourceMappingURL=redis.d.ts.map
|
|
@@ -3,6 +3,7 @@ export declare const vercelAiConfig: InstrumentationConfig[];
|
|
|
3
3
|
export declare const vercelAiChannels: {
|
|
4
4
|
readonly VERCEL_AI_GENERATE_TEXT: "orchestrion:ai:generateText";
|
|
5
5
|
readonly VERCEL_AI_STREAM_TEXT: "orchestrion:ai:streamText";
|
|
6
|
+
readonly VERCEL_AI_GENERATE_OBJECT: "orchestrion:ai:generateObject";
|
|
6
7
|
readonly VERCEL_AI_EMBED: "orchestrion:ai:embed";
|
|
7
8
|
readonly VERCEL_AI_EMBED_MANY: "orchestrion:ai:embedMany";
|
|
8
9
|
readonly VERCEL_AI_EXECUTE_TOOL_CALL: "orchestrion:ai:executeToolCall";
|
|
@@ -1,14 +1,23 @@
|
|
|
1
|
+
import { amqplibChannelIntegration } from '../integrations/tracing-channel/amqplib';
|
|
1
2
|
import { anthropicChannelIntegration } from '../integrations/tracing-channel/anthropic';
|
|
3
|
+
import { googleGenAIChannelIntegration } from '../integrations/tracing-channel/google-genai';
|
|
4
|
+
import { graphqlChannelIntegration } from '../integrations/tracing-channel/graphql';
|
|
2
5
|
import { hapiChannelIntegration } from '../integrations/tracing-channel/hapi';
|
|
3
6
|
import { ioredisChannelIntegration } from '../integrations/tracing-channel/ioredis';
|
|
4
7
|
import { lruMemoizerChannelIntegration } from '../integrations/tracing-channel/lru-memoizer';
|
|
5
8
|
import { mysqlChannelIntegration } from '../integrations/tracing-channel/mysql';
|
|
6
9
|
import { openaiChannelIntegration } from '../integrations/tracing-channel/openai';
|
|
7
10
|
import { postgresChannelIntegration } from '../integrations/tracing-channel/postgres';
|
|
11
|
+
import { postgresJsChannelIntegration } from '../integrations/tracing-channel/postgres-js';
|
|
8
12
|
import { vercelAiChannelIntegration } from '../integrations/tracing-channel/vercel-ai';
|
|
13
|
+
import { expressChannelIntegration } from '../integrations/tracing-channel/express';
|
|
9
14
|
export { detectOrchestrionSetup, isOrchestrionInjected } from './detect';
|
|
10
|
-
export { anthropicChannelIntegration, hapiChannelIntegration, ioredisChannelIntegration, lruMemoizerChannelIntegration, mysqlChannelIntegration, openaiChannelIntegration, postgresChannelIntegration, vercelAiChannelIntegration, };
|
|
15
|
+
export { amqplibChannelIntegration, anthropicChannelIntegration, googleGenAIChannelIntegration, graphqlChannelIntegration, hapiChannelIntegration, ioredisChannelIntegration, lruMemoizerChannelIntegration, mysqlChannelIntegration, openaiChannelIntegration, postgresChannelIntegration, postgresJsChannelIntegration, vercelAiChannelIntegration, expressChannelIntegration, };
|
|
11
16
|
export { IORedisChannelIntegrationOptions, IORedisResponseHook } from '../integrations/tracing-channel/ioredis';
|
|
17
|
+
export { PostgresJsChannelIntegrationOptions } from '../integrations/tracing-channel/postgres-js';
|
|
18
|
+
export { redisChannelIntegration } from '../integrations/tracing-channel/redis';
|
|
19
|
+
export { RedisChannelIntegrationOptions, RedisResponseHook } from '../integrations/tracing-channel/redis';
|
|
20
|
+
export * from '../integrations/tracing-channel/graphql/graphql-types';
|
|
12
21
|
/**
|
|
13
22
|
* The canonical set of orchestrion diagnostics-channel integrations, keyed by their public
|
|
14
23
|
* (OTel-parity) factory name.
|
|
@@ -18,9 +27,9 @@ export { IORedisChannelIntegrationOptions, IORedisResponseHook } from '../integr
|
|
|
18
27
|
* `diagnosticsChannelInjectionIntegrations()` map — picks it up automatically, so there's no separate
|
|
19
28
|
* list to keep in sync.
|
|
20
29
|
*
|
|
21
|
-
* NOTE: `ioredisChannelIntegration`
|
|
22
|
-
* composite OTel `Redis` integration and
|
|
23
|
-
* can't live in `server-utils`), so `@sentry/node` wires
|
|
30
|
+
* NOTE: `ioredisChannelIntegration` and `redisChannelIntegration` are intentionally NOT here. They
|
|
31
|
+
* only partially replace the composite OTel `Redis` integration and need the node SDK's redis cache
|
|
32
|
+
* `responseHook` (which can't live in `server-utils`), so `@sentry/node` wires them up separately.
|
|
24
33
|
*/
|
|
25
34
|
export declare const channelIntegrations: {
|
|
26
35
|
readonly postgresIntegration: (options?: {
|
|
@@ -28,6 +37,9 @@ export declare const channelIntegrations: {
|
|
|
28
37
|
} | undefined) => import("@sentry/core").Integration & {
|
|
29
38
|
name: "Postgres";
|
|
30
39
|
};
|
|
40
|
+
readonly postgresJsIntegration: (options?: import(".").PostgresJsChannelIntegrationOptions | undefined) => import("@sentry/core").Integration & {
|
|
41
|
+
name: "PostgresJs";
|
|
42
|
+
};
|
|
31
43
|
readonly mysqlIntegration: () => import("@sentry/core").Integration & {
|
|
32
44
|
name: "Mysql";
|
|
33
45
|
};
|
|
@@ -40,6 +52,9 @@ export declare const channelIntegrations: {
|
|
|
40
52
|
readonly anthropicIntegration: (options?: import("@sentry/core").AnthropicAiOptions | undefined) => import("@sentry/core").Integration & {
|
|
41
53
|
name: "Anthropic_AI";
|
|
42
54
|
};
|
|
55
|
+
readonly googleGenAIIntegration: (options?: import("@sentry/core").GoogleGenAIOptions | undefined) => import("@sentry/core").Integration & {
|
|
56
|
+
name: "Google_GenAI";
|
|
57
|
+
};
|
|
43
58
|
readonly vercelAiIntegration: (options?: {
|
|
44
59
|
recordInputs?: boolean;
|
|
45
60
|
recordOutputs?: boolean;
|
|
@@ -47,8 +62,22 @@ export declare const channelIntegrations: {
|
|
|
47
62
|
} | undefined) => import("@sentry/core").Integration & {
|
|
48
63
|
name: "VercelAI";
|
|
49
64
|
};
|
|
65
|
+
readonly amqplibIntegration: () => import("@sentry/core").Integration & {
|
|
66
|
+
name: "Amqplib";
|
|
67
|
+
};
|
|
50
68
|
readonly hapiIntegration: () => import("@sentry/core").Integration & {
|
|
51
69
|
name: "Hapi";
|
|
52
70
|
};
|
|
71
|
+
readonly expressIntegration: (options?: import("../integrations/tracing-channel/express/types").ExpressIntegrationOptions | undefined) => import("@sentry/core").Integration & {
|
|
72
|
+
name: "Express";
|
|
73
|
+
};
|
|
74
|
+
readonly graphqlIntegration: (options?: import("../graphql/graphql-dc-subscriber").GraphqlDiagnosticChannelsOptions) => Pick<import("@sentry/core").Integration & {
|
|
75
|
+
name: "Graphql";
|
|
76
|
+
}, Exclude<keyof (import("@sentry/core").Integration & {
|
|
77
|
+
name: "Graphql";
|
|
78
|
+
}), "name" | "setupOnce">> & {
|
|
79
|
+
name: "Graphql";
|
|
80
|
+
setupOnce: () => void | undefined;
|
|
81
|
+
};
|
|
53
82
|
};
|
|
54
83
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { RedisDiagnosticChannelResponseHook } from './redis-dc-subscriber';
|
|
2
|
+
/** Options controlling the redis diagnostics-channel subscription. */
|
|
3
|
+
export interface RedisDiagnosticChannelsOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Optional hook invoked once the redis command response arrives. Useful for attaching
|
|
6
|
+
* response-derived attributes (e.g. cache hit/miss, payload size).
|
|
7
|
+
*/
|
|
8
|
+
responseHook?: RedisDiagnosticChannelResponseHook;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Auto-instrument the [redis](https://www.npmjs.com/package/redis) and
|
|
12
|
+
* [ioredis](https://www.npmjs.com/package/ioredis) libraries via their native
|
|
13
|
+
* `node:diagnostics_channel` tracing channels (node-redis >= 5.12.0, ioredis >= 5.11.0).
|
|
14
|
+
*/
|
|
15
|
+
export declare const redisIntegration: (options?: RedisDiagnosticChannelsOptions | undefined) => import("@sentry/core").Integration & {
|
|
16
|
+
name: string;
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -84,11 +84,6 @@ export type RedisTracingChannelFactory = <T extends object>(name: string) => Tra
|
|
|
84
84
|
* On older client versions the channels are never published to, so subscribers
|
|
85
85
|
* are inert — there is no double-instrumentation against any IITM-based
|
|
86
86
|
* patcher gated to those older versions.
|
|
87
|
-
*
|
|
88
|
-
* Idempotent: subsequent calls update the response hook but do not
|
|
89
|
-
* re-subscribe.
|
|
90
87
|
*/
|
|
91
88
|
export declare function subscribeRedisDiagnosticChannels(tracingChannel: RedisTracingChannelFactory, responseHook?: RedisDiagnosticChannelResponseHook): void;
|
|
92
|
-
/** Test-only: detach all channel bindings and reset module-local subscribe state. */
|
|
93
|
-
export declare function _resetRedisDiagnosticChannelsForTesting(): void;
|
|
94
89
|
//# sourceMappingURL=redis-dc-subscriber.d.ts.map
|
|
@@ -42,6 +42,11 @@ export interface TracingChannelLifeCycleOptions<TData extends object = object> {
|
|
|
42
42
|
/** Ends the span: `end()` on success, `end(error)` on failure. Idempotent. */
|
|
43
43
|
end: (error?: unknown) => void;
|
|
44
44
|
}) => boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Apply span/scope binding only if there is a parent span, similar to returning `undefined` in the `getSpan` callback.
|
|
47
|
+
* If you need to perform some conditional checking on the parent span before deciding, do it in the `getSpan` callback.
|
|
48
|
+
*/
|
|
49
|
+
requiresParentSpan?: boolean;
|
|
45
50
|
}
|
|
46
51
|
/** Returned by {@link bindTracingChannelToSpan}: the bound channel plus a teardown handle. */
|
|
47
52
|
export interface TracingChannelBindingHandle<TData extends object = object> {
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/** Shared, state-free helpers for the Vercel AI (`ai`) channel subscribers, plus the streamed model-call tap. */
|
|
2
|
+
/** Narrow to a string, or `undefined` for anything else. */
|
|
3
|
+
export declare function asString(value: unknown): string | undefined;
|
|
4
|
+
/** Narrow to a finite number, or `undefined` for anything else (including `NaN`). */
|
|
5
|
+
export declare function asNumber(value: unknown): number | undefined;
|
|
6
|
+
/** Add two optional numbers, treating a missing operand as `0` but returning `undefined` when both are absent. */
|
|
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
|
+
/** The aggregate handed back once a streamed model call finishes, in the shape `enrichSpanOnEnd` expects. */
|
|
11
|
+
export interface StreamedModelCallResult {
|
|
12
|
+
text?: string;
|
|
13
|
+
toolCalls: Array<Record<string, unknown>>;
|
|
14
|
+
usage?: unknown;
|
|
15
|
+
finishReason?: unknown;
|
|
16
|
+
responseId?: string;
|
|
17
|
+
responseModel?: string;
|
|
18
|
+
providerMetadata?: unknown;
|
|
19
|
+
}
|
|
20
|
+
/** A minimal structural check — the streamed model call exposes a web `ReadableStream` on `result.stream`. */
|
|
21
|
+
export declare function isReadableStream(value: unknown): value is ReadableStream<unknown>;
|
|
22
|
+
/**
|
|
23
|
+
* Wrap a streamed model call's `ReadableStream` so its chunks are observed as the SDK consumes them,
|
|
24
|
+
* without altering what the SDK sees. Returns a replacement stream to swap onto `result.stream`.
|
|
25
|
+
*
|
|
26
|
+
* `onFinal` runs exactly once when the stream drains cleanly; `onError` runs exactly once if it errors
|
|
27
|
+
* or is cancelled. Reading one source chunk per `pull` preserves the SDK's backpressure. The
|
|
28
|
+
* `try/catch` around every read guarantees the owning span is always ended — a leaked open span on a
|
|
29
|
+
* mid-stream failure would be worse than a slightly-less-enriched one.
|
|
30
|
+
*/
|
|
31
|
+
export declare function tapModelCallStream(stream: ReadableStream<unknown>, onFinal: (result: StreamedModelCallResult) => void, onError: (error: unknown) => void): ReadableStream<unknown>;
|
|
32
|
+
//# sourceMappingURL=util.d.ts.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Span } from '@sentry/core';
|
|
2
2
|
import { TracingChannel } from 'node:diagnostics_channel';
|
|
3
|
+
import { StreamedModelCallResult } from './util';
|
|
3
4
|
/** Drop the per-operation `callId` maps once the owning top-level operation settles (success or error). */
|
|
4
5
|
export declare function clearOperationId(data: VercelAiChannelMessage): void;
|
|
5
6
|
/**
|
|
@@ -10,7 +11,7 @@ export declare function clearOperationId(data: VercelAiChannelMessage): void;
|
|
|
10
11
|
*/
|
|
11
12
|
export declare function clearOperationCallId(callId: string): void;
|
|
12
13
|
/** The lifecycle event types the `ai:telemetry` channel can carry. */
|
|
13
|
-
export type ChannelEventType = 'generateText' | 'streamText' | 'step' | 'languageModelCall' | 'executeTool' | 'embed' | 'embedMany' | 'rerank';
|
|
14
|
+
export type ChannelEventType = 'generateText' | 'streamText' | 'generateObject' | 'step' | 'languageModelCall' | 'executeTool' | 'embed' | 'embedMany' | 'rerank';
|
|
14
15
|
/**
|
|
15
16
|
* The context object the AI SDK passes through one tracing-channel call. It is the same object
|
|
16
17
|
* identity across `start`/`end`/`asyncEnd`/`error`, and Node's `tracingChannel` attaches
|
|
@@ -49,9 +50,11 @@ export interface VercelAiChannelOptions {
|
|
|
49
50
|
*
|
|
50
51
|
* Safe to always call: on `ai` versions that don't publish to the channel (e.g. < 7) nothing is
|
|
51
52
|
* ever emitted and this is inert, so there is no double-instrumentation against the OTel-based
|
|
52
|
-
* patcher.
|
|
53
|
+
* patcher. The integration's `setupOnce` guarantees this runs a single time.
|
|
53
54
|
*/
|
|
54
55
|
export declare function subscribeVercelAiTracingChannel(tracingChannel: VercelAiTracingChannelFactory, options?: VercelAiChannelOptions): void;
|
|
56
|
+
/** Map the tapped stream aggregate onto the `languageModelCall` result shape `enrichSpanOnEnd` reads. */
|
|
57
|
+
export declare function streamedResultToChannelResult(final: StreamedModelCallResult): Record<string, unknown>;
|
|
55
58
|
/**
|
|
56
59
|
* Transform a channel `start` payload into the span that should be active for the operation. For
|
|
57
60
|
* `step` we deliberately don't open a span (model calls and tool calls are siblings under the
|
|
@@ -65,4 +68,5 @@ export declare function createSpanFromMessage(data: VercelAiChannelMessage, chan
|
|
|
65
68
|
* we simply don't set the attribute rather than emit a malformed span.
|
|
66
69
|
*/
|
|
67
70
|
export declare function enrichSpanOnEnd(span: Span, data: VercelAiChannelMessage, channelOptions: VercelAiChannelOptions): void;
|
|
71
|
+
export declare function captureToolError(span: Span, data: VercelAiChannelMessage, error: unknown): void;
|
|
68
72
|
//# sourceMappingURL=vercel-ai-dc-subscriber.d.ts.map
|
|
@@ -9,4 +9,4 @@ import { VercelAiChannelOptions, VercelAiTracingChannelFactory } from './vercel-
|
|
|
9
9
|
* subscribe time so we never look the integration up per event.
|
|
10
10
|
*/
|
|
11
11
|
export declare function subscribeVercelAiOrchestrionChannels(tracingChannel: VercelAiTracingChannelFactory, options?: VercelAiChannelOptions): void;
|
|
12
|
-
//# sourceMappingURL=vercel-ai-orchestrion-
|
|
12
|
+
//# sourceMappingURL=vercel-ai-orchestrion-subscriber.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/server-utils",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.65.0",
|
|
4
4
|
"description": "Server Utilities for all Sentry JavaScript SDKs",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/server-utils",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"@apm-js-collab/code-transformer": "^0.15.0",
|
|
87
87
|
"@apm-js-collab/tracing-hooks": "^0.10.1",
|
|
88
88
|
"@sentry/conventions": "^0.15.1",
|
|
89
|
-
"@sentry/core": "10.
|
|
89
|
+
"@sentry/core": "10.65.0",
|
|
90
90
|
"magic-string": "~0.30.0"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|