From cc544a5c7d634c4d342c5a56a008c6752510e131 Mon Sep 17 00:00:00 2001 From: Ogi <86684834+obostjancic@users.noreply.github.com> Date: Thu, 13 Nov 2025 11:41:42 +0100 Subject: [PATCH 1/3] feat(js-ai-integrations): langgraph docs --- .../configuration/integrations/langgraph.mdx | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 docs/platforms/javascript/common/configuration/integrations/langgraph.mdx diff --git a/docs/platforms/javascript/common/configuration/integrations/langgraph.mdx b/docs/platforms/javascript/common/configuration/integrations/langgraph.mdx new file mode 100644 index 0000000000000..45d9a0f6b1dac --- /dev/null +++ b/docs/platforms/javascript/common/configuration/integrations/langgraph.mdx @@ -0,0 +1,69 @@ +--- +title: LangGraph +description: "Adds instrumentation for LangGraph." +supported: + - javascript.node + - javascript.aws-lambda + - javascript.azure-functions + - javascript.connect + - javascript.express + - javascript.fastify + - javascript.gcp-functions + - javascript.hapi + - javascript.hono + - javascript.koa + - javascript.nestjs + - javascript.electron + - javascript.nextjs + - javascript.nuxt + - javascript.solidstart + - javascript.sveltekit + - javascript.react-router + - javascript.remix + - javascript.astro + - javascript.bun + - javascript.tanstackstart-react + - javascript.cloudflare +--- + + + +This integration requires SDK version `10.25.0` or higher. + + + +_Import name: `Sentry.langChainIntegration`_ + +LangGraph is instrumented via the [LangChain integration](./langchain/), which automatically captures spans for LangGraph operations including agent invocations, graph executions, and node operations. + +## Usage Example + +```javascript +import { ChatOpenAI } from "@langchain/openai"; +import { createReactAgent } from "@langchain/langgraph/prebuilt"; +import { HumanMessage, SystemMessage } from "@langchain/core/messages"; + +// Create LLM and agent +const llm = new ChatOpenAI({ + modelName: "gpt-4o", + apiKey: process.env.OPENAI_API_KEY, +}); + +const agent = createReactAgent({ llm, tools: [] }); + +// Invoke the agent - automatically instrumented +const result = await agent.invoke({ + messages: [ + new SystemMessage("You are a helpful assistant."), + new HumanMessage("Hello!"), + ], +}); +``` + +## Configuration + +For configuration options, runtime-specific setup, and detailed information, see the [LangChain integration documentation](./langchain/). + +## Supported Versions + +- `@langchain/langgraph`: `>=0.2.0 <1.0.0` From 4146ffeedee49762bc91a782beb7563c966c13e2 Mon Sep 17 00:00:00 2001 From: Ogi <86684834+obostjancic@users.noreply.github.com> Date: Thu, 13 Nov 2025 13:17:39 +0100 Subject: [PATCH 2/3] link fix --- .../common/configuration/integrations/langgraph.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/platforms/javascript/common/configuration/integrations/langgraph.mdx b/docs/platforms/javascript/common/configuration/integrations/langgraph.mdx index 45d9a0f6b1dac..053964655d16d 100644 --- a/docs/platforms/javascript/common/configuration/integrations/langgraph.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/langgraph.mdx @@ -34,7 +34,7 @@ This integration requires SDK version `10.25.0` or higher. _Import name: `Sentry.langChainIntegration`_ -LangGraph is instrumented via the [LangChain integration](./langchain/), which automatically captures spans for LangGraph operations including agent invocations, graph executions, and node operations. +LangGraph is instrumented via the [LangChain integration](./langchain), which automatically captures spans for LangGraph operations including agent invocations, graph executions, and node operations. ## Usage Example @@ -62,7 +62,7 @@ const result = await agent.invoke({ ## Configuration -For configuration options, runtime-specific setup, and detailed information, see the [LangChain integration documentation](./langchain/). +For configuration options, runtime-specific setup, and detailed information, see the [LangChain integration documentation](./langchain). ## Supported Versions From 320d35535ae536088a1f166aae2b4789eb473d35 Mon Sep 17 00:00:00 2001 From: Ogi <86684834+obostjancic@users.noreply.github.com> Date: Thu, 13 Nov 2025 14:46:05 +0100 Subject: [PATCH 3/3] link fix --- .../common/configuration/integrations/langgraph.mdx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/platforms/javascript/common/configuration/integrations/langgraph.mdx b/docs/platforms/javascript/common/configuration/integrations/langgraph.mdx index 053964655d16d..71e22fe035ac0 100644 --- a/docs/platforms/javascript/common/configuration/integrations/langgraph.mdx +++ b/docs/platforms/javascript/common/configuration/integrations/langgraph.mdx @@ -34,7 +34,7 @@ This integration requires SDK version `10.25.0` or higher. _Import name: `Sentry.langChainIntegration`_ -LangGraph is instrumented via the [LangChain integration](./langchain), which automatically captures spans for LangGraph operations including agent invocations, graph executions, and node operations. +LangGraph is instrumented via the [`langChainIntegration`](./langchain), which automatically captures spans for LangGraph operations including agent invocations, graph executions, and node operations. ## Usage Example @@ -62,7 +62,7 @@ const result = await agent.invoke({ ## Configuration -For configuration options, runtime-specific setup, and detailed information, see the [LangChain integration documentation](./langchain). +For configuration options, runtime-specific setup, and detailed information, see the [LangChain integration documentation](/platforms/javascript/guides/node/configuration/integrations/langchain/). ## Supported Versions