Skip to main content

traceAI-mongodb

OpenTelemetry instrumentation for MongoDB Atlas Vector Search.

Installation

pip install traceAI-mongodb

Quick Start

from fi_instrumentation import register
from traceai_mongodb import MongoDBInstrumentor
from pymongo import MongoClient

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

client = MongoClient("mongodb+srv://...")
db = client["mydb"]
collection = db["documents"]

# Vector search operations are traced
results = collection.aggregate([
    {
        "$vectorSearch": {
            "index": "vector_index",
            "path": "embedding",
            "queryVector": [0.1, 0.2, ...],
            "numCandidates": 100,
            "limit": 5
        }
    }
])

Instrumented Operations

Operation Span Name Description
aggregate mongodb aggregate Aggregation pipeline (includes $vectorSearch)
insert_one mongodb insert_one Insert single document
insert_many mongodb insert_many Batch insert
update_one mongodb update_one Update single document
update_many mongodb update_many Batch update
delete_one mongodb delete_one Delete single document
delete_many mongodb delete_many Batch delete
find mongodb find Query documents
find_one mongodb find_one Find single document

Vector Search Detection

The instrumentor automatically detects $vectorSearch stages in aggregation pipelines and captures:

  • Vector index name
  • Query vector dimensions
  • numCandidates
  • limit

License

Apache License 2.0

Metadata

Release files for traceAI-mongodb 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-mongodb 0.1.0
File Size Uploaded Provenance Actions
traceai_mongodb-0.1.0.tar.gz 3.5 kB Without provenance Details for traceai_mongodb-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 8.4 kB

Release files / traceai_mongodb-0.1.0.tar.gz

Download URL traceai_mongodb-0.1.0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fedf680e02234c48ec3d4ac45af43f8bc78a8390d8dac26a2251fc1fa91d343b
BLAKE2b-256 checksum
How to use checksums
b2bdc2f3561dbf3484870f770f7fee8e335a4cf08f3b3867c6898521463a28ca
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_mongodb-0.1.0-py3-none-any.whl

Download URL traceai_mongodb-0.1.0-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f700c771999741adb0e2e7bf647f4e52504de2d3aa144e59a5db64e80630dfc1
BLAKE2b-256 checksum
How to use checksums
b61b6eec0d6e420cd4eebcf050a8e6bd72a32d61093d306b0b8d995bd7790258
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-mongodb 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