query_points call in a retriever span that records the query and the documents Qdrant returns, using the OpenInference semantic conventions. The embedding and chat calls around it are captured by openinference-instrumentation-openai, so Arize AX shows the full retrieval-augmented generation (RAG) flow in one trace.
Prerequisites
- Python 3.10+
- An Arize AX account (sign up)
- An
OPENAI_API_KEYfrom the OpenAI Platform, used for embeddings and the answer - A running Qdrant server: either a Qdrant Cloud cluster, or a local container started with
docker run -d -p 6333:6333 qdrant/qdrant(Podman works too: usepodman runwith the same arguments)
Launch Arize AX
- Sign in to your Arize AX account.
- From Space Settings, copy your Space ID and API Key. You will set them as
ARIZE_SPACE_IDandARIZE_API_KEYbelow.
Install
Configure credentials
QDRANT_URL points at the local container from the prerequisites. For Qdrant Cloud, set it to your cluster URL and also set QDRANT_API_KEY.
Setup tracing
Run Qdrant
The example indexes three short documents, then answers a question in a traced RAG flow: a chain span wraps a retriever span for the Qdrant query and the LLM call that answers from the retrieved text.Expected output
Verify in Arize AX
- Open your Arize AX space and select project
qdrant-tracing-example. - You should see a new trace within ~30 seconds rooted at an
answer_questionchain span. It contains aqdrant.query_pointsretriever span that lists the two retrieved documents with their scores (with the question’sCreateEmbeddingsembedding span nested under it), followed by aChatCompletionLLM span. Indexing the documents produces a separateCreateEmbeddingstrace. - If no traces appear, see Troubleshooting.
Check from the skill, CLI, or SDK
Confirm spans are actually reaching your Arize AX project. Use whichever fits your workflow — the skill and CLI work for any framework; the SDK check is shown for each language.- Arize skill (agent)
- AX CLI
- SDK
Install the Arize Skills plugin and let your coding agent check for you:Then prompt your agent:
Use the arize-trace skill to export and analyze recent traces from my project. Confirm spans are arriving, and summarize any errors or latency issues.
Troubleshooting
- No traces in Arize AX. Confirm
ARIZE_SPACE_IDandARIZE_API_KEYare set in the same shell that runsexample.py. Enable OpenTelemetry debug logs withexport OTEL_LOG_LEVEL=debugand re-run. - Embedding and chat spans missing, but the retriever span is present.
OpenAIInstrumentor().instrument(...)must run beforeopenaiis imported. Make sureinstrumentation.pyis the first import in your entry point. - The retriever span shows no documents. The span only lists what Qdrant returned. An empty result usually means the collection is empty or was created with a different vector size:
text-embedding-3-smallreturns 1,536 dimensions, so the collection’ssizemust match. Connection refusedon port 6333. The Qdrant container isn’t running. Start it withdocker run -d -p 6333:6333 qdrant/qdrant(orpodman run), then checkcurl http://localhost:6333/readyz. With Podman on macOS, runpodman machine startfirst.401 Unauthorizedfrom Qdrant Cloud. SetQDRANT_API_KEYto a key for the same cluster asQDRANT_URL.