Auto-Instrumentation
Zero-config tracing for LangChain and LangGraph applications.
Overview
Auto-instrumentation automatically traces all LLM calls, tool invocations, and chain executions without modifying your code.
LangChain
Installation
Usage
What Gets Traced
- LLM invocations with token counts
- Prompt templates and chains (LCEL)
- Tool calls with inputs and outputs
- Streaming responses
- Errors and exceptions
LCEL Chain Example
Tools Example
LangGraph
Installation
Usage
Trace Output
Auto-instrumentation creates spans following semantic conventions with attributes:
- Model name and provider
- Token counts (input/output)
- Tool names and types
Combining with Decorators
Auto-instrumentation works alongside @observe and @endpoint:
Supported Frameworks
| Framework | Extra | Status |
|---|---|---|
| LangChain | langchain | Supported |
| LangGraph | langgraph | Supported |