@sentry/server-utils 10.62.0 → 10.64.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/index.js +10 -2
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/anthropic.js +101 -0
- package/build/cjs/integrations/tracing-channel/anthropic.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/fastify/errors.js +42 -0
- package/build/cjs/integrations/tracing-channel/fastify/errors.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/fastify/index.js +34 -0
- package/build/cjs/integrations/tracing-channel/fastify/index.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/fastify/instrumentation.js +279 -0
- package/build/cjs/integrations/tracing-channel/fastify/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/fastify/utils.js +11 -0
- package/build/cjs/integrations/tracing-channel/fastify/utils.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/hapi-types.js +30 -0
- package/build/cjs/integrations/tracing-channel/hapi-types.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/hapi-utils.js +177 -0
- package/build/cjs/integrations/tracing-channel/hapi-utils.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/hapi.js +52 -0
- package/build/cjs/integrations/tracing-channel/hapi.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/ioredis.js +96 -0
- package/build/cjs/integrations/tracing-channel/ioredis.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/lru-memoizer.js +31 -0
- package/build/cjs/integrations/tracing-channel/lru-memoizer.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/mysql.js +46 -83
- package/build/cjs/integrations/tracing-channel/mysql.js.map +1 -1
- package/build/cjs/integrations/tracing-channel/openai.js +83 -0
- package/build/cjs/integrations/tracing-channel/openai.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/postgres.js +170 -0
- package/build/cjs/integrations/tracing-channel/postgres.js.map +1 -0
- package/build/cjs/integrations/tracing-channel/vercel-ai.js +25 -0
- package/build/cjs/integrations/tracing-channel/vercel-ai.js.map +1 -0
- package/build/cjs/mongoose/index.js +23 -0
- package/build/cjs/mongoose/index.js.map +1 -0
- package/build/cjs/mongoose/mongoose-dc-subscriber.js +97 -0
- package/build/cjs/mongoose/mongoose-dc-subscriber.js.map +1 -0
- package/build/cjs/orchestrion/bundler/vite.js +3 -3
- package/build/cjs/orchestrion/bundler/vite.js.map +1 -1
- package/build/cjs/orchestrion/channels.js +17 -1
- package/build/cjs/orchestrion/channels.js.map +1 -1
- package/build/cjs/orchestrion/config/anthropic-ai.js +43 -0
- package/build/cjs/orchestrion/config/anthropic-ai.js.map +1 -0
- package/build/cjs/orchestrion/config/hapi.js +26 -0
- package/build/cjs/orchestrion/config/hapi.js.map +1 -0
- package/build/cjs/orchestrion/config/index.js +35 -0
- package/build/cjs/orchestrion/config/index.js.map +1 -0
- package/build/cjs/orchestrion/config/ioredis.js +35 -0
- package/build/cjs/orchestrion/config/ioredis.js.map +1 -0
- package/build/cjs/orchestrion/config/lru-memoizer.js +17 -0
- package/build/cjs/orchestrion/config/lru-memoizer.js.map +1 -0
- package/build/cjs/orchestrion/config/mysql.js +16 -0
- package/build/cjs/orchestrion/config/mysql.js.map +1 -0
- package/build/cjs/orchestrion/config/openai.js +40 -0
- package/build/cjs/orchestrion/config/openai.js.map +1 -0
- package/build/cjs/orchestrion/config/pg.js +51 -0
- package/build/cjs/orchestrion/config/pg.js.map +1 -0
- package/build/cjs/orchestrion/config/vercel-ai.js +44 -0
- package/build/cjs/orchestrion/config/vercel-ai.js.map +1 -0
- package/build/cjs/orchestrion/detect.js +6 -1
- package/build/cjs/orchestrion/detect.js.map +1 -1
- package/build/cjs/orchestrion/index.js +27 -3
- package/build/cjs/orchestrion/index.js.map +1 -1
- package/build/cjs/orchestrion/runtime/register.js +10 -7
- package/build/cjs/orchestrion/runtime/register.js.map +1 -1
- package/build/cjs/redis/redis-statement-serializer.js +34 -0
- package/build/cjs/redis/redis-statement-serializer.js.map +1 -0
- package/build/cjs/tracing-channel.js +50 -11
- package/build/cjs/tracing-channel.js.map +1 -1
- package/build/cjs/vercel-ai/index.js +5 -3
- package/build/cjs/vercel-ai/index.js.map +1 -1
- package/build/cjs/vercel-ai/vercel-ai-dc-subscriber.js +11 -4
- package/build/cjs/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -1
- package/build/cjs/vercel-ai/vercel-ai-orchestrion-v6-subscriber.js +256 -0
- package/build/cjs/vercel-ai/vercel-ai-orchestrion-v6-subscriber.js.map +1 -0
- package/build/esm/index.js +3 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/integrations/tracing-channel/anthropic.js +99 -0
- package/build/esm/integrations/tracing-channel/anthropic.js.map +1 -0
- package/build/esm/integrations/tracing-channel/fastify/errors.js +39 -0
- package/build/esm/integrations/tracing-channel/fastify/errors.js.map +1 -0
- package/build/esm/integrations/tracing-channel/fastify/index.js +30 -0
- package/build/esm/integrations/tracing-channel/fastify/index.js.map +1 -0
- package/build/esm/integrations/tracing-channel/fastify/instrumentation.js +277 -0
- package/build/esm/integrations/tracing-channel/fastify/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing-channel/fastify/utils.js +8 -0
- package/build/esm/integrations/tracing-channel/fastify/utils.js.map +1 -0
- package/build/esm/integrations/tracing-channel/hapi-types.js +25 -0
- package/build/esm/integrations/tracing-channel/hapi-types.js.map +1 -0
- package/build/esm/integrations/tracing-channel/hapi-utils.js +172 -0
- package/build/esm/integrations/tracing-channel/hapi-utils.js.map +1 -0
- package/build/esm/integrations/tracing-channel/hapi.js +50 -0
- package/build/esm/integrations/tracing-channel/hapi.js.map +1 -0
- package/build/esm/integrations/tracing-channel/ioredis.js +94 -0
- package/build/esm/integrations/tracing-channel/ioredis.js.map +1 -0
- package/build/esm/integrations/tracing-channel/lru-memoizer.js +29 -0
- package/build/esm/integrations/tracing-channel/lru-memoizer.js.map +1 -0
- package/build/esm/integrations/tracing-channel/mysql.js +47 -84
- package/build/esm/integrations/tracing-channel/mysql.js.map +1 -1
- package/build/esm/integrations/tracing-channel/openai.js +81 -0
- package/build/esm/integrations/tracing-channel/openai.js.map +1 -0
- package/build/esm/integrations/tracing-channel/postgres.js +168 -0
- package/build/esm/integrations/tracing-channel/postgres.js.map +1 -0
- package/build/esm/integrations/tracing-channel/vercel-ai.js +23 -0
- package/build/esm/integrations/tracing-channel/vercel-ai.js.map +1 -0
- package/build/esm/mongoose/index.js +21 -0
- package/build/esm/mongoose/index.js.map +1 -0
- package/build/esm/mongoose/mongoose-dc-subscriber.js +89 -0
- package/build/esm/mongoose/mongoose-dc-subscriber.js.map +1 -0
- package/build/esm/orchestrion/bundler/vite.js +1 -1
- package/build/esm/orchestrion/channels.js +17 -1
- package/build/esm/orchestrion/channels.js.map +1 -1
- package/build/esm/orchestrion/config/anthropic-ai.js +40 -0
- package/build/esm/orchestrion/config/anthropic-ai.js.map +1 -0
- package/build/esm/orchestrion/config/hapi.js +23 -0
- package/build/esm/orchestrion/config/hapi.js.map +1 -0
- package/build/esm/orchestrion/config/index.js +31 -0
- package/build/esm/orchestrion/config/index.js.map +1 -0
- package/build/esm/orchestrion/config/ioredis.js +32 -0
- package/build/esm/orchestrion/config/ioredis.js.map +1 -0
- package/build/esm/orchestrion/config/lru-memoizer.js +14 -0
- package/build/esm/orchestrion/config/lru-memoizer.js.map +1 -0
- package/build/esm/orchestrion/config/mysql.js +13 -0
- package/build/esm/orchestrion/config/mysql.js.map +1 -0
- package/build/esm/orchestrion/config/openai.js +37 -0
- package/build/esm/orchestrion/config/openai.js.map +1 -0
- package/build/esm/orchestrion/config/pg.js +48 -0
- package/build/esm/orchestrion/config/pg.js.map +1 -0
- package/build/esm/orchestrion/config/vercel-ai.js +41 -0
- package/build/esm/orchestrion/config/vercel-ai.js.map +1 -0
- package/build/esm/orchestrion/detect.js +6 -2
- package/build/esm/orchestrion/detect.js.map +1 -1
- package/build/esm/orchestrion/index.js +21 -2
- package/build/esm/orchestrion/index.js.map +1 -1
- package/build/esm/orchestrion/runtime/register.js +8 -4
- package/build/esm/orchestrion/runtime/register.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/redis/redis-statement-serializer.js +32 -0
- package/build/esm/redis/redis-statement-serializer.js.map +1 -0
- package/build/esm/tracing-channel.js +51 -12
- package/build/esm/tracing-channel.js.map +1 -1
- package/build/esm/vercel-ai/index.js +6 -4
- package/build/esm/vercel-ai/index.js.map +1 -1
- package/build/esm/vercel-ai/vercel-ai-dc-subscriber.js +14 -8
- package/build/esm/vercel-ai/vercel-ai-dc-subscriber.js.map +1 -1
- package/build/esm/vercel-ai/vercel-ai-orchestrion-v6-subscriber.js +254 -0
- package/build/esm/vercel-ai/vercel-ai-orchestrion-v6-subscriber.js.map +1 -0
- package/build/types/index.d.ts +3 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/anthropic.d.ts +10 -0
- package/build/types/integrations/tracing-channel/anthropic.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/fastify/errors.d.ts +12 -0
- package/build/types/integrations/tracing-channel/fastify/errors.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/fastify/index.d.ts +66 -0
- package/build/types/integrations/tracing-channel/fastify/index.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/fastify/instrumentation.d.ts +10 -0
- package/build/types/integrations/tracing-channel/fastify/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/fastify/types.d.ts +32 -0
- package/build/types/integrations/tracing-channel/fastify/types.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/fastify/utils.d.ts +9 -0
- package/build/types/integrations/tracing-channel/fastify/utils.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/hapi-types.d.ts +53 -0
- package/build/types/integrations/tracing-channel/hapi-types.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/hapi-utils.d.ts +25 -0
- package/build/types/integrations/tracing-channel/hapi-utils.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/hapi.d.ts +9 -0
- package/build/types/integrations/tracing-channel/hapi.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/ioredis.d.ts +17 -0
- package/build/types/integrations/tracing-channel/ioredis.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/lru-memoizer.d.ts +10 -0
- package/build/types/integrations/tracing-channel/lru-memoizer.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/mysql.d.ts +3 -1
- package/build/types/integrations/tracing-channel/mysql.d.ts.map +1 -1
- package/build/types/integrations/tracing-channel/openai.d.ts +10 -0
- package/build/types/integrations/tracing-channel/openai.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/postgres.d.ts +15 -0
- package/build/types/integrations/tracing-channel/postgres.d.ts.map +1 -0
- package/build/types/integrations/tracing-channel/vercel-ai.d.ts +13 -0
- package/build/types/integrations/tracing-channel/vercel-ai.d.ts.map +1 -0
- package/build/types/mongoose/index.d.ts +11 -0
- package/build/types/mongoose/index.d.ts.map +1 -0
- package/build/types/mongoose/mongoose-dc-subscriber.d.ts +63 -0
- package/build/types/mongoose/mongoose-dc-subscriber.d.ts.map +1 -0
- package/build/types/orchestrion/channels.d.ts +21 -0
- package/build/types/orchestrion/channels.d.ts.map +1 -1
- package/build/types/orchestrion/config/anthropic-ai.d.ts +31 -0
- package/build/types/orchestrion/config/anthropic-ai.d.ts.map +1 -0
- package/build/types/orchestrion/config/hapi.d.ts +17 -0
- package/build/types/orchestrion/config/hapi.d.ts.map +1 -0
- package/build/types/orchestrion/{config.d.ts → config/index.d.ts} +1 -12
- package/build/types/orchestrion/config/index.d.ts.map +1 -0
- package/build/types/orchestrion/config/ioredis.d.ts +7 -0
- package/build/types/orchestrion/config/ioredis.d.ts.map +1 -0
- package/build/types/orchestrion/config/lru-memoizer.d.ts +16 -0
- package/build/types/orchestrion/config/lru-memoizer.d.ts.map +1 -0
- package/build/types/orchestrion/config/mysql.d.ts +16 -0
- package/build/types/orchestrion/config/mysql.d.ts.map +1 -0
- package/build/types/orchestrion/config/openai.d.ts +20 -0
- package/build/types/orchestrion/config/openai.d.ts.map +1 -0
- package/build/types/orchestrion/config/pg.d.ts +33 -0
- package/build/types/orchestrion/config/pg.d.ts.map +1 -0
- package/build/types/orchestrion/config/vercel-ai.d.ts +11 -0
- package/build/types/orchestrion/config/vercel-ai.d.ts.map +1 -0
- package/build/types/orchestrion/detect.d.ts +10 -0
- package/build/types/orchestrion/detect.d.ts.map +1 -1
- package/build/types/orchestrion/index.d.ts +53 -2
- package/build/types/orchestrion/index.d.ts.map +1 -1
- package/build/types/orchestrion/runtime/register.d.ts.map +1 -1
- package/build/types/redis/redis-statement-serializer.d.ts +6 -0
- package/build/types/redis/redis-statement-serializer.d.ts.map +1 -0
- package/build/types/tracing-channel.d.ts +22 -0
- package/build/types/tracing-channel.d.ts.map +1 -1
- package/build/types/vercel-ai/index.d.ts +3 -1
- package/build/types/vercel-ai/index.d.ts.map +1 -1
- package/build/types/vercel-ai/vercel-ai-dc-subscriber.d.ts +10 -4
- 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 +12 -0
- package/build/types/vercel-ai/vercel-ai-orchestrion-v6-subscriber.d.ts.map +1 -0
- package/build/types-ts3.8/index.d.ts +4 -0
- package/build/types-ts3.8/integrations/tracing-channel/anthropic.d.ts +10 -0
- package/build/types-ts3.8/integrations/tracing-channel/fastify/errors.d.ts +12 -0
- package/build/types-ts3.8/integrations/tracing-channel/fastify/index.d.ts +66 -0
- package/build/types-ts3.8/integrations/tracing-channel/fastify/instrumentation.d.ts +10 -0
- package/build/types-ts3.8/integrations/tracing-channel/fastify/types.d.ts +32 -0
- package/build/types-ts3.8/integrations/tracing-channel/fastify/utils.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing-channel/hapi-types.d.ts +65 -0
- package/build/types-ts3.8/integrations/tracing-channel/hapi-utils.d.ts +25 -0
- package/build/types-ts3.8/integrations/tracing-channel/hapi.d.ts +9 -0
- package/build/types-ts3.8/integrations/tracing-channel/ioredis.d.ts +17 -0
- package/build/types-ts3.8/integrations/tracing-channel/lru-memoizer.d.ts +10 -0
- package/build/types-ts3.8/integrations/tracing-channel/mysql.d.ts +3 -1
- package/build/types-ts3.8/integrations/tracing-channel/openai.d.ts +10 -0
- package/build/types-ts3.8/integrations/tracing-channel/postgres.d.ts +15 -0
- package/build/types-ts3.8/integrations/tracing-channel/vercel-ai.d.ts +13 -0
- package/build/types-ts3.8/mongoose/index.d.ts +11 -0
- package/build/types-ts3.8/mongoose/mongoose-dc-subscriber.d.ts +63 -0
- package/build/types-ts3.8/node-diagnostics-channel.d.ts +19 -0
- package/build/types-ts3.8/orchestrion/channels.d.ts +21 -0
- package/build/types-ts3.8/orchestrion/config/anthropic-ai.d.ts +31 -0
- package/build/types-ts3.8/orchestrion/config/hapi.d.ts +17 -0
- package/build/types-ts3.8/orchestrion/{config.d.ts → config/index.d.ts} +1 -12
- package/build/types-ts3.8/orchestrion/config/ioredis.d.ts +7 -0
- package/build/types-ts3.8/orchestrion/config/lru-memoizer.d.ts +16 -0
- package/build/types-ts3.8/orchestrion/config/mysql.d.ts +16 -0
- package/build/types-ts3.8/orchestrion/config/openai.d.ts +20 -0
- package/build/types-ts3.8/orchestrion/config/pg.d.ts +33 -0
- package/build/types-ts3.8/orchestrion/config/vercel-ai.d.ts +11 -0
- package/build/types-ts3.8/orchestrion/detect.d.ts +10 -0
- package/build/types-ts3.8/orchestrion/index.d.ts +53 -2
- package/build/types-ts3.8/redis/redis-statement-serializer.d.ts +6 -0
- package/build/types-ts3.8/tracing-channel.d.ts +22 -0
- package/build/types-ts3.8/vercel-ai/index.d.ts +3 -1
- package/build/types-ts3.8/vercel-ai/vercel-ai-dc-subscriber.d.ts +10 -4
- package/build/types-ts3.8/vercel-ai/vercel-ai-orchestrion-v6-subscriber.d.ts +12 -0
- package/package.json +10 -10
- package/build/cjs/orchestrion/config.js +0 -38
- package/build/cjs/orchestrion/config.js.map +0 -1
- package/build/esm/orchestrion/config.js +0 -34
- package/build/esm/orchestrion/config.js.map +0 -1
- package/build/types/orchestrion/config.d.ts.map +0 -1
|
@@ -4,6 +4,16 @@ declare global {
|
|
|
4
4
|
bundler?: boolean;
|
|
5
5
|
} | undefined;
|
|
6
6
|
}
|
|
7
|
+
/**
|
|
8
|
+
* Whether orchestrion has injected the diagnostics channels into this process,
|
|
9
|
+
* either by the runtime `--import` hook / init-time registration (`runtime`)
|
|
10
|
+
* or a bundler plugin (`bundler`). Both injectors set a flag on the
|
|
11
|
+
* `globalThis.__SENTRY_ORCHESTRION__` marker.
|
|
12
|
+
*
|
|
13
|
+
* Use this to avoid wiring up channel-subscriber integrations when nothing
|
|
14
|
+
* will ever publish to those channels.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isOrchestrionInjected(): boolean;
|
|
7
17
|
/**
|
|
8
18
|
* Verifies that the diagnostics channels have been injected either by the
|
|
9
19
|
* runtime `--import` hook (or init-time registration), a bundler plugin, or
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../../src/orchestrion/detect.ts"],"names":[],"mappings":"AAGA,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,sBAAsB,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC;CAClF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAiB7C"}
|
|
1
|
+
{"version":3,"file":"detect.d.ts","sourceRoot":"","sources":["../../../src/orchestrion/detect.ts"],"names":[],"mappings":"AAGA,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,sBAAsB,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC;CAClF;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,IAAI,OAAO,CAG/C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,sBAAsB,IAAI,IAAI,CAiB7C"}
|
|
@@ -1,3 +1,54 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { anthropicChannelIntegration } from '../integrations/tracing-channel/anthropic';
|
|
2
|
+
import { hapiChannelIntegration } from '../integrations/tracing-channel/hapi';
|
|
3
|
+
import { ioredisChannelIntegration } from '../integrations/tracing-channel/ioredis';
|
|
4
|
+
import { lruMemoizerChannelIntegration } from '../integrations/tracing-channel/lru-memoizer';
|
|
5
|
+
import { mysqlChannelIntegration } from '../integrations/tracing-channel/mysql';
|
|
6
|
+
import { openaiChannelIntegration } from '../integrations/tracing-channel/openai';
|
|
7
|
+
import { postgresChannelIntegration } from '../integrations/tracing-channel/postgres';
|
|
8
|
+
import { vercelAiChannelIntegration } from '../integrations/tracing-channel/vercel-ai';
|
|
9
|
+
export { detectOrchestrionSetup, isOrchestrionInjected } from './detect';
|
|
10
|
+
export { anthropicChannelIntegration, hapiChannelIntegration, ioredisChannelIntegration, lruMemoizerChannelIntegration, mysqlChannelIntegration, openaiChannelIntegration, postgresChannelIntegration, vercelAiChannelIntegration, };
|
|
11
|
+
export type { IORedisChannelIntegrationOptions, IORedisResponseHook } from '../integrations/tracing-channel/ioredis';
|
|
12
|
+
/**
|
|
13
|
+
* The canonical set of orchestrion diagnostics-channel integrations, keyed by their public
|
|
14
|
+
* (OTel-parity) factory name.
|
|
15
|
+
*
|
|
16
|
+
* Single source of truth: add a new channel integration here and every consumer — the `@sentry/node`
|
|
17
|
+
* opt-in helper (`experimentalUseDiagnosticsChannelInjection`) and its public
|
|
18
|
+
* `diagnosticsChannelInjectionIntegrations()` map — picks it up automatically, so there's no separate
|
|
19
|
+
* list to keep in sync.
|
|
20
|
+
*
|
|
21
|
+
* NOTE: `ioredisChannelIntegration` is intentionally NOT here. It only partially replaces the
|
|
22
|
+
* composite OTel `Redis` integration and needs the node SDK's redis cache `responseHook` (which
|
|
23
|
+
* can't live in `server-utils`), so `@sentry/node` wires it up separately.
|
|
24
|
+
*/
|
|
25
|
+
export declare const channelIntegrations: {
|
|
26
|
+
readonly postgresIntegration: (options?: {
|
|
27
|
+
ignoreConnectSpans?: boolean;
|
|
28
|
+
} | undefined) => import("@sentry/core").Integration & {
|
|
29
|
+
name: "Postgres";
|
|
30
|
+
};
|
|
31
|
+
readonly mysqlIntegration: () => import("@sentry/core").Integration & {
|
|
32
|
+
name: "Mysql";
|
|
33
|
+
};
|
|
34
|
+
readonly lruMemoizerIntegration: () => import("@sentry/core").Integration & {
|
|
35
|
+
name: "LruMemoizer";
|
|
36
|
+
};
|
|
37
|
+
readonly openaiIntegration: (options?: import("@sentry/core").OpenAiOptions | undefined) => import("@sentry/core").Integration & {
|
|
38
|
+
name: "OpenAI";
|
|
39
|
+
};
|
|
40
|
+
readonly anthropicIntegration: (options?: import("@sentry/core").AnthropicAiOptions | undefined) => import("@sentry/core").Integration & {
|
|
41
|
+
name: "Anthropic_AI";
|
|
42
|
+
};
|
|
43
|
+
readonly vercelAiIntegration: (options?: {
|
|
44
|
+
recordInputs?: boolean;
|
|
45
|
+
recordOutputs?: boolean;
|
|
46
|
+
enableTruncation?: boolean;
|
|
47
|
+
} | undefined) => import("@sentry/core").Integration & {
|
|
48
|
+
name: "VercelAI";
|
|
49
|
+
};
|
|
50
|
+
readonly hapiIntegration: () => import("@sentry/core").Integration & {
|
|
51
|
+
name: "Hapi";
|
|
52
|
+
};
|
|
53
|
+
};
|
|
3
54
|
//# 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,sBAAsB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/orchestrion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,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,0BAA0B,EAAE,MAAM,2CAA2C,CAAC;AAEvF,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACzE,OAAO,EACL,2BAA2B,EAC3B,sBAAsB,EACtB,yBAAyB,EACzB,6BAA6B,EAC7B,uBAAuB,EACvB,wBAAwB,EACxB,0BAA0B,EAC1B,0BAA0B,GAC3B,CAAC;AACF,YAAY,EAAE,gCAAgC,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAErH;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQtB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../src/orchestrion/runtime/register.ts"],"names":[],"mappings":"AAOA,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,sBAAsB,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC;CAClF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mCAAmC,IAAI,IAAI,
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../../src/orchestrion/runtime/register.ts"],"names":[],"mappings":"AAOA,OAAO,CAAC,MAAM,CAAC;IAEb,IAAI,sBAAsB,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC;CAClF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mCAAmC,IAAI,IAAI,CAiG1D"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Given the redis command name and arguments, return a combination of the
|
|
3
|
+
* command name + the allowed arguments according to `serializationSubsets`.
|
|
4
|
+
*/
|
|
5
|
+
export declare const defaultDbStatementSerializer: (cmdName: string, cmdArgs: Array<string | Buffer | number | unknown[]>) => string;
|
|
6
|
+
//# sourceMappingURL=redis-statement-serializer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redis-statement-serializer.d.ts","sourceRoot":"","sources":["../../../src/redis/redis-statement-serializer.ts"],"names":[],"mappings":"AA0CA;;;GAGG;AACH,eAAO,MAAM,4BAA4B,GACvC,SAAS,MAAM,EACf,SAAS,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,EAAE,CAAC,KACnD,MAWF,CAAC"}
|
|
@@ -1,7 +1,14 @@
|
|
|
1
1
|
import type { TracingChannel, TracingChannelSubscribers } from 'node:diagnostics_channel';
|
|
2
2
|
import type { ExclusiveEventHintOrCaptureContext, Span } from '@sentry/core';
|
|
3
3
|
export type TracingChannelPayloadWithSpan<TData extends object> = TData & {
|
|
4
|
+
/**
|
|
5
|
+
* The current active span for the traced call.
|
|
6
|
+
*/
|
|
4
7
|
_sentrySpan?: Span;
|
|
8
|
+
/**
|
|
9
|
+
* The context's active store value, used to restore the context for asyncStart continuations for callback-based tracing.
|
|
10
|
+
*/
|
|
11
|
+
_sentryCallerStore?: unknown;
|
|
5
12
|
};
|
|
6
13
|
export interface SentryTracingChannel<TData extends object = object> extends Omit<TracingChannel<TData, TracingChannelPayloadWithSpan<TData>>, 'subscribe' | 'unsubscribe'> {
|
|
7
14
|
subscribe(subscribers: Partial<TracingChannelSubscribers<TracingChannelPayloadWithSpan<TData>>>): void;
|
|
@@ -20,6 +27,21 @@ export interface TracingChannelLifeCycleOptions<TData extends object = object> {
|
|
|
20
27
|
* For database drivers, it is not recommended to set this at all.
|
|
21
28
|
*/
|
|
22
29
|
captureError?: boolean | ((e: unknown) => ExclusiveEventHintOrCaptureContext);
|
|
30
|
+
/**
|
|
31
|
+
* Take ownership of *when* the span ends: return `true` and the helper won't end it on
|
|
32
|
+
* `end`/`asyncEnd`. For results that settle out-of-band — e.g. a streamed `EventEmitter` that
|
|
33
|
+
* completes via its own `'end'`/`'error'` events.
|
|
34
|
+
*
|
|
35
|
+
* Call `end` when it settles — `end()` on success, `end(error)` on failure. `end` owns *how* the span
|
|
36
|
+
* ends (error status/attributes, `captureError`, `beforeSpanEnd`) and is idempotent. Default `false`
|
|
37
|
+
* lets the helper end the span as usual.
|
|
38
|
+
*/
|
|
39
|
+
deferSpanEnd?: (args: {
|
|
40
|
+
span: Span;
|
|
41
|
+
data: TracingChannelPayloadWithSpan<TData>;
|
|
42
|
+
/** Ends the span: `end()` on success, `end(error)` on failure. Idempotent. */
|
|
43
|
+
end: (error?: unknown) => void;
|
|
44
|
+
}) => boolean;
|
|
23
45
|
}
|
|
24
46
|
/** Returned by {@link bindTracingChannelToSpan}: the bound channel plus a teardown handle. */
|
|
25
47
|
export interface TracingChannelBindingHandle<TData extends object = object> {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tracing-channel.d.ts","sourceRoot":"","sources":["../../src/tracing-channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAE1F,OAAO,KAAK,EAAE,kCAAkC,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"tracing-channel.d.ts","sourceRoot":"","sources":["../../src/tracing-channel.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AAE1F,OAAO,KAAK,EAAE,kCAAkC,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAK7E,MAAM,MAAM,6BAA6B,CAAC,KAAK,SAAS,MAAM,IAAI,KAAK,GAAG;IACxE;;OAEG;IACH,WAAW,CAAC,EAAE,IAAI,CAAC;IAEnB;;OAEG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAKF,MAAM,WAAW,oBAAoB,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM,CAAE,SAAQ,IAAI,CAC/E,cAAc,CAAC,KAAK,EAAE,6BAA6B,CAAC,KAAK,CAAC,CAAC,EAC3D,WAAW,GAAG,aAAa,CAC5B;IACC,SAAS,CAAC,WAAW,EAAE,OAAO,CAAC,yBAAyB,CAAC,6BAA6B,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;IACvG,WAAW,CAAC,WAAW,EAAE,OAAO,CAAC,yBAAyB,CAAC,6BAA6B,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC;CAC1G;AAED,MAAM,WAAW,8BAA8B,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM;IAC3E;;;OAGG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,6BAA6B,CAAC,KAAK,CAAC,KAAK,IAAI,CAAC;IAEjF;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,KAAK,kCAAkC,CAAC,CAAC;IAE9E;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE;QACpB,IAAI,EAAE,IAAI,CAAC;QACX,IAAI,EAAE,6BAA6B,CAAC,KAAK,CAAC,CAAC;QAC3C,8EAA8E;QAC9E,GAAG,EAAE,CAAC,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;KAChC,KAAK,OAAO,CAAC;CACf;AAED,8FAA8F;AAC9F,MAAM,WAAW,2BAA2B,CAAC,KAAK,SAAS,MAAM,GAAG,MAAM;IACxE;;OAEG;IACH,OAAO,EAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAErC;;;OAGG;IACH,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAID;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,SAAS,MAAM,EAC3D,OAAO,EAAE,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,EACrC,OAAO,EAAE,CAAC,IAAI,EAAE,6BAA6B,CAAC,KAAK,CAAC,KAAK,IAAI,GAAG,SAAS,EACzE,IAAI,CAAC,EAAE,8BAA8B,CAAC,KAAK,CAAC,GAC3C,2BAA2B,CAAC,KAAK,CAAC,CA0FpC"}
|
|
@@ -20,6 +20,8 @@ type VercelAiOptions = {
|
|
|
20
20
|
/**
|
|
21
21
|
* Auto-instrument the `ai` SDK's native telemetry tracing channel (ai >= 7).
|
|
22
22
|
*/
|
|
23
|
-
export declare const vercelAiIntegration: (options?: VercelAiOptions | undefined) => import("@sentry/core").Integration
|
|
23
|
+
export declare const vercelAiIntegration: (options?: VercelAiOptions | undefined) => import("@sentry/core").Integration & {
|
|
24
|
+
name: "VercelAI";
|
|
25
|
+
};
|
|
24
26
|
export {};
|
|
25
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vercel-ai/index.ts"],"names":[],"mappings":"AAIA,KAAK,eAAe,GAAG;IACrB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAoBF;;GAEG;AACH,eAAO,MAAM,mBAAmB
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vercel-ai/index.ts"],"names":[],"mappings":"AAIA,KAAK,eAAe,GAAG;IACrB;;;;OAIG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B,CAAC;AAoBF;;GAEG;AACH,eAAO,MAAM,mBAAmB;;CAA0C,CAAC"}
|
|
@@ -2,8 +2,15 @@ import type { Span } from '@sentry/core';
|
|
|
2
2
|
import type { TracingChannel } from 'node:diagnostics_channel';
|
|
3
3
|
/** Drop the per-operation `callId` maps once the owning top-level operation settles (success or error). */
|
|
4
4
|
export declare function clearOperationId(data: VercelAiChannelMessage): void;
|
|
5
|
+
/**
|
|
6
|
+
* Drop the per-operation `callId` maps for a single id. The v6 orchestrion adapter uses this to clear a
|
|
7
|
+
* `streamText` operation only after its lazily-run model call settles — the operation's own span ends
|
|
8
|
+
* synchronously (when `streamText` returns) but the model call runs later as the stream is consumed, and
|
|
9
|
+
* it still needs the operation's `operationId`/`isStream` entry to name itself `ai.streamText.doStream`.
|
|
10
|
+
*/
|
|
11
|
+
export declare function clearOperationCallId(callId: string): void;
|
|
5
12
|
/** The lifecycle event types the `ai:telemetry` channel can carry. */
|
|
6
|
-
export type ChannelEventType = 'generateText' | 'streamText' | 'step' | 'languageModelCall' | 'executeTool' | 'embed' | 'rerank';
|
|
13
|
+
export type ChannelEventType = 'generateText' | 'streamText' | 'step' | 'languageModelCall' | 'executeTool' | 'embed' | 'embedMany' | 'rerank';
|
|
7
14
|
/**
|
|
8
15
|
* The context object the AI SDK passes through one tracing-channel call. It is the same object
|
|
9
16
|
* identity across `start`/`end`/`asyncEnd`/`error`, and Node's `tracingChannel` attaches
|
|
@@ -25,9 +32,9 @@ export interface VercelAiChannelMessage {
|
|
|
25
32
|
* nested AI SDK operations (model calls, tool calls) become children of the enclosing span without
|
|
26
33
|
* any manual parent bookkeeping here.
|
|
27
34
|
*/
|
|
28
|
-
type VercelAiTracingChannelFactory = <T extends object>(name: string) => TracingChannel<T, T>;
|
|
35
|
+
export type VercelAiTracingChannelFactory = <T extends object>(name: string) => TracingChannel<T, T>;
|
|
29
36
|
/** Integration-level recording options, pinned at subscribe time so we never look the integration up per event. */
|
|
30
|
-
interface VercelAiChannelOptions {
|
|
37
|
+
export interface VercelAiChannelOptions {
|
|
31
38
|
recordInputs?: boolean;
|
|
32
39
|
recordOutputs?: boolean;
|
|
33
40
|
enableTruncation?: boolean;
|
|
@@ -58,5 +65,4 @@ export declare function createSpanFromMessage(data: VercelAiChannelMessage, chan
|
|
|
58
65
|
* we simply don't set the attribute rather than emit a malformed span.
|
|
59
66
|
*/
|
|
60
67
|
export declare function enrichSpanOnEnd(span: Span, data: VercelAiChannelMessage, channelOptions: VercelAiChannelOptions): void;
|
|
61
|
-
export {};
|
|
62
68
|
//# sourceMappingURL=vercel-ai-dc-subscriber.d.ts.map
|
|
@@ -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,EAAE,MAAM,cAAc,CAAC;AAiBzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AA6C/D,2GAA2G;AAC3G,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,sBAAsB,GAAG,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,EAAE,MAAM,cAAc,CAAC;AAiBzC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AA6C/D,2GAA2G;AAC3G,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,sBAAsB,GAAG,IAAI,CAQnE;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAGzD;AA0CD,sEAAsE;AACtE,MAAM,MAAM,gBAAgB,GACxB,cAAc,GACd,YAAY,GACZ,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;AAID;;;;;;;;;;;GAWG;AACH,wBAAgB,+BAA+B,CAC7C,cAAc,EAAE,6BAA6B,EAC7C,OAAO,GAAE,sBAA2B,GACnC,IAAI,CAkBN;AAED;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,sBAAsB,EAC5B,cAAc,EAAE,sBAAsB,GACrC,IAAI,GAAG,SAAS,CAmDlB;AA4ED;;;;GAIG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,sBAAsB,EAC5B,cAAc,EAAE,sBAAsB,GACrC,IAAI,CAqFN"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type VercelAiChannelOptions, type VercelAiTracingChannelFactory } from './vercel-ai-dc-subscriber';
|
|
2
|
+
/**
|
|
3
|
+
* Subscribe the v6 orchestrion channel adapter. Safe to always call: inert on
|
|
4
|
+
* `ai` >= 7 (those channels are never published) and when orchestrion injection
|
|
5
|
+
* isn't active. Idempotent.
|
|
6
|
+
*
|
|
7
|
+
* `tracingChannel` is the platform-provided factory (the same one passed to
|
|
8
|
+
* `subscribeVercelAiTracingChannel`); `options` pins the recording settings at
|
|
9
|
+
* subscribe time so we never look the integration up per event.
|
|
10
|
+
*/
|
|
11
|
+
export declare function subscribeVercelAiOrchestrionChannels(tracingChannel: VercelAiTracingChannelFactory, options?: VercelAiChannelOptions): void;
|
|
12
|
+
//# sourceMappingURL=vercel-ai-orchestrion-v6-subscriber.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vercel-ai-orchestrion-v6-subscriber.d.ts","sourceRoot":"","sources":["../../../src/vercel-ai/vercel-ai-orchestrion-v6-subscriber.ts"],"names":[],"mappings":"AAKA,OAAO,EAML,KAAK,sBAAsB,EAC3B,KAAK,6BAA6B,EACnC,MAAM,2BAA2B,CAAC;AAyEnC;;;;;;;;GAQG;AACH,wBAAgB,oCAAoC,CAClD,cAAc,EAAE,6BAA6B,EAC7C,OAAO,GAAE,sBAA2B,GACnC,IAAI,CA6DN"}
|
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
/// <reference path="./node-diagnostics-channel.d.ts" />
|
|
1
2
|
/**
|
|
2
3
|
* Server-only utilities shared across Sentry server SDKs.
|
|
3
4
|
*
|
|
4
5
|
* @module
|
|
5
6
|
*/
|
|
7
|
+
export { mongooseIntegration } from './mongoose';
|
|
6
8
|
export { IOREDIS_DC_CHANNEL_COMMAND, IOREDIS_DC_CHANNEL_CONNECT, REDIS_DC_CHANNEL_BATCH, REDIS_DC_CHANNEL_COMMAND, REDIS_DC_CHANNEL_CONNECT, subscribeRedisDiagnosticChannels, } from './redis/redis-dc-subscriber';
|
|
7
9
|
export { IORedisCommandData, RedisBatchData, RedisCommandData, RedisConnectData, RedisDiagnosticChannelResponseHook, RedisTracingChannelFactory, } from './redis/redis-dc-subscriber';
|
|
10
|
+
export { defaultDbStatementSerializer } from './redis/redis-statement-serializer';
|
|
8
11
|
export { bindTracingChannelToSpan } from './tracing-channel';
|
|
9
12
|
export { SentryTracingChannel, TracingChannelLifeCycleOptions, TracingChannelBindingHandle, TracingChannelPayloadWithSpan, } from './tracing-channel';
|
|
10
13
|
export { vercelAiIntegration } from './vercel-ai';
|
|
14
|
+
export { fastifyIntegration, handleFastifyError, instrumentFastify, } from './integrations/tracing-channel/fastify';
|
|
11
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { AnthropicAiOptions } from '@sentry/core';
|
|
2
|
+
/**
|
|
3
|
+
* EXPERIMENTAL — orchestrion-driven Anthropic integration. Subscribes to the `orchestrion:@anthropic-ai/sdk:*`
|
|
4
|
+
* diagnostics_channels injected into the SDK's chat (`messages`/`completions`/beta `messages`), `models`, and
|
|
5
|
+
* `messages.stream()` methods, so it requires the orchestrion runtime hook or bundler plugin.
|
|
6
|
+
*/
|
|
7
|
+
export declare const anthropicChannelIntegration: (options?: AnthropicAiOptions | undefined) => import("@sentry/core").Integration & {
|
|
8
|
+
name: "Anthropic_AI";
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=anthropic.d.ts.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { FastifyReply, FastifyRequest } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Subscribe to the Fastify v5 error diagnostics channel.
|
|
4
|
+
*/
|
|
5
|
+
export declare function subscribeToFastifyErrorChannel(): void;
|
|
6
|
+
/**
|
|
7
|
+
* Handle a Fastify error, and possibly send it to Sentry.
|
|
8
|
+
*/
|
|
9
|
+
export declare function handleFastifyError(this: {
|
|
10
|
+
diagnosticsChannelExists?: boolean;
|
|
11
|
+
}, error: Error, request: FastifyRequest, reply: FastifyReply, handlerOrigin: 'diagnostics-channel' | 'onError-hook'): void;
|
|
12
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { FastifyReply, FastifyRequest } from './types';
|
|
2
|
+
import { handleFastifyError as _handleFastifyError } from './errors';
|
|
3
|
+
/**
|
|
4
|
+
* Options for the Fastify integration.
|
|
5
|
+
*
|
|
6
|
+
* `shouldHandleError` - Callback method deciding whether error should be captured and sent to Sentry
|
|
7
|
+
* This is used on Fastify v5 where Sentry handles errors in the diagnostics channel.
|
|
8
|
+
* Fastify v3 and v4 use `setupFastifyErrorHandler` instead.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
*
|
|
12
|
+
* ```javascript
|
|
13
|
+
* Sentry.init({
|
|
14
|
+
* integrations: [
|
|
15
|
+
* Sentry.fastifyIntegration({
|
|
16
|
+
* shouldHandleError(_error, _request, reply) {
|
|
17
|
+
* return reply.statusCode >= 500;
|
|
18
|
+
* },
|
|
19
|
+
* });
|
|
20
|
+
* },
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
interface FastifyIntegrationOptions {
|
|
26
|
+
/**
|
|
27
|
+
* Callback method deciding whether error should be captured and sent to Sentry
|
|
28
|
+
* This is used on Fastify v5 where Sentry handles errors in the diagnostics channel.
|
|
29
|
+
* Fastify v3 and v4 use `setupFastifyErrorHandler` instead.
|
|
30
|
+
*
|
|
31
|
+
* @param error Captured Fastify error
|
|
32
|
+
* @param request Fastify request (or any object containing at least method, routeOptions.url, and routerPath)
|
|
33
|
+
* @param reply Fastify reply (or any object containing at least statusCode)
|
|
34
|
+
*/
|
|
35
|
+
shouldHandleError: (error: Error, request: FastifyRequest, reply: FastifyReply) => boolean;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Adds Sentry tracing instrumentation for [Fastify](https://fastify.dev/).
|
|
39
|
+
* This integration supports Fastify v5 only.
|
|
40
|
+
*
|
|
41
|
+
* For more information, see the [fastify documentation](https://docs.sentry.io/platforms/javascript/guides/fastify/).
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```javascript
|
|
45
|
+
* const Sentry = require('@sentry/node');
|
|
46
|
+
*
|
|
47
|
+
* Sentry.init({
|
|
48
|
+
* integrations: [Sentry.fastifyIntegration()],
|
|
49
|
+
* })
|
|
50
|
+
* ```
|
|
51
|
+
*/
|
|
52
|
+
export declare const fastifyIntegration: (options?: Partial<FastifyIntegrationOptions> | undefined) => import("@sentry/core").Integration & {
|
|
53
|
+
name: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated This export is deprecated and will not longer be exposed in the next major version.
|
|
57
|
+
*/
|
|
58
|
+
export declare const instrumentFastify: (() => void) & {
|
|
59
|
+
id: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* @deprecated This export is deprecated and will not longer be exposed in the next major version.
|
|
63
|
+
*/
|
|
64
|
+
export declare const handleFastifyError: typeof _handleFastifyError;
|
|
65
|
+
export {};
|
|
66
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Set up the Fastify (>= 3.21.0 < 6) instrumentation by subscribing to the `fastify.initialization`
|
|
3
|
+
* diagnostics channel and registering the span-creating plugin on every Fastify instance.
|
|
4
|
+
*
|
|
5
|
+
* Idempotent and exposes an `id` so it can participate in the OpenTelemetry preload list.
|
|
6
|
+
*/
|
|
7
|
+
export declare const instrumentFastify: (() => void) & {
|
|
8
|
+
id: string;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=instrumentation.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Integration } from '@sentry/core';
|
|
2
|
+
type HandlerOriginal = ((request: FastifyRequest, reply: FastifyReply, done: HookHandlerDoneFunction) => Promise<void>) | ((request: FastifyRequest, reply: FastifyReply, done: HookHandlerDoneFunction) => void);
|
|
3
|
+
type FastifyError = any;
|
|
4
|
+
type HookHandlerDoneFunction = <TError extends Error = FastifyError>(err?: TError) => void;
|
|
5
|
+
export interface FastifyInstance {
|
|
6
|
+
version: string;
|
|
7
|
+
register: (plugin: any) => FastifyInstance;
|
|
8
|
+
decorate: (key: string | symbol, value: unknown) => void;
|
|
9
|
+
decorateRequest: (key: string | symbol, value: unknown) => void;
|
|
10
|
+
setNotFoundHandler: (hooks: any, handler?: any) => void;
|
|
11
|
+
after: (listener?: (err: Error) => void) => FastifyInstance;
|
|
12
|
+
addHook(hook: string, handler: HandlerOriginal): FastifyInstance;
|
|
13
|
+
addHook(hook: 'onError', handler: (request: FastifyRequest, reply: FastifyReply, error: Error) => void): FastifyInstance;
|
|
14
|
+
addHook(hook: 'onRequest', handler: (request: FastifyRequest, reply: FastifyReply) => void): FastifyInstance;
|
|
15
|
+
}
|
|
16
|
+
export interface FastifyReply {
|
|
17
|
+
send: () => FastifyReply;
|
|
18
|
+
statusCode: number;
|
|
19
|
+
}
|
|
20
|
+
export interface FastifyRequest {
|
|
21
|
+
method?: string;
|
|
22
|
+
routeOptions?: {
|
|
23
|
+
url?: string;
|
|
24
|
+
};
|
|
25
|
+
routerPath?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface FastifyIntegration extends Integration {
|
|
28
|
+
getShouldHandleError: () => (error: Error, request: FastifyRequest, reply: FastifyReply) => boolean;
|
|
29
|
+
setShouldHandleError: (shouldHandleError: (error: Error, request: FastifyRequest, reply: FastifyReply) => boolean) => void;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
32
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FastifyReply, FastifyRequest } from './types';
|
|
2
|
+
export declare const INTEGRATION_NAME = "Fastify";
|
|
3
|
+
/**
|
|
4
|
+
* Default function to determine if an error should be sent to Sentry
|
|
5
|
+
*
|
|
6
|
+
* 3xx and 4xx errors are not sent by default.
|
|
7
|
+
*/
|
|
8
|
+
export declare function defaultShouldHandleError(_error: Error, _request: FastifyRequest, reply: FastifyReply): boolean;
|
|
9
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
declare const LIFECYCLE_EXT_POINTS: readonly [
|
|
2
|
+
"onPreAuth",
|
|
3
|
+
"onCredentials",
|
|
4
|
+
"onPostAuth",
|
|
5
|
+
"onPreHandler",
|
|
6
|
+
"onPostHandler",
|
|
7
|
+
"onPreResponse",
|
|
8
|
+
"onRequest"
|
|
9
|
+
];
|
|
10
|
+
export type ServerRequestExtType = (typeof LIFECYCLE_EXT_POINTS)[number];
|
|
11
|
+
export type LifecycleMethod = (request: unknown, h: unknown, err?: Error) => unknown;
|
|
12
|
+
export interface ServerRouteOptions {
|
|
13
|
+
handler?: LifecycleMethod | unknown;
|
|
14
|
+
[key: string]: unknown;
|
|
15
|
+
}
|
|
16
|
+
export interface ServerRoute {
|
|
17
|
+
path: string;
|
|
18
|
+
method: string;
|
|
19
|
+
handler?: LifecycleMethod | unknown;
|
|
20
|
+
options?: ((server: unknown) => ServerRouteOptions) | ServerRouteOptions;
|
|
21
|
+
[key: string]: unknown;
|
|
22
|
+
}
|
|
23
|
+
export interface ServerExtEventsObject {
|
|
24
|
+
type: string;
|
|
25
|
+
[key: string]: unknown;
|
|
26
|
+
}
|
|
27
|
+
export interface ServerExtEventsRequestObject {
|
|
28
|
+
type: ServerRequestExtType;
|
|
29
|
+
method: LifecycleMethod;
|
|
30
|
+
[key: string]: unknown;
|
|
31
|
+
}
|
|
32
|
+
export interface ServerExtOptions {
|
|
33
|
+
[key: string]: unknown;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* This symbol is used to mark a Hapi route handler or server extension handler as
|
|
37
|
+
* already patched, since it's possible to use these handlers multiple times
|
|
38
|
+
* i.e. when allowing multiple versions of one plugin, or when registering a plugin
|
|
39
|
+
* multiple times on different servers.
|
|
40
|
+
*/
|
|
41
|
+
export declare const handlerPatched: unique symbol;
|
|
42
|
+
export type PatchableServerRoute = ServerRoute & {
|
|
43
|
+
[handlerPatched]?: boolean;
|
|
44
|
+
};
|
|
45
|
+
export type PatchableExtMethod = LifecycleMethod & {
|
|
46
|
+
[handlerPatched]?: boolean;
|
|
47
|
+
};
|
|
48
|
+
export type ServerExtDirectInput = [
|
|
49
|
+
ServerRequestExtType,
|
|
50
|
+
LifecycleMethod,
|
|
51
|
+
(ServerExtOptions | undefined)?
|
|
52
|
+
];
|
|
53
|
+
export declare const HapiLayerType: {
|
|
54
|
+
readonly ROUTER: "router";
|
|
55
|
+
readonly PLUGIN: "plugin";
|
|
56
|
+
readonly EXT: "server.ext";
|
|
57
|
+
};
|
|
58
|
+
export declare const HapiLifecycleMethodNames: Set<string>;
|
|
59
|
+
export declare enum AttributeNames {
|
|
60
|
+
HAPI_TYPE = "hapi.type",
|
|
61
|
+
PLUGIN_NAME = "hapi.plugin.name",
|
|
62
|
+
EXT_TYPE = "server.ext.type"
|
|
63
|
+
}
|
|
64
|
+
export {};
|
|
65
|
+
//# sourceMappingURL=hapi-types.d.ts.map
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ServerRequestExtType, ServerRoute } from './hapi-types';
|
|
2
|
+
type SpanAttributes = Record<string, string | undefined>;
|
|
3
|
+
interface SpanMetadata {
|
|
4
|
+
attributes: SpanAttributes;
|
|
5
|
+
name: string;
|
|
6
|
+
}
|
|
7
|
+
/** Build the span name and attributes for a Hapi route. */
|
|
8
|
+
export declare const getRouteMetadata: (route: ServerRoute, pluginName?: string) => SpanMetadata;
|
|
9
|
+
/** Build the span name and attributes for a Hapi server extension. */
|
|
10
|
+
export declare const getExtMetadata: (extPoint: ServerRequestExtType, pluginName?: string, methodName?: string) => SpanMetadata;
|
|
11
|
+
/**
|
|
12
|
+
* Wrap the route handler(s) in the live `server.route` arguments array, mutating
|
|
13
|
+
* `args[0]` in place. `args[0]` is either a single route options object or an
|
|
14
|
+
* array of them. Idempotent via the `handlerPatched` marker.
|
|
15
|
+
*/
|
|
16
|
+
export declare function wrapRouteArguments(args: unknown[], pluginName?: string): void;
|
|
17
|
+
/**
|
|
18
|
+
* Wrap the extension method(s) in the live `server.ext` arguments array,
|
|
19
|
+
* mutating `args` in place. Handles the three accepted input shapes:
|
|
20
|
+
* `(eventsArray)`, `(lifecycleEventObject)`, and `(extTypeString, method, options)`.
|
|
21
|
+
* Idempotent via the `handlerPatched` marker.
|
|
22
|
+
*/
|
|
23
|
+
export declare function wrapExtArguments(args: unknown[], pluginName?: string): void;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=hapi-utils.d.ts.map
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EXPERIMENTAL — orchestrion-driven hapi integration. Subscribes to the
|
|
3
|
+
* `orchestrion:@hapi/hapi:route` / `:ext` channels injected into `@hapi/hapi`'s
|
|
4
|
+
* `lib/server.js`. Requires the orchestrion runtime hook or bundler plugin.
|
|
5
|
+
*/
|
|
6
|
+
export declare const hapiChannelIntegration: () => import("@sentry/core").Integration & {
|
|
7
|
+
name: "Hapi";
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=hapi.d.ts.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Span } from '@sentry/core';
|
|
2
|
+
/** Mirrors `@opentelemetry/instrumentation-ioredis`' response hook. Not called for failed commands. */
|
|
3
|
+
export type IORedisResponseHook = (span: Span, command: string, args: Array<string | Buffer>, result: unknown) => void;
|
|
4
|
+
export interface IORedisChannelIntegrationOptions {
|
|
5
|
+
responseHook?: IORedisResponseHook;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* EXPERIMENTAL — orchestrion-driven ioredis integration. Subscribes to
|
|
9
|
+
* `orchestrion:ioredis:command` / `:connect` (injected into ioredis' `<5.11.0`
|
|
10
|
+
* `sendCommand`/`connect`) and creates db spans matching
|
|
11
|
+
* `@opentelemetry/instrumentation-ioredis`. Requires the orchestrion runtime hook
|
|
12
|
+
* or bundler plugin.
|
|
13
|
+
*/
|
|
14
|
+
export declare const ioredisChannelIntegration: (options?: IORedisChannelIntegrationOptions | undefined) => import("@sentry/core").Integration & {
|
|
15
|
+
name: "IORedis";
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=ioredis.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EXPERIMENTAL — orchestrion-driven lru-memoizer integration. Subscribes to
|
|
3
|
+
* `orchestrion:lru-memoizer:load` (injected into `lru-memoizer/lib/async.js`'s
|
|
4
|
+
* `memoizedFunction`). Creates no spans; only re-runs the memoized callback with the
|
|
5
|
+
* caller's scope. Requires the orchestrion runtime hook or bundler plugin.
|
|
6
|
+
*/
|
|
7
|
+
export declare const lruMemoizerChannelIntegration: () => import("@sentry/core").Integration & {
|
|
8
|
+
name: "LruMemoizer";
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=lru-memoizer.d.ts.map
|
|
@@ -6,5 +6,7 @@
|
|
|
6
6
|
* `Connection.prototype.query`. Requires the orchestrion runtime hook or
|
|
7
7
|
* bundler plugin to be active — wire that up via `_experimentalSetupOrchestrion`.
|
|
8
8
|
*/
|
|
9
|
-
export declare const mysqlChannelIntegration: () => import("@sentry/core").Integration
|
|
9
|
+
export declare const mysqlChannelIntegration: () => import("@sentry/core").Integration & {
|
|
10
|
+
name: "Mysql";
|
|
11
|
+
};
|
|
10
12
|
//# sourceMappingURL=mysql.d.ts.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { OpenAiOptions } from '@sentry/core';
|
|
2
|
+
/**
|
|
3
|
+
* EXPERIMENTAL — orchestrion-driven OpenAI integration. Subscribes to the `orchestrion:openai:*`
|
|
4
|
+
* diagnostics_channels injected into `openai`'s `create` methods (chat completions, responses, embeddings,
|
|
5
|
+
* conversations), so it requires the orchestrion runtime hook or bundler plugin.
|
|
6
|
+
*/
|
|
7
|
+
export declare const openaiChannelIntegration: (options?: OpenAiOptions | undefined) => import("@sentry/core").Integration & {
|
|
8
|
+
name: "OpenAI";
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=openai.d.ts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* EXPERIMENTAL: orchestrion-driven `pg` (node-postgres) integration.
|
|
3
|
+
*
|
|
4
|
+
* Subscribes to the `orchestrion:pg:query`/`:connect` and
|
|
5
|
+
* `orchestrion:pg-pool:connect` diagnostics_channels that the orchestrion code
|
|
6
|
+
* transform injects into `pg`'s `Client.prototype.query`/`connect`
|
|
7
|
+
* and `pg-pool`'s `Pool.prototype.connect`. Requires the orchestrion runtime
|
|
8
|
+
* hook or bundler plugin to be active.
|
|
9
|
+
*/
|
|
10
|
+
export declare const postgresChannelIntegration: (options?: {
|
|
11
|
+
ignoreConnectSpans?: boolean;
|
|
12
|
+
} | undefined) => import("@sentry/core").Integration & {
|
|
13
|
+
name: "Postgres";
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=postgres.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-instrument the `ai` SDK. Supported are:
|
|
3
|
+
* - v7 via native `ai:telemetry` tracing channel
|
|
4
|
+
* - v6 via orchestrion `orchestrion:ai:*` channels
|
|
5
|
+
*/
|
|
6
|
+
export declare const vercelAiChannelIntegration: (options?: {
|
|
7
|
+
recordInputs?: boolean;
|
|
8
|
+
recordOutputs?: boolean;
|
|
9
|
+
enableTruncation?: boolean;
|
|
10
|
+
} | undefined) => import("@sentry/core").Integration & {
|
|
11
|
+
name: "VercelAI";
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=vercel-ai.d.ts.map
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Auto-instrument the [mongoose](https://www.npmjs.com/package/mongoose) library via its native
|
|
3
|
+
* `node:diagnostics_channel` tracing channels (mongoose >= 9.7).
|
|
4
|
+
*
|
|
5
|
+
* On older mongoose versions the channels are never published to, so this integration is inert and
|
|
6
|
+
* the IITM-based patcher (gated to `< 9.7.0`) handles instrumentation instead.
|
|
7
|
+
*/
|
|
8
|
+
export declare const mongooseIntegration: () => import("@sentry/core").Integration & {
|
|
9
|
+
name: string;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|