> ## Documentation Index
> Fetch the complete documentation index at: https://docs.openlit.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get started with VectorDB Observability

> Quickly start monitoring your Vector Database Applications in just a single line of code

> [!TIP]
>
> OpenLIT automatically instruments VectorDBs alongside LLMs, MCP, and frameworks by default.

This guide demonstrates production-ready VectorDB observability setup with OpenTelemetry-native auto-instrumentations. Get enterprise-grade AI monitoring with **zero code changes** using our CLI or minimal SDK integration for complete vector database performance tracking.

Learn how to implement real-time vector operations monitoring, embedding performance tracking, similarity search optimization, and cost analysis for your VectorDB applications with OpenTelemetry traces and metrics.

```mermaid theme={"theme":{"light":"github-light","dark":"github-dark"}}
flowchart TB;
    subgraph " "
        direction LR;
        subgraph " "
            direction LR;
            OpenLIT_SDK[OpenLIT SDK] -->|OTLP| Rec[OpenLIT OTLP receiver];
            Rec -->|Stores Data| ClickHouseDB[ClickHouse];
        end
        subgraph " "
            direction RL;
            OpenLIT_UI[OpenLIT] -->|Pulls Data| ClickHouseDB;
        end
    end
```

**1. Deploy OpenLIT**

**1. Git clone OpenLIT repository**

```shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
git clone git@github.com:openlit/openlit.git
```

**2. Start Docker Compose**

