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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_voyageai-0.55.0.tar.gz
Algorithm Hash digest
SHA256 70fec5a3d70ac751164a02f56b31742f4d6ea0662eee4495c5de7edf6b31d6b4
MD5 19198525270f70a5b674cca92233319f
BLAKE2b-256 6e2288529a2b4299fc00be38803b6866c6eed22bd3b019e4540fe14436abc8c6

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for opentelemetry_instrumentation_voyageai-0.55.0-py3-none-any.whl
Algorithm Hash digest
SHA256 42bcdbbb194bf77842c4199731e8befc7de4015d67d5e10655268cc81ff175be
MD5 c8e62411785e01eacaf2b6821f5c4582
BLAKE2b-256 74aeb120d92a7290eac70b410010f2920461471bcc1b43db9eb475d0ac9f8af0

See more details on using hashes here.

Provenance

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