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

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_voyageai-0.51.1.tar.gz
Algorithm Hash digest
SHA256 ee1a2fbc38dec616b87f9bc3df9c0719ea38a8646ed9c7a45b8cbae0f130be83
MD5 761091fc462a2b94feb3c848b6b51c2e
BLAKE2b-256 30fe7a47168631d6e3c798d7f6f5f7169260446d91ff390e68dd97a3106107ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_voyageai-0.51.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8a21c33bf7ea91e568257ae785b4564c8ca117f64b2f1e5772c7db4ffa7c934c
MD5 d3935e33261933907e0f77b3cb07e4e8
BLAKE2b-256 378f8c1b5383748f22f80933ad37a22ac1862e5060e3f248bf4fa67cba97f855

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