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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_voyageai-0.53.4.tar.gz
Algorithm Hash digest
SHA256 628d61e611d0d4773e2fa958e1f4375adee7de67ce9d3338415831ebd08a3f82
MD5 169ef99800b590302d0b1e4afed8e08b
BLAKE2b-256 a267c5427e8bd4e30df20076b504e2161165669ac2769cbb5b8dcf41a55fe875

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_voyageai-0.53.4-py3-none-any.whl
Algorithm Hash digest
SHA256 073fe279a222a4e9db28df67d9f7765e6a775ef794f9ce4873278a7a415bfa9f
MD5 d388b3c64f39299cfafaa370475c67a4
BLAKE2b-256 ed8a3d081d9ab78436fc73fea3daf174384a9d96e6a0c27b8b2e788674ba7b7e

See more details on using hashes here.

Provenance

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