Skip to main content

traceAI-pgvector

OpenTelemetry instrumentation for pgvector PostgreSQL extension.

Installation

pip install traceAI-pgvector

Quick Start

from fi_instrumentation import register
from traceai_pgvector import PgVectorInstrumentor
import psycopg2
from pgvector.psycopg2 import register_vector

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

conn = psycopg2.connect("postgresql://...")
register_vector(conn)

# All vector operations are traced
cur = conn.cursor()
cur.execute(
    "SELECT * FROM documents ORDER BY embedding <-> %s LIMIT 5",
    ([0.1, 0.2, ...],)
)

Instrumented Operations

The instrumentor captures PostgreSQL queries that contain pgvector operations:

  • <-> - L2 distance
  • <#> - Inner product distance
  • <=> - Cosine distance
  • <+> - L1 distance
Query Type Detection Captured Attributes
Vector similarity search ORDER BY ... <-> distance type, limit
Insert with vector INSERT INTO ... vector table name, vector count
Update with vector UPDATE ... SET vector table name

License

Apache License 2.0

Metadata

Release files for traceAI-pgvector 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for traceAI-pgvector 0.1.0
File Size Uploaded Provenance Actions
traceai_pgvector-0.1.0.tar.gz 3.8 kB Without provenance Details for traceai_pgvector-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for traceAI-pgvector 0.1.0
File Interpreter ABI Platform Actions
traceai_pgvector-0.1.0-py3-none-any.whl Python 3 none any Details for traceai_pgvector-0.1.0-py3-none-any.whl

Total release size: 9.1 kB

Release files / traceai_pgvector-0.1.0.tar.gz

Download URL traceai_pgvector-0.1.0.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
ca61ad9e3505e6bdc617b116977801aeea5d00d3672b6c3abf2b22c09dbfa8b8
BLAKE2b-256 checksum
How to use checksums
cc8b1aafc4d3d2f0e218fa33edf6ff15249a22ff9383fcfbfece3ef702385926
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / traceai_pgvector-0.1.0-py3-none-any.whl

Download URL traceai_pgvector-0.1.0-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a3574c99f66c3ea5ead5b74bddf5517298a0fd6bff0f803a057fd9a93b0cb337
BLAKE2b-256 checksum
How to use checksums
8beb5638b1c8b7b255dc1c028381f49fab72da407fe234a3f91c7efc91e7d44c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for traceAI-pgvector 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page