---
title: "VectorDB Observability Setup | Grafana Cloud documentation"
description: "Set up VectorDB Observability to monitor vector database performance"
---

# VectorDB observability setup

VectorDB Observability provides comprehensive monitoring for vector database performance, crucial for applications involving similarity searches, semantic search, and RAG (Retrieval-Augmented Generation) systems.

## Install the instrumentation SDK

Install the OpenLIT SDK in your Python environment:

Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```bash
pip install openlit
```

## Configure OTEL environment variables

### Get your Grafana Cloud OTEL credentials

If you haven’t already obtained your OTEL credentials during the [main AI Observability setup](../setup/), follow these steps:

1. Sign in to Grafana Cloud and go to the [Grafana Cloud Portal](/profile/org)
2. Select your organization if you have access to multiple
3. Click your stack from the sidebar or main stack list
4. Under **Manage your stack**, click the **Configure** button in the OpenTelemetry section
5. Scroll down to the **Password / API Token** section and click **Generate now** (if you don’t have a token)
6. Enter a name for the token and click **Create token**
7. Click **Close** - you don’t need to copy the token manually
8. Scroll down and copy the `OTEL_EXPORTER_OTLP_ENDPOINT` and `OTEL_EXPORTER_OTLP_HEADERS` values from the **Environment variables** section

### Set the environment variables

Set up the OpenTelemetry endpoints using the values you copied:

Bash ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```bash
export OTEL_EXPORTER_OTLP_ENDPOINT="<YOUR_GRAFANA_OTEL_GATEWAY_URL>"
export OTEL_EXPORTER_OTLP_HEADERS="<YOUR_GRAFANA_OTEL_GATEWAY_AUTH>"
```

Replace the values with those you copied:

- Replace `<YOUR_GRAFANA_OTEL_GATEWAY_URL>` with the `OTEL_EXPORTER_OTLP_ENDPOINT` value  
  Example: `https://otlp-gateway-<ZONE>.grafana.net/otlp`
- Replace `<YOUR_GRAFANA_OTEL_GATEWAY_AUTH>` with the `OTEL_EXPORTER_OTLP_HEADERS` value  
  Example: `Authorization=Basic%20<BASE64 ENCODED INSTANCE ID AND API TOKEN>`

## Instrument your application

Add the following two lines to your application code:

Python ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```python
import openlit

openlit.init()
```

The OpenLIT SDK automatically uses the OTEL environment variables to send telemetry data to your Grafana Cloud instance.

### Examples by vector database

#### Pinecone

Python ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```python
import openlit
import pinecone

openlit.init()

# Pinecone operations are automatically instrumented
pinecone.init(api_key="your-api-key", environment="your-env")
index = pinecone.Index("your-index")

# Vector operations are automatically tracked
results = index.query(
    vector=[0.1, 0.2, 0.3],
    top_k=10,
    include_metadata=True
)
```

#### Chroma

Python ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```python
import openlit
import chromadb

openlit.init()

# Chroma operations are automatically instrumented
client = chromadb.Client()
collection = client.create_collection("my_collection")

# Vector operations are automatically tracked
results = collection.query(
    query_embeddings=[[0.1, 0.2, 0.3]],
    n_results=10
)
```

Refer to the [OpenLIT documentation](https://docs.openlit.io/) for more vector database providers.

## Visualize and analyze

With the VectorDB Observability data now being collected and sent to Grafana Cloud, the next step is to visualize and analyze this data to get insights into your vector database performance, behavior, and identify areas of improvement.

Navigate to the **VectorDB Observability** dashboard in your Grafana Cloud instance to start exploring. The dashboard provides:

- **Query performance** - Response times and throughput metrics
- **Operation monitoring** - Success rates and error tracking
- **Database health** - Connection status and availability
- **Resource usage** - Vector storage and computation metrics
