Available for: Python and TypeScript.
recordRetrieval/record_retrieval helper. Zespan now patches QdrantClient so every query and upsert() call is captured automatically, the same way LLM provider calls already are.
Patched automatically as part of
zespan.autopatch(), which both SDKs run on init() unless you pass autopatch: false (autopatch=False in Python). There’s no separate opt-in call for vector-DB tracing.What gets traced
- Reads — Python:
query_points()only, on bothQdrantClient(sync) andAsyncQdrantClient. The Python client’s.search()method was removed entirely in currentqdrant-clientversions, so there’s nothing to patch there. Node: bothclient.search()andclient.query()are patched — the JS client still ships both methods, so either style is traced - Writes —
upsert()(sync and async in Python; single method in Node) emits anembeddingspan
- Python
- TypeScript
What gets captured
Read span (query_points() / query() / search()) — span_kind: "retriever", operation: "vector_search"
content follows your storePrompts/store_prompts setting and the same redaction rules as prompt text — set storePrompts: false and payload text is dropped while document_id/source/score are still kept.
Write span (upsert()) — span_kind: "embedding", operation: "vector_upsert"
Next steps
- Manual spans — the
record_vector_search()/recordVectorSearch()helper for pgvector, and the fullwith_zespan_context()/withZespanContext()trace-linking pattern - Evaluating RAG pipelines — score retrieval quality once
rag_contextsis on the trace - Pinecone, Chroma, Weaviate — the other auto-traced vector DBs

