What Gets Captured
Chain Executions
Chain Executions
Every chain run from start to finish, including nested chains and their relationships
LLM Calls
LLM Calls
All model invocations with prompts, responses, , and costs
Retrievals
Retrievals
Documents fetched from vector stores with similarity scores and metadata
Tool Calls
Tool Calls
External API calls and function executions with inputs and outputs
Agent Steps
Agent Steps
Multi-step reasoning and decisions showing the agent’s thought process
Timing Data
Timing Data
Latency for each operation to identify performance bottlenecks
Errors
Errors
Stack traces and error messages with full context
Installation
Check Prerequisites
Ensure you have:
- Python 3.8 or higher
- LangChain installed (
pip install langchain) - Arcbeam account and API key
Quick Start
1. Initialize Arcbeam
Add these lines at the start of your application:2. Run Your LangChain Code
That’s it! Your existing LangChain code will now send traces to Arcbeam:Configuration
- Python
- Environment Variables
Add environment tag to organize traces:The environment tag appears on every trace and can be used for filtering.
| Environment | Use Case |
|---|---|
development | Local testing and development |
staging | Pre-production testing |
production | Live applications |
Example: RAG Application
Full example with LangChain and Arcbeam:Debugging LangChain Applications
View Chain Execution
In the Arcbeam dashboard:- Go to Traces page
- Find your trace
- View the span tree showing:
- Chain execution span
- Retrieval span (with documents)
- LLM call span (with prompt and response)
- Timing for each step
Find Slow Chains
Filter traces by duration:- Set duration filter:
> 5 seconds - Review which chains are slow
- Check if retrieval or LLM is the bottleneck
- Optimize accordingly
Track Costs
Monitor LangChain application costs:- View cost breakdown by model
- Identify expensive chains
- Find opportunities to reduce token usage
- Compare costs across different chain configurations
Best Practices
Initialize Early
Callconnector.init() at application startup, before any LangChain code:
Use Environment Tags
Tag traces by environment for better organization:Troubleshooting
Traces Not Appearing
Check API Key: Verify your API key is correct:init() is called before LangChain code.
Check Network: Ensure your application can reach https://api.arcbeam.ai.
