Overview
OpenInference instrumentation for LangChain records LangChain and LangGraph operations as OpenTelemetry spans that use OpenInference semantic conventions. Use it to send traces to an OpenTelemetry-compatible collector or observability backend, including Arize AX and Arize Phoenix. The package hooks intolangchain-core, which is shared by LangChain packages. It supports LangChain 1.x, LangChain Classic, and partner packages such as langchain-openai, langchain-anthropic, and langchain-google-vertexai.
Installation
Install the OpenInference instrumentation package with LangChain:langchain-classic instead:
Use with an OpenTelemetry collector
Install the OpenTelemetry SDK and OTLP exporter (they are not pulled in by the instrumentation package alone), then configure a tracer provider and instrument LangChain before running your application:Use with Arize AX
Arize AX can receive traces from OpenInference instrumentation through OpenTelemetry. Installarize-otel with the instrumentation package:
Resources
- OpenInference LangChain instrumentation repository
- Arize AX LangChain tracing guide
- OpenInference span customization
Connect these docs to your agent of choice via MCP for real-time answers.

