honeyhive[openinference-langchain], call HoneyHiveTracer.init(), run LangChainInstrumentor().instrument(tracer_provider=tracer.provider), and use your existing LangChain code unchanged. See the tracing quickstart and tracer initialization guides for setup details.
LangChain is a framework for building applications with LLMs. It provides agents, tools, chains, and integrations with model providers. HoneyHive integrates with LangChain through the OpenInference instrumentor, automatically capturing agent runs, tool calls, chain executions, and LLM interactions.
How do I trace LangChain with HoneyHive?
Tested Versions
HoneyHive’s LangChain integration is tested against the following versions on PyPI, as of April 2026. Newer patch releases are generally safe; if you hit an issue, pin to these versions to reproduce a known-good configuration.
Requires Python 3.11+. The same instrumentor also traces LangGraph.
What Gets Traced
The instrumentor automatically captures:- Agent runs - Every
create_agentinvocation with inputs and outputs - LLM calls - Model requests, responses, and token usage
- Tool calls - Each tool execution with arguments and results
- Chain operations - LCEL pipes and chain invocations
Example: Single Agent with Tools
Example: Multi-Agent Routing
Troubleshooting
Traces not appearing
- Pass the tracer provider - The instrumentor must receive
tracer_provider=tracer.provider:
- Check environment variables - Ensure
HH_API_KEYis set - Initialize before creating agents - Call
instrument()before instantiating LangChain agents
Using with LangGraph
LangGraph uses the same OpenInference LangChain instrumentor. If you’ve already set up LangChain instrumentation, LangGraph state graphs are automatically traced too. See the LangGraph integration for custom StateGraph patterns.Related
LangGraph Integration
Custom state graphs with conditional routing
Enrich Your Traces
Add user IDs and custom metadata to LangChain traces
Custom Spans
Create spans for business logic around agent calls
Distributed Tracing
Trace agents across service boundaries
Using Traceloop (OpenLLMetry) Instead
If your project already uses Traceloop / OpenLLMetry, you can use its LangChain instrumentor instead of OpenInference. The setup is identical - only the install and import paths differ. Note the class name casing: Traceloop shipsLangchainInstrumentor (lowercase “c”), while OpenInference ships LangChainInstrumentor.
opentelemetry-instrumentation-langchain 0.59.2 (April 2026). The same Traceloop package also traces LangGraph.

