pgvector (tracing)
pgvector (tracing)
pgvector adds vector types and similarity operators to PostgreSQL. The Respan-owned pgvector instrumentation traces pgvector registration and psycopg 3 connection and cursor operations, including synchronous and asynchronous execution and fetched results.
Set up Respan
Create an account at platform.respan.ai and grab an API key.
Run npx @respan/cli setup to set up with your coding agent.
Example projects
Tracing
Setup
Set environment variables
The PostgreSQL user must be able to use the vector extension. If it is not already installed in the database, the quickstart also requires permission to run CREATE EXTENSION.
View your trace
Open the Traces page and search for workflow name pgvector_similarity_queries_workflow.
Covered operations
The instrumentor traces pgvector type registration plus psycopg 3 execute, executemany, fetchone, fetchmany, and fetchall calls for synchronous and asynchronous connections, cursors, and server cursors. This captures dense, half-precision, sparse, and binary vector workflows and PostgreSQL similarity operators. The optional psycopg2 extra also traces pgvector’s psycopg 2 type registration.
Content capture
SQL arguments, vector parameters, operation summaries, and fetched rows are captured by default. Disable content capture when those values should not be attached to spans:
Operation names, status, and PostgreSQL attributes remain available when content capture is disabled.