Skip to main content

respan-instrumentation-chroma

Respan instrumentation plugin for Chroma Python applications.

The package adds Respan task spans for Chroma client and collection operations, including collection lifecycle calls, writes, reads, vector queries, updates, deletes, and counts. Embeddings and image payloads are summarized by count and dimension instead of being written as raw span attributes.

Configuration

1. Install

pip install respan-ai respan-instrumentation-chroma chromadb

2. Set Environment Variables

Variable Required Description
RESPAN_API_KEY Yes Your Respan API key. Authenticates tracing export.
RESPAN_BASE_URL No Defaults to https://api.respan.ai/api.

Quickstart

import chromadb

from respan import Respan, workflow
from respan_instrumentation_chroma import ChromaInstrumentor

respan = Respan(instrumentations=[ChromaInstrumentor()])


@workflow(name="chroma_query_workflow")
def run_chroma_query() -> dict:
    client = chromadb.Client()
    collection = client.get_or_create_collection("respan_docs")
    collection.upsert(
        ids=["doc-1"],
        embeddings=[[0.1, 0.2, 0.3]],
        documents=["Respan traces Chroma operations."],
        metadatas=[{"topic": "observability"}],
    )
    return collection.query(
        query_embeddings=[[0.1, 0.2, 0.3]],
        n_results=1,
        include=["documents", "metadatas", "distances"],
    )


print(run_chroma_query())
respan.flush()
respan.shutdown()

Further Reading

See the Respan example projects for runnable Chroma scripts.

Metadata

Release files for respan-instrumentation-chroma 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 respan-instrumentation-chroma 0.1.0
File Size Uploaded
respan_instrumentation_chroma-0.1.0.tar.gz 6.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for respan-instrumentation-chroma 0.1.0
File Interpreter ABI Platform
respan_instrumentation_chroma-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 13.8 kB

Release files / respan_instrumentation_chroma-0.1.0.tar.gz

Download URL respan_instrumentation_chroma-0.1.0.tar.gz
Size 6.1 kB
Tags Source
SHA-256 checksum
How to use checksums
75622e05f013f55613e2fb820ac1f697324e221edeef4f602dc8e77bb8617bc9
BLAKE2b-256 checksum
How to use checksums
29a5de07171e8114558bf02d2811bfe7664db44d961830baa8bceb73976f9d2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

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

Download URL respan_instrumentation_chroma-0.1.0-py3-none-any.whl
Size 7.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26e29b7ae65e6bf6bcca4aa107dbdbc2b71292bd742aa396a0b304ad998f16f6
BLAKE2b-256 checksum
How to use checksums
c8197cf81536d7cbe2683ddb07daac05b18c948047248c81eea93d405ccc1f3c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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