From the root directory of the [OpenLIT Repo](https://github.com/openlit/openlit), Run the below command:

```shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
docker compose up -d
```

**2. Install OpenLIT SDK**

> [tab] Python
>
> ```shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
> pip install openlit
> ```

> [tab] Typescript
>
> ```shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
> npm install openlit
> ```

**3. Instrument your application**

> [tab] Python
>
> > [!TIP]
> >
> > Not sure which method to choose? Check out [Instrumentation Methods](https://docs.openlit.io/latest/sdk/instrumentation-methods.md) to understand the differences.
>
> > [tab] Zero-Code instrumentation
> >
> > > [tab] Via CLI arguments
> > >
> > > ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
> > > # Install OpenLIT
> > > pip install openlit
> > >
> > > # Start VectorDB monitoring instantly
> > > openlit-instrument --service-name my-vectordb-app python your_vectordb_app.py
> > >
> > > # With custom settings for VectorDB applications
> > > openlit-instrument \
> > >   --otlp-endpoint http://127.0.0.1:4318 \
> > >   --service-name my-vectordb-app \
> > >   --environment production \
> > >   python your_vectordb_app.py
> > > ```
> >
> > > [tab] Via environment variables
> > >
> > > ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
> > > # Install OpenLIT
> > > pip install openlit
> > >
> > > # Set environment variables
> > > export OTEL_EXPORTER_OTLP_ENDPOINT="http://127.0.0.1:4318"
> > > export OTEL_SERVICE_NAME=my-vectordb-app
> > > export OTEL_DEPLOYMENT_ENVIRONMENT=production
> > >
> > > # Run your VectorDB application
> > > openlit-instrument python your_vectordb_app.py
> > > ```
>
> > [tab] Manual instrumentation
> >
> > > [tab] Via function parameters
> > >
> > > Add the following two lines to your VectorDB application code:
> > >
> > > ```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
> > > import openlit
> > >
> > > openlit.init(
> > >   otlp_endpoint="http://127.0.0.1:4318",
> > >   service_name="my-vectordb-app",
> > >   environment="production"
> > > )
> > >
> > > # Your existing VectorDB code works the same
> > > # Vector operations are traced automatically
> > > ```
> >
> > > [tab] Via environment variables
> > >
> > > Configure your OTLP endpoint using environment variables:
> > >
> > > ```shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
> > > export OTEL_EXPORTER_OTLP_ENDPOINT="http://127.0.0.1:4318"
> > > export OTEL_SERVICE_NAME=my-vectordb-app
> > > export OTEL_DEPLOYMENT_ENVIRONMENT=production
> > > ```
> > >
> > > Add the following two lines to your VectorDB application code:
> > >
> > > ```python theme={"theme":{"light":"github-light","dark":"github-dark"}}
> > > import openlit
> > >
> > > openlit.init()
> > > ```

> [tab] Typescript
>
> > [tab] Manual instrumentation
> >
> > > [tab] Parameters
> > >
> > > Add the following two lines to your VectorDB application code:
> > >
> > > ```javascript theme={"theme":{"light":"github-light","dark":"github-dark"}}
> > > import { OpenLIT } from 'openlit';
> > >
> > > await OpenLIT.init({
> > >   otlpEndpoint: 'http://127.0.0.1:4318',
> > >   serviceName: 'my-vectordb-app',
> > >   environment: 'production'
> > > });
> > >
> > > // Your existing VectorDB code works the same
> > > // Vector operations are traced automatically
> > > ```
> >
> > > [tab] Environment Variables
> > >
> > > Configure your OTLP endpoint using environment variables:
> > >
> > > ```shell theme={"theme":{"light":"github-light","dark":"github-dark"}}
> > > export OTEL_EXPORTER_OTLP_ENDPOINT="http://127.0.0.1:4318"
> > > export OTEL_SERVICE_NAME=my-vectordb-app
> > > export OTEL_DEPLOYMENT_ENVIRONMENT=production
> > > ```
> > >
> > > Add the following two lines to your VectorDB application code:
> > >
> > > ```javascript theme={"theme":{"light":"github-light","dark":"github-dark"}}
> > > import { OpenLIT } from 'openlit';
> > >
> > > await OpenLIT.init();
> > > ```

**4. Monitor, debug and test the quality of your vector database**

Navigate to OpenLIT at `127.0.0.1:3000` to start monitoring your VectorDB applications.

![](https://github.com/openlit/.github/blob/main/profile/assets/openlit-client-1.png?raw=true)

You should see VectorDB-specific traces and metrics including:

* **Vector Operations**: Track insert, update, delete, and query operations performance
* **Similarity Search Metrics**: Monitor search latency, relevance scores, and result quality
* **Embedding Performance**: Analyze embedding generation and storage efficiency
* **Index Operations**: Monitor index building, updates, and optimization processes
* **Resource Utilization**: Track memory usage, disk I/O, and computational costs
* **Database Performance**: Monitor connection pooling, query optimization, and throughput

**Send Observability telemetry to other OpenTelemetry backends**

```mermaid theme={"theme":{"light":"github-light","dark":"github-dark"}}
flowchart TB;
    subgraph " "
        direction LR;
        ApplicationCode[Application Code] -->|Instrumented with| OpenLIT_SDK[OpenLIT SDK];
        OpenLIT_SDK -->|Sends Traces & Metrics| OT_Backend[OpenTelemetry Backend];
    end
```

If you wish to send telemetry directly from the SDK to another backend, you can stop the current Docker services by using the command below. For more details on sending the data to your existing OpenTelemetry backends, checkout our [Supported Destinations](https://docs.openlit.io/latest/sdk/destinations/overview.md) guide.

```sh theme={"theme":{"light":"github-light","dark":"github-dark"}}
docker compose down
```

If you have any questions or need support, reach out to our [community](https://join.slack.com/t/openlit/shared_invite/zt-2etnfttwg-TjP_7BZXfYg84oAukY8QRQ).

***

> [card] [Quickstart: LLM Evaluations](https://docs.openlit.io/latest/sdk/quickstart-programmatic-evals.md)
>
> Get started with evaluating your LLM responses in 2 simple steps

> [card] [Integrations](https://docs.openlit.io/latest/sdk/integrations/overview.md)
>
> 60+ AI integrations with automatic instrumentation and performance tracking

> [card] [Destinations](https://docs.openlit.io/latest/sdk/destinations/overview.md)
>
> Send telemetry to Datadog, Grafana, New Relic, and other observability stacks


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.