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.56.1.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.56.1.tar.gz.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_voyageai-0.56.1.tar.gz
Algorithm Hash digest
SHA256 cfa1d68dc3b6451b8255ba8982ace557083d6c679aebf8761900db07599a1ea2
MD5 cb0169cffad1f5e644de1acc3130bf30
BLAKE2b-256 c6edaa051a4868b2f7a9e18460f4b5dd63b19b414f87d848fbee387d97c7554d

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_voyageai-0.56.1.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.56.1-py3-none-any.whl.

File metadata

File hashes

Hashes for opentelemetry_instrumentation_voyageai-0.56.1-py3-none-any.whl
Algorithm Hash digest
SHA256 210204b03274aae4577e1f8a0ae57fdddc811fcd413d4a267c5ed3c9e74bd7d7
MD5 07b94de71a28894e9ac2a81a36add3cf
BLAKE2b-256 a899b99d37ada97187f04c277d4321200bf6567604b75fc5770a41525a6fcd97

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentelemetry_instrumentation_voyageai-0.56.1-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