Metadata-Version: 2.4
Name: traceAI-qdrant
Version: 0.1.1
Summary: OpenTelemetry instrumentation for Qdrant vector database
License: Apache-2.0
Keywords: opentelemetry,qdrant,vector-database,tracing,observability,rag,traceai,futureagi,llm
Author: Future AGI
Author-email: no-reply@futureagi.com
Requires-Python: >3.9,<3.14
Classifier: Framework :: OpenTelemetry
Classifier: Framework :: OpenTelemetry :: Instrumentations
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Monitoring
Requires-Dist: fi-instrumentation-otel (>=0.1.11)
Requires-Dist: qdrant-client (>=1.6.0)
Requires-Dist: wrapt (>=1.0.0)
Project-URL: Changelog, https://github.com/future-agi/traceAI/blob/dev/python/frameworks/qdrant/CHANGELOG.md
Project-URL: Documentation, https://docs.futureagi.com/docs/tracing
Project-URL: Homepage, https://futureagi.com
Project-URL: Issues, https://github.com/future-agi/traceAI/issues
Project-URL: Repository, https://github.com/future-agi/traceAI/tree/dev/python/frameworks/qdrant
Description-Content-Type: text/markdown

# traceAI-qdrant

OpenTelemetry instrumentation for [Qdrant](https://qdrant.tech/) vector database.

## Installation

```bash
pip install traceAI-qdrant
```

## Quick Start

```python
from fi_instrumentation import register
from traceai_qdrant import QdrantInstrumentor
from qdrant_client import QdrantClient
from qdrant_client.models import VectorParams, Distance, PointStruct

trace_provider = register(project_name="my-rag-app")
QdrantInstrumentor().instrument(tracer_provider=trace_provider)

client = QdrantClient(":memory:")
client.create_collection("documents", vectors_config=VectorParams(size=384, distance=Distance.COSINE))

client.upsert("documents", points=[
    PointStruct(id=1, vector=[0.1]*384, payload={"text": "Hello"}),
    PointStruct(id=2, vector=[0.2]*384, payload={"text": "World"}),
])

results = client.search("documents", query_vector=[0.15]*384, limit=5)
```

## Instrumented Operations

| Operation | Span Name | Description |
|-----------|-----------|-------------|
| `search` | `qdrant search` | Vector similarity search |
| `upsert` | `qdrant upsert` | Insert or update points |
| `delete` | `qdrant delete` | Delete points |
| `retrieve` | `qdrant retrieve` | Get points by ID |
| `scroll` | `qdrant scroll` | Iterate through points |
| `recommend` | `qdrant recommend` | Recommendation search |
| `count` | `qdrant count` | Count points |

## License

Apache License 2.0

