Qdrant

Trace Qdrant vector search operations with Respan.
  1. Sign up — Create an account at platform.respan.ai
  2. Create an API key — Generate one on the API keys page
  3. Add credits or a provider key — Add credits on the Credits page or connect your own provider key on the Integrations page

Add the Docs MCP to your AI coding tool to get help building with Respan. No API key needed.

1{
2 "mcpServers": {
3 "respan-docs": {
4 "url": "https://mcp.respan.ai/mcp/docs"
5 }
6 }
7}

What is Qdrant?

Qdrant is an open-source vector similarity search engine with a focus on performance and developer experience. It provides advanced filtering, payload indexing, and support for multiple distance metrics with both on-disk and in-memory storage.

Setup

1

Install packages

$pip install respan-ai opentelemetry-instrumentation-qdrant qdrant-client
2

Set environment variables

$export RESPAN_API_KEY="YOUR_RESPAN_API_KEY"
$export OTEL_EXPORTER_OTLP_ENDPOINT="https://api.respan.ai/api"
$export OTEL_EXPORTER_OTLP_HEADERS="Authorization=Bearer $RESPAN_API_KEY"
3

Run a traced example

1from respan import Respan
2
3# Auto-discover and activate all installed instrumentors
4respan = Respan(is_auto_instrument=True)
5
6from qdrant_client import QdrantClient, models
7
8# Connect to Qdrant
9client = QdrantClient(url="http://localhost:6333")
10
11# Create a collection
12client.create_collection(
13 collection_name="documents",
14 vectors_config=models.VectorParams(size=4, distance=models.Distance.COSINE),
15)
16
17# Upsert points with payloads
18client.upsert(
19 collection_name="documents",
20 points=[
21 models.PointStruct(id=1, vector=[0.1, 0.2, 0.3, 0.4], payload={"topic": "observability"}),
22 models.PointStruct(id=2, vector=[0.5, 0.6, 0.7, 0.8], payload={"topic": "search"}),
23 models.PointStruct(id=3, vector=[0.2, 0.3, 0.4, 0.5], payload={"topic": "embeddings"}),
24 ],
25)
26
27# Search for similar vectors with filtering
28results = client.query_points(
29 collection_name="documents",
30 query=[0.1, 0.2, 0.3, 0.4],
31 limit=2,
32 with_payload=True,
33)
34for point in results.points:
35 print(f"ID: {point.id} (score: {point.score:.4f}) — {point.payload['topic']}")
36
37respan.flush()
4

View your trace

Open the Traces page to see your Qdrant operation spans.

Always call respan.flush() before your process exits. Without it, pending spans may be lost.

What gets traced

  • Collection creation and configuration
  • Point upsert and delete operations
  • Similarity search with filters
  • Payload indexing and retrieval
  • Scroll and recommendation queries
  • Operation latency

Learn more