LangGraph
Use the Adaline LangGraph callback handler to send LangGraph executions into Adaline. The integration attaches at the callback layer and works well when your graph nodes already call LangChain-powered models or tools.Prerequisites
Before you start, make sure you have:- An Adaline account.
- A workspace API key — create one under Settings → API keys.
- Your project ID — copy it from Monitor → Copy Project ID.
Install
Initialize Adaline
Create an Adaline client, then initialize a monitor for the target project.For production guidance — buffering, batching, retries, serverless flushing, and graceful shutdown — see Instrument with the Adaline SDK.
Attach the LangGraph callback handler
Create anAdalineLangGraphCallbackHandler, then pass it through the graph invocation config.
Basic example
This example keeps the integration intentionally small: a one-nodeStateGraph that invokes ChatOpenAI, with the Adaline handler passed via LangGraph callbacks.
Use an existing parent trace or span
If you already created a trace or span in Adaline, pass it to the handler so LangGraph work is attached underneath it instead of creating a new root trace.parent_trace or parent_span, but not both.
Helper for merging callbacks
If you already build LangGraph config objects elsewhere, usewith_langgraph_callbacks to append the Adaline handler without rewriting the rest of the config.
What the handler captures
The LangGraph callback handler is designed to capture the callback events emitted during a graph run, including:- graph and chain-style runs
- nested model calls inside graph nodes
- tool and retriever callbacks emitted through the underlying stack
- tagged root traces created by the handler itself