Installation
Usage
The LangWatch API key is configured by default via the
LANGWATCH_API_KEY environment variable.@langwatch.trace() decorator creates a parent trace for your graph execution. Within each node that makes LLM calls, use get_langchain_callback() and pass it to the model’s RunnableConfig to capture those calls as spans within the trace.
Related
- Capturing RAG - Learn how to capture RAG data from LangChain retrievers and tools
- Capturing Metadata and Attributes - Add custom metadata and attributes to your traces and spans
- Capturing Evaluations & Guardrails - Log evaluations and implement guardrails in your LangGraph applications