Skip to main content
Arcbeam integrates seamlessly with applications using OpenTelemetry instrumentation. Capture every chain execution, LLM call, and retrieval automatically.

What Gets Captured

Every chain run from start to finish, including nested chains and their relationships
All model invocations with prompts, responses, , and costs
Documents fetched from vector stores with similarity scores and metadata
External API calls and function executions with inputs and outputs
Multi-step reasoning and decisions showing the agent’s thought process
Latency for each operation to identify performance bottlenecks
Stack traces and error messages with full context

Installation

1

Check Prerequisites

Ensure you have:
  • Python 3.8 or higher
  • LangChain installed (pip install langchain)
  • Arcbeam account and API key
2

Install Arcbeam SDK

Installation complete! You’re ready to instrument your LangChain application.

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

Add environment tag to organize traces:
The environment tag appears on every trace and can be used for filtering.

Example: RAG Application

Full example with LangChain and Arcbeam:

Debugging LangChain Applications

View Chain Execution

In the Arcbeam dashboard:
  1. Go to Traces page
  2. Find your trace
  3. 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:
  1. Set duration filter: > 5 seconds
  2. Review which chains are slow
  3. Check if retrieval or LLM is the bottleneck
  4. Optimize accordingly

Track Costs

Monitor LangChain application costs:
  1. View cost breakdown by model
  2. Identify expensive chains
  3. Find opportunities to reduce token usage
  4. Compare costs across different chain configurations

Best Practices

Initialize Early

Call connector.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:
Check Project ID: Ensure project ID is valid:
Check Initialization: Make sure init() is called before LangChain code. Check Network: Ensure your application can reach https://api.arcbeam.ai.

Missing Retrieved Documents

Connect Dataset: Make sure you’ve added your vector store as a dataset in Arcbeam. Verify Schema Mapping: Check that document ID columns are mapped correctly. Sync Dataset: Trigger a manual sync to ensure metadata is current.

Next Steps

LangGraph Integration

Instrument LangGraph applications

Add Data Sources

Connect vector stores for data lineage

Find Problematic Traces

Debug LangChain applications

Core Concepts

Understand traces, spans, and lineage