Adds support for instrumenting LangGraph StateGraph operations in Node. The LangGraph integration can be configured as follows:
Sentry.init({
dsn: '__DSN__',
sendDefaultPii: false, // Even with PII disabled globally
integrations: [
Sentry.langGraphIntegration({
recordInputs: true, // Force recording input messages
recordOutputs: true, // Force recording response text
}),
],
});
Instrumentation for LangGraph in Cloudflare Workers and Vercel Edge environments is supported by manually calling instrumentLangGraph:
import * as Sentry from '@sentry/cloudflare'; // or '@sentry/vercel-edge'
import { StateGraph, START, END, MessagesAnnotation } from '@langchain/langgraph';
// Create and instrument the graph
const graph = new StateGraph(MessagesAnnotation)
.addNode('agent', agentFn)
.addEdge(START, 'agent')
.addEdge('agent', END);
Sentry.instrumentLangGraph(graph, {
recordInputs: true,
recordOutputs: true,
});
const compiled = graph.compile({ name: 'weather_assistant' });
await compiled.invoke({
messages: [{ role: 'user', content: 'What is the weather in SF?' }],
});
server.address attribute on server runtimes (#18242)ok status to successful idleSpans (#18139)fetch support with data URL (#18225)captureConsoleIntegration (#18096)MAX_LOG_BUFFER_SIZE are not swallowed (#18207)MAX_METRIC_BUFFER_SIZE are not swallowed (#18212)VNode objects with high normalizeDepth (#18206)tracingChannel export missing in older node versions (#18191)@embroider/addon-shim to 1.10.0 for the e2e ember-embroider (#18173)testTimeout field in bundler-tests vitest config@embroider/addon-shim override (#18180)Scope.setTag bundle size and adjust test (#18182)| Path | Size |
|---|---|
| @sentry/browser | 24.04 KB |
| @sentry/browser - with treeshaking flags | 22.59 KB |
| @sentry/browser (incl. Tracing) | 40.4 KB |
| @sentry/browser (incl. Tracing, Profiling) | 44.62 KB |
| @sentry/browser (incl. Tracing, Replay) | 77.95 KB |
| @sentry/browser (incl. Tracing, Replay) - with treeshaking flags | 67.89 KB |
| @sentry/browser (incl. Tracing, Replay with Canvas) | 82.52 KB |
| @sentry/browser (incl. Tracing, Replay, Feedback) | 94.46 KB |
| @sentry/browser (incl. Feedback) | 40.32 KB |
| @sentry/browser (incl. sendFeedback) | 28.61 KB |
| @sentry/browser (incl. FeedbackAsync) | 33.41 KB |
| @sentry/react | 25.7 KB |
| @sentry/react (incl. Tracing) | 42.3 KB |
| @sentry/vue | 28.43 KB |
| @sentry/vue (incl. Tracing) | 42.16 KB |
| @sentry/svelte | 24.07 KB |
| CDN Bundle | 26.32 KB |
| CDN Bundle (incl. Tracing) | 40.96 KB |
| CDN Bundle (incl. Tracing, Replay) | 76.66 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) | 81.99 KB |
| CDN Bundle - uncompressed | 77.1 KB |
| CDN Bundle (incl. Tracing) - uncompressed | 121.42 KB |
| CDN Bundle (incl. Tracing, Replay) - uncompressed | 234.73 KB |
| CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed | 247.19 KB |
| @sentry/nextjs (client) | 44.66 KB |
| @sentry/sveltekit (client) | 40.78 KB |
| @sentry/node-core | 49.76 KB |
| @sentry/node | 155.53 KB |
| @sentry/node - without tracing | 90.65 KB |
| @sentry/aws-serverless | 104.08 KB |
Fetched March 31, 2026