Skip to content

Same agent Smaller bill. The tools and infrastructure to get more work from your AI. Fewer tokens. Less compute. Lower cost.

2.3 KB
Raw Blame
---
title: 'Monitor LangChain using OpenTelemetry'
description: 'Instrument LangChain apps built on langchain-core with OpenTelemetry auto-instrumentation, delivering AI observability into chains and execution performance.'
sidebarTitle: 'LangChain'
---

import IntegrationMethods from '/snippets/integration-methods.mdx';

OpenLIT uses OpenTelemetry Auto-Instrumentation to help you monitor LLM applications built using LangChain. This includes tracking performance and operation stats.

Auto-instrumentation means you don't have to set up monitoring manually for different LLMs, frameworks, or databases. By simply adding OpenLIT in your application, all the necessary monitoring configurations are automatically set up.

The integration is compatible with:
- `langchain-core >= 0.1.20`
- modern `langchain` releases that expose `langchain_core`
- modern `langgraph` releases when installed alongside LangChain

Minimal requirement:
- `langchain-core`

Common installation patterns:
- LangChain applications: `pip install langchain`
- LangChain Core only: `pip install langchain-core`
- LangGraph applications: `pip install langgraph`
- OpenLIT Typescript SDK `>= 1.0.0`

## Get started 

<Steps>
  <Step title="Install OpenLIT">
    Open your command line or terminal and run:
    <Tabs>
      <Tab title="Python">
        ```shell
        pip install openlit
        ```
      </Tab>
      <Tab title="Typescript">
        ```shell
        npm install openlit
        ```
      </Tab>
    </Tabs>
  </Step>
  <Step title="Install LangChain or LangChain Core">
    Install the framework package your application uses:
    ```shell
    pip install langchain
    # or
    pip install langchain-core
    # or
    pip install langgraph
    ```
  </Step>
  <IntegrationMethods />
</Steps>

---

<CardGroup cols={3}>
  <Card title="Quickstart: LLM Observability" href="/latest/sdk/quickstart-ai-observability" icon='bolt'>
    Production-ready AI monitoring setup in 2 simple steps with zero code changes
  </Card>
  <Card title="Configuration" href="/latest/sdk/configuration" icon='bolt'>
    Configure the OpenLIT SDK according to you requirements.
  </Card>
  <Card title="Destinations" href="/latest/sdk/destinations/overview" icon='link'>
    Send telemetry to Datadog, Grafana, New Relic, and other observability stacks
  </Card>
</CardGroup>