Compatibility
This instrumentation works with:- LangChain 1.x (
langchain>=1.0.0): Modern agent framework built on LangGraph - LangChain Classic (
langchain-classic>=1.0.0): Legacy chains and tools (formerlylangchain 0.x) - All LangChain partner packages (
langchain-openai,langchain-anthropic,langchain-google-vertexai, etc.)
langchain-core, which is the shared foundation used by all LangChain packages.
Installation
For LangChain 1.x (Recommended for New Projects)
For LangChain Classic (Legacy Applications)
For Both (Migration Scenarios)
Quickstart
Example with LangChain 1.x (New Agent Framework)
Install packages needed for this demonstration:http://localhost:6006:
Setup instrumentation
Configure OpenAI credentials
Create and run an agent
Example with LangChain Classic (Legacy Chains)
For legacy applications using LangChain Classic:http://localhost:6006 to see the traces.