Skip to main content

OpenTelemetry Voyage AI instrumentation

Project description

OpenTelemetry Voyage AI Instrumentation

This library allows tracing Voyage AI API calls with OpenTelemetry.

Installation

pip install opentelemetry-instrumentation-voyageai

Usage

from opentelemetry.instrumentation.voyageai import VoyageAIInstrumentor

VoyageAIInstrumentor().instrument()

# Now use Voyage AI as usual
import voyageai

client = voyageai.Client()

# Embeddings
result = client.embed(texts=["Hello, world!"], model="voyage-3")

# Reranking
result = client.rerank(
    query="What is the capital of France?",
    documents=["Paris is the capital of France.", "London is in England."],
    model="rerank-2.5"
)

Semantic Conventions

This instrumentation follows the OpenTelemetry GenAI semantic conventions:

  • gen_ai.system: "voyageai"
  • gen_ai.operation.name: "embeddings" or "rerank"
  • gen_ai.request.model: The model name
  • gen_ai.usage.input_tokens: Token count from the response
  • gen_ai.embeddings.dimension.count: Embedding vector dimension (for embed only)

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

opentelemetry_instrumentation_voyageai-0.53.2.tar.gz (168.9 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 opentelemetry_instrumentation_voyageai-0.53.2.tar.gz.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_voyageai-0.53.2.tar.gz
Algorithm Hash digest
SHA256 641bf01f1538210f167d1c8bf1a4b93f0cc7378d25178b3a55ec5f7eb6ba1f81
MD5 7facef22c73ed2239244256d0d2ef63c
BLAKE2b-256 a0cbbdf583c09a363cdf7e354a7c6020baad66126b1cd1b8cf4d9a058217a86f

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_voyageai-0.53.2.tar.gz:

Publisher: release.yml on traceloop/openllmetry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opentelemetry_instrumentation_voyageai-0.53.2-py3-none-any.whl.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_voyageai-0.53.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1a015d225b53d1a2574a7860409e2e82f32393157a81a5c8766d187c4381d004
MD5 d1581b6ca14dfae5b60ac18733fbf0a7
BLAKE2b-256 80ffb9d324887a2f59151e655a9affad977f9223a59af590a2b5462bc9d5f9e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_voyageai-0.53.2-py3-none-any.whl:

Publisher: release.yml on traceloop/openllmetry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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