Skip to main content

Splunk OpenTelemetry Weaviate instrumentation

Project description

pypi

This library allows tracing requests made by the Weaviate Python client to a Weaviate vector database.

Installation

pip install splunk-otel-instrumentation-weaviate

Usage

When using the instrumentor, all Weaviate clients will automatically be instrumented.

from opentelemetry.instrumentation.weaviate import WeaviateInstrumentor
import weaviate

# Instrument Weaviate
WeaviateInstrumentor().instrument()

# This client will be automatically instrumented
client = weaviate.connect_to_local()

# Use the client as normal - all operations will be traced
collection = client.collections.get("MyCollection")
result = collection.query.fetch_objects(limit=10)

Configuration

Content Capture

By default, document content from similarity search operations is not captured in span events. To enable content capture, set the following environment variable:

export OTEL_INSTRUMENTATION_GENAI_CAPTURE_MESSAGE_CONTENT=true

When enabled, similarity search operations will emit weaviate.document events containing:

  • db.weaviate.document.content - The document content/properties

  • db.weaviate.document.distance - Distance metric (if available)

  • db.weaviate.document.certainty - Certainty score (if available)

  • db.weaviate.document.score - Relevance score (if available)

  • db.weaviate.document.query - The search query (if available)

The document count is always captured in the db.weaviate.documents.count span attribute regardless of this setting.

Examples

The examples/manual/ directory contains a working example:

  • example_v4.py - Comprehensive example showing various Weaviate v4 operations with automatic tracing

Running the example

  1. Install dependencies:

    pip install weaviate-client>=4.0.0 opentelemetry-sdk opentelemetry-exporter-otlp-proto-grpc
  2. Start a local Weaviate instance:

    docker run -d -p 8080:8080 -p 50051:50051 cr.weaviate.io/semitechnologies/weaviate:latest
  3. Run the example:

    cd examples/manual
    python3 example_v4.py
  4. (Optional) Configure OTLP endpoint:

    export OTEL_EXPORTER_OTLP_ENDPOINT="http://localhost:4317"

Supported Versions

This instrumentation supports Weaviate client versions 3.x and 4.x.

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

splunk_otel_instrumentation_weaviate-0.1.1.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file splunk_otel_instrumentation_weaviate-0.1.1.tar.gz.

File metadata

  • Download URL: splunk_otel_instrumentation_weaviate-0.1.1.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.17.1 {"ci":true,"cpu":"x86_64","distro":{"id":"trixie","libc":{"lib":"glibc","version":"2.41"},"name":"Debian GNU/Linux","version":"13"},"implementation":{"name":"CPython","version":"3.11.15"},"installer":{"name":"hatch","version":"1.17.1"},"openssl_version":"OpenSSL 3.5.6 7 Apr 2026","python":"3.11.15","system":{"name":"Linux","release":"5.15.0-1084-aws"}} HTTPX2/2.9.0

File hashes

Hashes for splunk_otel_instrumentation_weaviate-0.1.1.tar.gz
Algorithm Hash digest
SHA256 969e99e50f87bea074bb2dba15311bf71f9452529b1919b3f564a9dbb637bf42
MD5 d573e0a292c2c6284bfc9c730338a8b5
BLAKE2b-256 1003516fd92045df0a2a50f378b916edbb04c9e6ac4d851b392417bf21ee58b4

See more details on using hashes here.

File details

Details for the file splunk_otel_instrumentation_weaviate-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: splunk_otel_instrumentation_weaviate-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.17.1 {"ci":true,"cpu":"x86_64","distro":{"id":"trixie","libc":{"lib":"glibc","version":"2.41"},"name":"Debian GNU/Linux","version":"13"},"implementation":{"name":"CPython","version":"3.11.15"},"installer":{"name":"hatch","version":"1.17.1"},"openssl_version":"OpenSSL 3.5.6 7 Apr 2026","python":"3.11.15","system":{"name":"Linux","release":"5.15.0-1084-aws"}} HTTPX2/2.9.0

File hashes

Hashes for splunk_otel_instrumentation_weaviate-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2e2ecd1c1081aa526969ee2ed7132c02625b3221963880705e1da7dd5b1fc526
MD5 e38f9ee4654d68cd1fd9476b564ee0b1
BLAKE2b-256 ff896ff040a19f5ddffc9dd337277512f6243e8f0e071255ec36c888d91f561a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page