@sentry/node 10.24.0 → 10.26.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 +9 -7
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/launchDarkly.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/openFeature.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/statsig.js.map +1 -1
- package/build/cjs/integrations/featureFlagShims/unleash.js.map +1 -1
- package/build/cjs/integrations/fs.js.map +1 -1
- package/build/cjs/integrations/http.js.map +1 -1
- package/build/cjs/integrations/node-fetch.js.map +1 -1
- package/build/cjs/integrations/tracing/amqplib.js.map +1 -1
- package/build/cjs/integrations/tracing/anthropic-ai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js +5 -0
- package/build/cjs/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/connect.js.map +1 -1
- package/build/cjs/integrations/tracing/dataloader.js.map +1 -1
- package/build/cjs/integrations/tracing/express.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/fastify-otel/index.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/index.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/fastify/v3/utils.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/firebase.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
- package/build/cjs/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
- package/build/cjs/integrations/tracing/genericPool.js.map +1 -1
- package/build/cjs/integrations/tracing/google-genai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/google-genai/instrumentation.js +5 -2
- package/build/cjs/integrations/tracing/google-genai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/graphql.js.map +1 -1
- package/build/cjs/integrations/tracing/hapi/index.js.map +1 -1
- package/build/cjs/integrations/tracing/hono/index.js.map +1 -1
- package/build/cjs/integrations/tracing/hono/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/index.js +20 -15
- package/build/cjs/integrations/tracing/index.js.map +1 -1
- package/build/cjs/integrations/tracing/kafka.js.map +1 -1
- package/build/cjs/integrations/tracing/knex.js.map +1 -1
- package/build/cjs/integrations/tracing/koa.js.map +1 -1
- package/build/cjs/integrations/tracing/langchain/index.js +4 -0
- package/build/cjs/integrations/tracing/langchain/index.js.map +1 -1
- package/build/cjs/integrations/tracing/langchain/instrumentation.js +8 -2
- package/build/cjs/integrations/tracing/langchain/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/langgraph/index.js +93 -0
- package/build/cjs/integrations/tracing/langgraph/index.js.map +1 -0
- package/build/cjs/integrations/tracing/langgraph/instrumentation.js +78 -0
- package/build/cjs/integrations/tracing/langgraph/instrumentation.js.map +1 -0
- package/build/cjs/integrations/tracing/lrumemoizer.js.map +1 -1
- package/build/cjs/integrations/tracing/mongo.js.map +1 -1
- package/build/cjs/integrations/tracing/mongoose.js.map +1 -1
- package/build/cjs/integrations/tracing/mysql.js.map +1 -1
- package/build/cjs/integrations/tracing/mysql2.js.map +1 -1
- package/build/cjs/integrations/tracing/openai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/openai/instrumentation.js +6 -1
- package/build/cjs/integrations/tracing/openai/instrumentation.js.map +1 -1
- package/build/cjs/integrations/tracing/postgres.js.map +1 -1
- package/build/cjs/integrations/tracing/postgresjs.js.map +1 -1
- package/build/cjs/integrations/tracing/prisma.js.map +1 -1
- package/build/cjs/integrations/tracing/redis.js +18 -7
- package/build/cjs/integrations/tracing/redis.js.map +1 -1
- package/build/cjs/integrations/tracing/tedious.js.map +1 -1
- package/build/cjs/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/cjs/integrations/tracing/vercelai/instrumentation.js.map +1 -1
- package/build/cjs/sdk/index.js.map +1 -1
- package/build/cjs/sdk/initOtel.js.map +1 -1
- package/build/cjs/utils/redisCache.js.map +1 -1
- package/build/esm/index.js +1 -0
- package/build/esm/index.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/launchDarkly.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/openFeature.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/statsig.js.map +1 -1
- package/build/esm/integrations/featureFlagShims/unleash.js.map +1 -1
- package/build/esm/integrations/fs.js.map +1 -1
- package/build/esm/integrations/http.js.map +1 -1
- package/build/esm/integrations/node-fetch.js.map +1 -1
- package/build/esm/integrations/tracing/amqplib.js.map +1 -1
- package/build/esm/integrations/tracing/anthropic-ai/index.js.map +1 -1
- package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js +6 -1
- package/build/esm/integrations/tracing/anthropic-ai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/connect.js.map +1 -1
- package/build/esm/integrations/tracing/dataloader.js.map +1 -1
- package/build/esm/integrations/tracing/express.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/fastify-otel/index.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/index.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/v3/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/fastify/v3/utils.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/firebase.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/firebaseInstrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/patches/firestore.js.map +1 -1
- package/build/esm/integrations/tracing/firebase/otel/patches/functions.js.map +1 -1
- package/build/esm/integrations/tracing/genericPool.js.map +1 -1
- package/build/esm/integrations/tracing/google-genai/index.js.map +1 -1
- package/build/esm/integrations/tracing/google-genai/instrumentation.js +6 -3
- package/build/esm/integrations/tracing/google-genai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/graphql.js.map +1 -1
- package/build/esm/integrations/tracing/hapi/index.js.map +1 -1
- package/build/esm/integrations/tracing/hono/index.js.map +1 -1
- package/build/esm/integrations/tracing/hono/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/index.js +9 -4
- package/build/esm/integrations/tracing/index.js.map +1 -1
- package/build/esm/integrations/tracing/kafka.js.map +1 -1
- package/build/esm/integrations/tracing/knex.js.map +1 -1
- package/build/esm/integrations/tracing/koa.js.map +1 -1
- package/build/esm/integrations/tracing/langchain/index.js +4 -0
- package/build/esm/integrations/tracing/langchain/index.js.map +1 -1
- package/build/esm/integrations/tracing/langchain/instrumentation.js +9 -3
- package/build/esm/integrations/tracing/langchain/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/langgraph/index.js +90 -0
- package/build/esm/integrations/tracing/langgraph/index.js.map +1 -0
- package/build/esm/integrations/tracing/langgraph/instrumentation.js +76 -0
- package/build/esm/integrations/tracing/langgraph/instrumentation.js.map +1 -0
- package/build/esm/integrations/tracing/lrumemoizer.js.map +1 -1
- package/build/esm/integrations/tracing/mongo.js.map +1 -1
- package/build/esm/integrations/tracing/mongoose.js.map +1 -1
- package/build/esm/integrations/tracing/mysql.js.map +1 -1
- package/build/esm/integrations/tracing/mysql2.js.map +1 -1
- package/build/esm/integrations/tracing/openai/index.js.map +1 -1
- package/build/esm/integrations/tracing/openai/instrumentation.js +7 -2
- package/build/esm/integrations/tracing/openai/instrumentation.js.map +1 -1
- package/build/esm/integrations/tracing/postgres.js.map +1 -1
- package/build/esm/integrations/tracing/postgresjs.js.map +1 -1
- package/build/esm/integrations/tracing/prisma.js.map +1 -1
- package/build/esm/integrations/tracing/redis.js +13 -3
- package/build/esm/integrations/tracing/redis.js.map +1 -1
- package/build/esm/integrations/tracing/tedious.js.map +1 -1
- package/build/esm/integrations/tracing/vercelai/index.js.map +1 -1
- package/build/esm/integrations/tracing/vercelai/instrumentation.js.map +1 -1
- package/build/esm/package.json +1 -1
- package/build/esm/sdk/index.js.map +1 -1
- package/build/esm/sdk/initOtel.js.map +1 -1
- package/build/esm/utils/redisCache.js.map +1 -1
- package/build/types/index.d.ts +1 -0
- package/build/types/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/anthropic-ai/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/google-genai/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/langchain/index.d.ts +4 -0
- package/build/types/integrations/tracing/langchain/index.d.ts.map +1 -1
- package/build/types/integrations/tracing/langchain/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/langgraph/index.d.ts +74 -0
- package/build/types/integrations/tracing/langgraph/index.d.ts.map +1 -0
- package/build/types/integrations/tracing/langgraph/instrumentation.d.ts +19 -0
- package/build/types/integrations/tracing/langgraph/instrumentation.d.ts.map +1 -0
- package/build/types/integrations/tracing/openai/instrumentation.d.ts.map +1 -1
- package/build/types/integrations/tracing/redis.d.ts +16 -0
- package/build/types/integrations/tracing/redis.d.ts.map +1 -1
- package/build/types-ts3.8/index.d.ts +1 -0
- package/build/types-ts3.8/integrations/tracing/langchain/index.d.ts +4 -0
- package/build/types-ts3.8/integrations/tracing/langgraph/index.d.ts +74 -0
- package/build/types-ts3.8/integrations/tracing/langgraph/instrumentation.d.ts +19 -0
- package/build/types-ts3.8/integrations/tracing/redis.d.ts +16 -0
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/anthropic-ai/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,+BAA+B,EACpC,mBAAmB,EAEpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAqB,kBAAkB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/anthropic-ai/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,+BAA+B,EACpC,mBAAmB,EAEpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAqB,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAW1E,KAAK,iCAAiC,GAAG,qBAAqB,GAAG,kBAAkB,CAAC;AAUpF;;GAEG;AACH,qBAAa,gCAAiC,SAAQ,mBAAmB,CAAC,iCAAiC,CAAC;gBACvF,MAAM,GAAE,iCAAsC;IAIjE;;OAEG;IACI,IAAI,IAAI,+BAA+B;IAS9C;;OAEG;IACH,OAAO,CAAC,MAAM;CAqEf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/google-genai/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EACL,KAAK,+BAA+B,EACpC,mBAAmB,EAGpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAqB,kBAAkB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/google-genai/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EACL,KAAK,+BAA+B,EACpC,mBAAmB,EAGpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAqB,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAoB1E,KAAK,iCAAiC,GAAG,kBAAkB,GAAG,qBAAqB,CAAC;AAEpF;;GAEG;AACH,qBAAa,gCAAiC,SAAQ,mBAAmB,CAAC,iCAAiC,CAAC;gBACvF,MAAM,GAAE,iCAAsC;IAIjE;;OAEG;IACI,IAAI,IAAI,+BAA+B;IAsB9C;;OAEG;IACH,OAAO,CAAC,MAAM;CA8Cf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AA8BhD;;GAEG;AACH,wBAAgB,8BAA8B,IAAI,WAAW,EAAE,CAgC9D;AAED;;GAEG;AAEH,wBAAgB,wCAAwC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC,EAAE,CAiCzG"}
|
|
@@ -10,6 +10,10 @@ export declare const instrumentLangChain: ((options?: LangChainOptions | undefin
|
|
|
10
10
|
* When configured, this integration automatically instruments LangChain runnable instances
|
|
11
11
|
* to capture telemetry data by injecting Sentry callback handlers into all LangChain calls.
|
|
12
12
|
*
|
|
13
|
+
* **Important:** This integration automatically skips wrapping the OpenAI, Anthropic, and Google GenAI
|
|
14
|
+
* providers to prevent duplicate spans when using LangChain with these AI providers.
|
|
15
|
+
* LangChain handles the instrumentation for all underlying AI providers.
|
|
16
|
+
*
|
|
13
17
|
* @example
|
|
14
18
|
* ```javascript
|
|
15
19
|
* import * as Sentry from '@sentry/node';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/langchain/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKpE,eAAO,MAAM,mBAAmB;;CAG/B,CAAC;AAWF
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/langchain/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKpE,eAAO,MAAM,mBAAmB;;CAG/B,CAAC;AAWF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0FG;AACH,eAAO,MAAM,oBAAoB,gFAA2C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/langchain/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,+BAA+B,EACpC,mBAAmB,EAGpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/langchain/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,+BAA+B,EACpC,mBAAmB,EAGpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAarD,KAAK,+BAA+B,GAAG,qBAAqB,GAAG,gBAAgB,CAAC;AA0EhF;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,mBAAmB,CAAC,+BAA+B,CAAC;gBACnF,MAAM,GAAE,+BAAoC;IAI/D;;;;;;OAMG;IACI,IAAI,IAAI,+BAA+B,GAAG,+BAA+B,EAAE;IAuClF;;;OAGG;IACH,OAAO,CAAC,MAAM;IA8Bd;;;OAGG;IACH,OAAO,CAAC,qBAAqB;CAyC9B"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { LangGraphOptions } from '@sentry/core';
|
|
2
|
+
export declare const instrumentLangGraph: ((options?: LangGraphOptions | undefined) => import("@opentelemetry/instrumentation").Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig>) & {
|
|
3
|
+
id: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Adds Sentry tracing instrumentation for LangGraph.
|
|
7
|
+
*
|
|
8
|
+
* This integration is enabled by default.
|
|
9
|
+
*
|
|
10
|
+
* When configured, this integration automatically instruments LangGraph StateGraph and compiled graph instances
|
|
11
|
+
* to capture telemetry data following OpenTelemetry Semantic Conventions for Generative AI.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```javascript
|
|
15
|
+
* import * as Sentry from '@sentry/node';
|
|
16
|
+
*
|
|
17
|
+
* Sentry.init({
|
|
18
|
+
* integrations: [Sentry.langGraphIntegration()],
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* ## Options
|
|
23
|
+
*
|
|
24
|
+
* - `recordInputs`: Whether to record input messages (default: respects `sendDefaultPii` client option)
|
|
25
|
+
* - `recordOutputs`: Whether to record response text (default: respects `sendDefaultPii` client option)
|
|
26
|
+
*
|
|
27
|
+
* ### Default Behavior
|
|
28
|
+
*
|
|
29
|
+
* By default, the integration will:
|
|
30
|
+
* - Record inputs and outputs ONLY if `sendDefaultPii` is set to `true` in your Sentry client options
|
|
31
|
+
* - Otherwise, inputs and outputs are NOT recorded unless explicitly enabled
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```javascript
|
|
35
|
+
* // Record inputs and outputs when sendDefaultPii is false
|
|
36
|
+
* Sentry.init({
|
|
37
|
+
* integrations: [
|
|
38
|
+
* Sentry.langGraphIntegration({
|
|
39
|
+
* recordInputs: true,
|
|
40
|
+
* recordOutputs: true
|
|
41
|
+
* })
|
|
42
|
+
* ],
|
|
43
|
+
* });
|
|
44
|
+
*
|
|
45
|
+
* // Never record inputs/outputs regardless of sendDefaultPii
|
|
46
|
+
* Sentry.init({
|
|
47
|
+
* sendDefaultPii: true,
|
|
48
|
+
* integrations: [
|
|
49
|
+
* Sentry.langGraphIntegration({
|
|
50
|
+
* recordInputs: false,
|
|
51
|
+
* recordOutputs: false
|
|
52
|
+
* })
|
|
53
|
+
* ],
|
|
54
|
+
* });
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* ## Captured Operations
|
|
58
|
+
*
|
|
59
|
+
* The integration captures the following LangGraph operations:
|
|
60
|
+
* - **Agent Creation** (`StateGraph.compile()`) - Creates a `gen_ai.create_agent` span
|
|
61
|
+
* - **Agent Invocation** (`CompiledGraph.invoke()`) - Creates a `gen_ai.invoke_agent` span
|
|
62
|
+
*
|
|
63
|
+
* ## Captured Data
|
|
64
|
+
*
|
|
65
|
+
* When `recordInputs` and `recordOutputs` are enabled, the integration captures:
|
|
66
|
+
* - Input messages from the graph state
|
|
67
|
+
* - Output messages and LLM responses
|
|
68
|
+
* - Tool calls made during agent execution
|
|
69
|
+
* - Agent and graph names
|
|
70
|
+
* - Available tools configured in the graph
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
export declare const langGraphIntegration: (options?: LangGraphOptions | undefined) => import("@sentry/core").Integration;
|
|
74
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/langgraph/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKpE,eAAO,MAAM,mBAAmB;;CAG/B,CAAC;AAWF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmEG;AACH,eAAO,MAAM,oBAAoB,gFAA2C,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type InstrumentationConfig, type InstrumentationModuleDefinition, InstrumentationBase } from '@opentelemetry/instrumentation';
|
|
2
|
+
import type { LangGraphOptions } from '@sentry/core';
|
|
3
|
+
type LangGraphInstrumentationOptions = InstrumentationConfig & LangGraphOptions;
|
|
4
|
+
/**
|
|
5
|
+
* Sentry LangGraph instrumentation using OpenTelemetry.
|
|
6
|
+
*/
|
|
7
|
+
export declare class SentryLangGraphInstrumentation extends InstrumentationBase<LangGraphInstrumentationOptions> {
|
|
8
|
+
constructor(config?: LangGraphInstrumentationOptions);
|
|
9
|
+
/**
|
|
10
|
+
* Initializes the instrumentation by defining the modules to be patched.
|
|
11
|
+
*/
|
|
12
|
+
init(): InstrumentationModuleDefinition;
|
|
13
|
+
/**
|
|
14
|
+
* Core patch logic applying instrumentation to the LangGraph module.
|
|
15
|
+
*/
|
|
16
|
+
private _patch;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=instrumentation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/langgraph/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,+BAA+B,EACpC,mBAAmB,EAGpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAiB,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKpE,KAAK,+BAA+B,GAAG,qBAAqB,GAAG,gBAAgB,CAAC;AAUhF;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,mBAAmB,CAAC,+BAA+B,CAAC;gBACnF,MAAM,GAAE,+BAAoC;IAI/D;;OAEG;IACI,IAAI,IAAI,+BAA+B;IAwB9C;;OAEG;IACH,OAAO,CAAC,MAAM;CA6Bf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/openai/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,+BAA+B,EACpC,mBAAmB,EAEpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,WAAW,EAAgB,aAAa,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"instrumentation.d.ts","sourceRoot":"","sources":["../../../../../src/integrations/tracing/openai/instrumentation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,qBAAqB,EAC1B,KAAK,+BAA+B,EACpC,mBAAmB,EAEpB,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,WAAW,EAAgB,aAAa,EAAE,MAAM,cAAc,CAAC;AAW7E,MAAM,WAAW,iBAAkB,SAAQ,WAAW;IACpD,OAAO,EAAE,aAAa,CAAC;CACxB;AAsBD;;GAEG;AACH,qBAAa,2BAA4B,SAAQ,mBAAmB,CAAC,qBAAqB,CAAC;gBACtE,MAAM,GAAE,qBAA0B;IAIrD;;OAEG;IACI,IAAI,IAAI,+BAA+B;IAK9C;;OAEG;IACH,OAAO,CAAC,MAAM;CAoEf"}
|
|
@@ -1,6 +1,22 @@
|
|
|
1
|
+
import type { RedisResponseCustomAttributeFunction } from '@opentelemetry/instrumentation-ioredis';
|
|
1
2
|
interface RedisOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Define cache prefixes for cache keys that should be captured as a cache span.
|
|
5
|
+
*
|
|
6
|
+
* Setting this to, for example, `['user:']` will capture cache keys that start with `user:`.
|
|
7
|
+
*/
|
|
2
8
|
cachePrefixes?: string[];
|
|
9
|
+
/**
|
|
10
|
+
* Maximum length of the cache key added to the span description. If the key exceeds this length, it will be truncated.
|
|
11
|
+
*
|
|
12
|
+
* Passing `0` will use the full cache key without truncation.
|
|
13
|
+
*
|
|
14
|
+
* By default, the full cache key is used.
|
|
15
|
+
*/
|
|
16
|
+
maxCacheKeyLength?: number;
|
|
3
17
|
}
|
|
18
|
+
export declare let _redisOptions: RedisOptions;
|
|
19
|
+
export declare const cacheResponseHook: RedisResponseCustomAttributeFunction;
|
|
4
20
|
/** To be able to preload all Redis OTel instrumentations with just one ID ("Redis"), all the instrumentations are generated in this one function */
|
|
5
21
|
export declare const instrumentRedis: (() => void) & {
|
|
6
22
|
id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redis.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/redis.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"redis.d.ts","sourceRoot":"","sources":["../../../../src/integrations/tracing/redis.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAC;AAwBnG,UAAU,YAAY;IACpB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAKD,eAAO,IAAI,aAAa,EAAE,YAAiB,CAAC;AAG5C,eAAO,MAAM,iBAAiB,EAAE,oCAkD/B,CAAC;AAcF,qJAAqJ;AACrJ,eAAO,MAAM,eAAe,SACtB,IAAI;;CAQT,CAAC;AAYF;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,gBAAgB,4EAAuC,CAAC"}
|
|
@@ -28,6 +28,7 @@ export { openAIIntegration } from './integrations/tracing/openai';
|
|
|
28
28
|
export { anthropicAIIntegration } from './integrations/tracing/anthropic-ai';
|
|
29
29
|
export { googleGenAIIntegration } from './integrations/tracing/google-genai';
|
|
30
30
|
export { langChainIntegration } from './integrations/tracing/langchain';
|
|
31
|
+
export { langGraphIntegration } from './integrations/tracing/langgraph';
|
|
31
32
|
export { launchDarklyIntegration, buildLaunchDarklyFlagUsedHandler, openFeatureIntegration, OpenFeatureIntegrationHook, statsigIntegration, unleashIntegration, growthbookIntegration, } from './integrations/featureFlagShims';
|
|
32
33
|
export { firebaseIntegration } from './integrations/tracing/firebase';
|
|
33
34
|
export { init, getDefaultIntegrations, getDefaultIntegrationsWithoutPerformance, initWithoutDefaultIntegrations, } from './sdk';
|
|
@@ -10,6 +10,10 @@ export declare const instrumentLangChain: ((options?: LangChainOptions | undefin
|
|
|
10
10
|
* When configured, this integration automatically instruments LangChain runnable instances
|
|
11
11
|
* to capture telemetry data by injecting Sentry callback handlers into all LangChain calls.
|
|
12
12
|
*
|
|
13
|
+
* **Important:** This integration automatically skips wrapping the OpenAI, Anthropic, and Google GenAI
|
|
14
|
+
* providers to prevent duplicate spans when using LangChain with these AI providers.
|
|
15
|
+
* LangChain handles the instrumentation for all underlying AI providers.
|
|
16
|
+
*
|
|
13
17
|
* @example
|
|
14
18
|
* ```javascript
|
|
15
19
|
* import * as Sentry from '@sentry/node';
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { LangGraphOptions } from '@sentry/core';
|
|
2
|
+
export declare const instrumentLangGraph: ((options?: LangGraphOptions | undefined) => import("@opentelemetry/instrumentation").Instrumentation<import("@opentelemetry/instrumentation").InstrumentationConfig>) & {
|
|
3
|
+
id: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Adds Sentry tracing instrumentation for LangGraph.
|
|
7
|
+
*
|
|
8
|
+
* This integration is enabled by default.
|
|
9
|
+
*
|
|
10
|
+
* When configured, this integration automatically instruments LangGraph StateGraph and compiled graph instances
|
|
11
|
+
* to capture telemetry data following OpenTelemetry Semantic Conventions for Generative AI.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```javascript
|
|
15
|
+
* import * as Sentry from '@sentry/node';
|
|
16
|
+
*
|
|
17
|
+
* Sentry.init({
|
|
18
|
+
* integrations: [Sentry.langGraphIntegration()],
|
|
19
|
+
* });
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* ## Options
|
|
23
|
+
*
|
|
24
|
+
* - `recordInputs`: Whether to record input messages (default: respects `sendDefaultPii` client option)
|
|
25
|
+
* - `recordOutputs`: Whether to record response text (default: respects `sendDefaultPii` client option)
|
|
26
|
+
*
|
|
27
|
+
* ### Default Behavior
|
|
28
|
+
*
|
|
29
|
+
* By default, the integration will:
|
|
30
|
+
* - Record inputs and outputs ONLY if `sendDefaultPii` is set to `true` in your Sentry client options
|
|
31
|
+
* - Otherwise, inputs and outputs are NOT recorded unless explicitly enabled
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```javascript
|
|
35
|
+
* // Record inputs and outputs when sendDefaultPii is false
|
|
36
|
+
* Sentry.init({
|
|
37
|
+
* integrations: [
|
|
38
|
+
* Sentry.langGraphIntegration({
|
|
39
|
+
* recordInputs: true,
|
|
40
|
+
* recordOutputs: true
|
|
41
|
+
* })
|
|
42
|
+
* ],
|
|
43
|
+
* });
|
|
44
|
+
*
|
|
45
|
+
* // Never record inputs/outputs regardless of sendDefaultPii
|
|
46
|
+
* Sentry.init({
|
|
47
|
+
* sendDefaultPii: true,
|
|
48
|
+
* integrations: [
|
|
49
|
+
* Sentry.langGraphIntegration({
|
|
50
|
+
* recordInputs: false,
|
|
51
|
+
* recordOutputs: false
|
|
52
|
+
* })
|
|
53
|
+
* ],
|
|
54
|
+
* });
|
|
55
|
+
* ```
|
|
56
|
+
*
|
|
57
|
+
* ## Captured Operations
|
|
58
|
+
*
|
|
59
|
+
* The integration captures the following LangGraph operations:
|
|
60
|
+
* - **Agent Creation** (`StateGraph.compile()`) - Creates a `gen_ai.create_agent` span
|
|
61
|
+
* - **Agent Invocation** (`CompiledGraph.invoke()`) - Creates a `gen_ai.invoke_agent` span
|
|
62
|
+
*
|
|
63
|
+
* ## Captured Data
|
|
64
|
+
*
|
|
65
|
+
* When `recordInputs` and `recordOutputs` are enabled, the integration captures:
|
|
66
|
+
* - Input messages from the graph state
|
|
67
|
+
* - Output messages and LLM responses
|
|
68
|
+
* - Tool calls made during agent execution
|
|
69
|
+
* - Agent and graph names
|
|
70
|
+
* - Available tools configured in the graph
|
|
71
|
+
*
|
|
72
|
+
*/
|
|
73
|
+
export declare const langGraphIntegration: (options?: LangGraphOptions | undefined) => import("@sentry/core").Integration;
|
|
74
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { InstrumentationConfig, InstrumentationModuleDefinition, InstrumentationBase } from '@opentelemetry/instrumentation';
|
|
2
|
+
import { LangGraphOptions } from '@sentry/core';
|
|
3
|
+
type LangGraphInstrumentationOptions = InstrumentationConfig & LangGraphOptions;
|
|
4
|
+
/**
|
|
5
|
+
* Sentry LangGraph instrumentation using OpenTelemetry.
|
|
6
|
+
*/
|
|
7
|
+
export declare class SentryLangGraphInstrumentation extends InstrumentationBase<LangGraphInstrumentationOptions> {
|
|
8
|
+
constructor(config?: LangGraphInstrumentationOptions);
|
|
9
|
+
/**
|
|
10
|
+
* Initializes the instrumentation by defining the modules to be patched.
|
|
11
|
+
*/
|
|
12
|
+
init(): InstrumentationModuleDefinition;
|
|
13
|
+
/**
|
|
14
|
+
* Core patch logic applying instrumentation to the LangGraph module.
|
|
15
|
+
*/
|
|
16
|
+
private _patch;
|
|
17
|
+
}
|
|
18
|
+
export {};
|
|
19
|
+
//# sourceMappingURL=instrumentation.d.ts.map
|
|
@@ -1,6 +1,22 @@
|
|
|
1
|
+
import { RedisResponseCustomAttributeFunction } from '@opentelemetry/instrumentation-ioredis';
|
|
1
2
|
interface RedisOptions {
|
|
3
|
+
/**
|
|
4
|
+
* Define cache prefixes for cache keys that should be captured as a cache span.
|
|
5
|
+
*
|
|
6
|
+
* Setting this to, for example, `['user:']` will capture cache keys that start with `user:`.
|
|
7
|
+
*/
|
|
2
8
|
cachePrefixes?: string[];
|
|
9
|
+
/**
|
|
10
|
+
* Maximum length of the cache key added to the span description. If the key exceeds this length, it will be truncated.
|
|
11
|
+
*
|
|
12
|
+
* Passing `0` will use the full cache key without truncation.
|
|
13
|
+
*
|
|
14
|
+
* By default, the full cache key is used.
|
|
15
|
+
*/
|
|
16
|
+
maxCacheKeyLength?: number;
|
|
3
17
|
}
|
|
18
|
+
export declare let _redisOptions: RedisOptions;
|
|
19
|
+
export declare const cacheResponseHook: RedisResponseCustomAttributeFunction;
|
|
4
20
|
/** To be able to preload all Redis OTel instrumentations with just one ID ("Redis"), all the instrumentations are generated in this one function */
|
|
5
21
|
export declare const instrumentRedis: (() => void) & {
|
|
6
22
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/node",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.26.0",
|
|
4
4
|
"description": "Sentry Node SDK using OpenTelemetry for performance instrumentation",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/node",
|
|
@@ -95,9 +95,9 @@
|
|
|
95
95
|
"@opentelemetry/sdk-trace-base": "^2.1.0",
|
|
96
96
|
"@opentelemetry/semantic-conventions": "^1.37.0",
|
|
97
97
|
"@prisma/instrumentation": "6.15.0",
|
|
98
|
-
"@sentry/core": "10.
|
|
99
|
-
"@sentry/node-core": "10.
|
|
100
|
-
"@sentry/opentelemetry": "10.
|
|
98
|
+
"@sentry/core": "10.26.0",
|
|
99
|
+
"@sentry/node-core": "10.26.0",
|
|
100
|
+
"@sentry/opentelemetry": "10.26.0",
|
|
101
101
|
"import-in-the-middle": "^1.14.2",
|
|
102
102
|
"minimatch": "^9.0.0"
|
|
103
103
|
},
|