Automatic tracing
LangChain automatically integrates with LangSmith when the appropriate environment variables are set. No code changes are required.export LANGSMITH_API_KEY=your-api-key
export LANGSMITH_TRACING=true
export LANGSMITH_PROJECT=your-project-name
Using traceable with LangChain
You can combine@traceable with LangChain to group LangChain runs under a parent trace: