openllmetry Documentation

Open-source observability for your GenAI or LLM application, based on OpenTelemetry

RAW Doc

Technical Documentation: traceloop/openllmetry

โ„น๏ธ Provenance: Multi-Tier Ingestion ยท CodeWiki Reference

Overview (`README.md`)

[**Get started ยป**](https://traceloop.com/docs/openllmetry/getting-started-python)

Slack |
Docs |
Website

[](https://www.ycombinator.com/companies/traceloop)

๐ŸŽ‰ New:
Our semantic conventions are now part of OpenTelemetry! Join the discussion and help us shape the future of LLM observability.

Looking for the JS/TS version? Check out OpenLLMetry-JS.

OpenLLMetry is a set of extensions built on top of OpenTelemetry that gives you complete observability over your LLM application. Because it uses OpenTelemetry under the hood, it can be connected to your existing observability solutions - Datadog, Honeycomb, and others.

It's built and maintained by Traceloop under the Apache 2.0 license.

The repo contains standard OpenTelemetry instrumentations for LLM providers and Vector DBs, as well as a Traceloop SDK that makes it easy to get started with OpenLLMetry, while still outputting standard OpenTelemetry data that can be connected to your observability stack.
If you already have OpenTelemetry instrumented, you can just add any of our instrumentations directly.

๐Ÿš€ Getting Started

The easiest way to get started is to use our SDK.
For a complete guide, go to our docs.

Install the SDK:

bash
pip install traceloop-sdk

Then, to start instrumenting your code, just add this line to your code:

python
from traceloop.sdk import Traceloop

Traceloop.init()

That's it. You're now tracing your code with OpenLLMetry!
If you're running this locally, you may want to disable batch sending, so you can see the traces immediately:

python
Traceloop.init(disable_batch=True)

โซ Supported (and tested) destinations

See our docs for instructions on connecting to each one.

๐Ÿช— What do we instrument?

OpenLLMetry can instrument everything that OpenTelemetry already instruments - so things like your DB, API calls, and more. On top of that, we built a set of custom extensions that instrument things like your calls to OpenAI or Anthropic, or your Vector DB like Chroma, Pinecone, Qdrant or Weaviate.

Vector DBs

Frameworks

Protocol

๐Ÿ”Ž Telemetry

We no longer log or collect any telemetry in the SDK or in the instrumentations. Make sure to bump to v0.49.2 and above.

Why we collect telemetry

  • The primary purpose is to detect exceptions within instrumentations. Since LLM providers frequently update their APIs, this helps us quickly identify and fix any breaking changes.
  • We only collect anonymous data, with no personally identifiable information. You can view exactly what data we collect in our Privacy documentation.
  • Telemetry is only collected in the SDK. If you use the instrumentations directly without the SDK, no telemetry is collected.

๐ŸŒฑ Contributing

Whether big or small, we love contributions โค๏ธ Check out our guide to see how to get started.

Not sure where to get started? You can:

๐Ÿ’š Community & Support

  • Slack (For live discussion with the community and the Traceloop team)
  • GitHub Discussions (For help with building and deeper conversations about features)
  • GitHub Issues (For any bugs and errors you encounter using OpenLLMetry)
  • Twitter (Get news fast)

๐Ÿ™ Special Thanks

To @patrickdebois, who suggested the great name we're now using for this repo!

๐Ÿ’ซ Contributors


Overview (`packages/opentelemetry-instrumentation-agno/README.md`)

OpenTelemetry Agno Instrumentation

This library provides automatic instrumentation for the Agno framework.

Installation

bash
pip install opentelemetry-instrumentation-agno

Usage

python
from opentelemetry.instrumentation.agno import AgnoInstrumentor

AgnoInstrumentor().instrument()

Supported Features

This instrumentation captures:

  • Agent execution (sync and async)
  • Team operations
  • Model invocations
  • Function calls
  • Streaming responses

Overview (`packages/opentelemetry-instrumentation-alephalpha/README.md`)

OpenTelemetry Aleph Alpha Instrumentation

This library allows tracing calls to any of Aleph Alpha's endpoints sent with the official Aleph Alpha Client.

Installation

bash
pip install opentelemetry-instrumentation-alephalpha

Example usage

python
from opentelemetry.instrumentation.alephalpha import AlephAlphaInstrumentor

AlephAlphaInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-anthropic/README.md`)

OpenTelemetry Anthropic Instrumentation

This library allows tracing Anthropic prompts and completions sent with the official Anthropic library.

Installation

bash
pip install opentelemetry-instrumentation-anthropic

Example usage

python
from opentelemetry.instrumentation.anthropic import AnthropicInstrumentor

AnthropicInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-bedrock/README.md`)

OpenTelemetry Bedrock Instrumentation

This library allows tracing any of AWS Bedrock's models prompts and completions sent with Boto3 to Bedrock.

Installation

bash
pip install opentelemetry-instrumentation-bedrock

Example usage

python
from opentelemetry.instrumentation.bedrock import BedrockInstrumentor

BedrockInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-chromadb/README.md`)

OpenTelemetry Chroma Instrumentation

This library allows tracing client-side calls to Chroma vector DB sent with the official Chroma library.

Installation

bash
pip install opentelemetry-instrumentation-chromadb

Example usage

python
from opentelemetry.instrumentation.chromadb import ChromaInstrumentor

ChromaInstrumentor().instrument()

Overview (`packages/opentelemetry-instrumentation-cohere/README.md`)

OpenTelemetry Cohere Instrumentation

This library allows tracing calls to any of Cohere's endpoints sent with the official Cohere library.

Installation

bash
pip install opentelemetry-instrumentation-cohere

Example usage

python
from opentelemetry.instrumentation.cohere import CohereInstrumentor

CohereInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-crewai/README.md`)

OpenTelemetry CrewAI Instrumentation

This library allows tracing agentic workflows implemented with crewAI framework crewAI library.

Installation

bash
pip install opentelemetry-instrumentation-crewai

Example usage

python
from opentelemetry.instrumentation.crewai import CrewAIInstrumentor

CrewAIInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-google-generativeai/README.md`)

OpenTelemetry Google Generative AI Instrumentation

This library allows tracing Google Gemini prompts and completions sent with the official Google Generative AI library.

Installation

bash
pip install opentelemetry-instrumentation-google-generativeai

Example usage

python
from opentelemetry.instrumentation.google_generativeai import GoogleGenerativeAiInstrumentor

GoogleGenerativeAiInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-groq/README.md`)

OpenTelemetry Groq Instrumentation

This library allows tracing Groq prompts and completions sent with the official Groq SDK.

Installation

bash
pip install opentelemetry-instrumentation-groq

Example usage

python
from opentelemetry.instrumentation.groq import GroqInstrumentor

GroqInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-haystack/README.md`)

OpenTelemetry Haystack Instrumentation

This library allows tracing complete LLM applications built with Haystack.

Installation

bash
pip install opentelemetry-instrumentation-haystack

Example usage

python
from opentelemetry.instrumentation.haystack import HaystackInstrumentor

HaystackInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-lancedb/README.md`)

OpenTelemetry LanceDB Instrumentation

This library allows tracing client-side calls to LanceDB sent with the official LanceDB library.

Installation

bash
pip install opentelemetry-instrumentation-lancedb

Example usage

python
from opentelemetry.instrumentation.lancedb import LanceInstrumentor

LanceInstrumentor().instrument()

Overview (`packages/opentelemetry-instrumentation-langchain/README.md`)

OpenTelemetry Langchain Instrumentation

This library allows tracing complete LLM applications built with Langchain.

Installation

bash
pip install opentelemetry-instrumentation-langchain

Example usage

python
from opentelemetry.instrumentation.langchain import LangchainInstrumentor

LangchainInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-litellm/README.md`)

OpenTelemetry LiteLLM Instrumentation

This library allows tracing LLM prompts and completions sent with LiteLLM. Because LiteLLM normalizes every provider's reply into an OpenAI-style ModelResponse โ€” including custom providers registered via litellm.CustomLLM โ€” a single set of wrappers produces consistent gen_ai.* spans and metrics across all back-ends.

Installation

bash
pip install opentelemetry-instrumentation-litellm

Example usage

python
from opentelemetry.instrumentation.litellm import LiteLLMInstrumentor

LiteLLMInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-llamaindex/README.md`)

OpenTelemetry LlamaIndex Instrumentation

This library allows tracing complete LLM applications built with LlamaIndex.

Installation

bash
pip install opentelemetry-instrumentation-llamaindex

Example usage

python
from opentelemetry.instrumentation.llamaindex import LlamaIndexInstrumentor

LlamaIndexInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-marqo/README.md`)

OpenTelemetry Marqo Instrumentation

This library allows tracing client-side calls to Marqo vector DB sent with the official Marqo library.

Installation

bash
pip install opentelemetry-instrumentation-marqo

Example usage

python
from opentelemetry.instrumentation.marqo import MarqoInstrumentor

MarqoInstrumentor().instrument()

Overview (`packages/opentelemetry-instrumentation-mcp/README.md`)

OpenTelemetry MCP Instrumentation

This library allows tracing of agentic workflows implemented with MCP framework mcp python sdk.

Installation

bash
pip install opentelemetry-instrumentation-mcp

Example usage

python
from opentelemetry.instrumentation.mcp import McpInstrumentor

McpInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application tool usage is working, and can make it easy to debug and evaluate the tool usage.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-milvus/README.md`)

OpenTelemetry Milvus Instrumentation

This library allows tracing client-side calls to Milvus vector DB sent with the official Milvus library.

Installation

bash
pip install opentelemetry-instrumentation-milvus

Example usage

python
from opentelemetry.instrumentation.milvus import MilvusInstrumentor

MilvusInstrumentor().instrument()

Overview (`packages/opentelemetry-instrumentation-mistralai/README.md`)

OpenTelemetry Mistral AI Instrumentation

This library allows tracing calls to any of mistralai's endpoints sent with the official Mistral AI library.

Installation

bash
pip install opentelemetry-instrumentation-mistralai

Example usage

python
from opentelemetry.instrumentation.mistralai import MistralAiInstrumentor

MistralAiInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-ollama/README.md`)

OpenTelemetry Ollama Instrumentation

This library allows tracing calls to any of Ollama's endpoints sent with the official Ollama Python Library.

Installation

bash
pip install opentelemetry-instrumentation-ollama

Example usage

python
from opentelemetry.instrumentation.ollama import OllamaInstrumentor

OllamaInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-openai-agents/README.md`)

OpenTelemetry OpenAI Agents Instrumentation

This library enables tracing of agentic workflows implemented using the OpenAI Agents framework, allowing visibility into agent reasoning, tool usage, and decision-making steps.

Installation

bash
pip install opentelemetry-instrumentation-openai-agents

Example usage

python
from opentelemetry.instrumentation.openai_agents import OpenAIAgentsInstrumentor

OpenAIAgentsInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-openai/README.md`)

OpenTelemetry OpenAI Instrumentation

This library allows tracing OpenAI prompts and completions sent with the official OpenAI library.

Installation

bash
pip install opentelemetry-instrumentation-openai

Example usage

python
from opentelemetry.instrumentation.openai import OpenAIInstrumentor

OpenAIInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-pinecone/README.md`)

OpenTelemetry Pinecone Instrumentation

This library allows tracing client-side calls to Pinecone vector DB sent with the official Pinecone library.

Installation

bash
pip install opentelemetry-instrumentation-pinecone

Example usage

python
from opentelemetry.instrumentation.pinecone import PineconeInstrumentor

PineconeInstrumentor().instrument()

Overview (`packages/opentelemetry-instrumentation-qdrant/README.md`)

OpenTelemetry Qdrant Instrumentation

This library allows tracing client-side calls to Qdrant vector DB sent with the official Qdrant client library.

Installation

bash
pip install opentelemetry-instrumentation-qdrant

Example usage

python
from opentelemetry.instrumentation.qdrant import QdrantInstrumentor

QdrantInstrumentor().instrument()

Overview (`packages/opentelemetry-instrumentation-replicate/README.md`)

OpenTelemetry Replicate Instrumentation

This library allows tracing Replicate prompts and image generation sent with the official replicate library.

Installation

bash
pip install opentelemetry-instrumentation-replicate

Example usage

python
from opentelemetry.instrumentation.replicate import ReplicateInstrumentor

ReplicateInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-sagemaker/README.md`)

OpenTelemetry SageMaker Instrumentation

This library allows tracing of any models deployed on Amazon SageMaker and invoked with Boto3 to SageMaker.

Installation

bash
pip install opentelemetry-instrumentation-sagemaker

Example usage

python
from opentelemetry.instrumentation.sagemaker import SageMakerInstrumentor

SageMakerInstrumentor().instrument()

Privacy

By default, this instrumentation logs SageMaker endpoint request bodies and responses to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-together/README.md`)

OpenTelemetry Together AI Instrumentation

This library allows tracing calls to any of Together AI's endpoints sent with the official Together AI Library.

Installation

bash
pip install opentelemetry-instrumentation-together

Example usage

python
from opentelemetry.instrumentation.together import TogetherAiInstrumentor

TogetherAiInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-transformers/README.md`)

OpenTelemetry HuggingFace Transformers Instrumentation

This library allows tracing texte generation calls sent with the official HuggingFace Transformers library.

Installation

bash
pip install opentelemetry-instrumentation-transformers

Example usage

python
from opentelemetry.instrumentation.transformers import TransformersInstrumentor

TransformersInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-vertexai/README.md`)

OpenTelemetry VertexAI Instrumentation

This library allows tracing VertexAI prompts and completions sent with the official VertexAI library.

Installation

bash
pip install opentelemetry-instrumentation-vertexai

Example usage

python
from opentelemetry.instrumentation.vertexai import VertexAIInstrumentor

VertexAIInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-instrumentation-voyageai/README.md`)

OpenTelemetry Voyage AI Instrumentation

This library allows tracing Voyage AI API calls with OpenTelemetry.

Installation

bash
pip install opentelemetry-instrumentation-voyageai

Usage

python
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)

Overview (`packages/opentelemetry-instrumentation-watsonx/README.md`)

OpenTelemetry IBM Watsonx Instrumentation

This library allows tracing IBM Watsonx prompts and completions sent with the official IBM Watson Machine Learning library and IBM watsonx.ai library.

Installation

bash
pip install opentelemetry-instrumentation-watsonx

Example usage

python
from opentelemetry.instrumentation.watsonx import WatsonxInstrumentor

WatsonxInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

SSL Issue

In case of SSL handshake issues (or similar ones) as follows:

text
E0423 17:04:25.197068000 6150713344 ssl_transport_security.cc:1420]    Handshake failed with fatal error SSL_ERROR_SSL: error:100000f7:SSL routines:OPENSSL_internal:WRONG_VERSION_NUMBER.

You can instruct the exporter with an environment variable to ignore SSL errors:

bash
OTEL_EXPORTER_OTLP_INSECURE=true

Overview (`packages/opentelemetry-instrumentation-weaviate/README.md`)

OpenTelemetry Weaviate Instrumentation

This library allows tracing client-side calls to Weaviate vector DB sent with the official Weaviate library.

Installation

bash
pip install opentelemetry-instrumentation-weaviate

Example usage

python
from opentelemetry.instrumentation.weaviate import WeaviateInstrumentor

WeaviateInstrumentor().instrument()

Overview (`packages/opentelemetry-instrumentation-writer/README.md`)

OpenTelemetry Writer Instrumentation

This library allows tracing calls to any of Writer's endpoints sent with the official Writer Python Library.

Installation

bash
pip install opentelemetry-instrumentation-writer

Example usage

python
from opentelemetry.instrumentation.writer import WriterInstrumentor

WriterInstrumentor().instrument()

Privacy

By default, this instrumentation logs prompts, completions, and embeddings to span attributes. This gives you a clear visibility into how your LLM application is working, and can make it easy to debug and evaluate the quality of the outputs.

However, you may want to disable this logging for privacy reasons, as they may contain highly sensitive data from your users. You may also simply want to reduce the size of your traces.

To disable logging, set the TRACELOOP_TRACE_CONTENT environment variable to false.

bash
TRACELOOP_TRACE_CONTENT=false

Overview (`packages/opentelemetry-semantic-conventions-ai/README.md`)

OpenTelemetry Semantic Conventions extensions for gen-AI applications

This is an extension of the standard OpenTelemetry Semantic Conventions for gen AI applications. It defines additional attributes for spans that are useful for debugging and monitoring prompts, completions, token usage, etc.


Overview (`packages/traceloop-sdk/README.md`)

traceloop-sdk

Traceloopโ€™s Python SDK allows you to easily start monitoring and debugging your LLM execution. Tracing is done in a non-intrusive way, built on top of OpenTelemetry. You can choose to export the traces to Traceloop, or to your existing observability stack.

python
Traceloop.init(app_name="joke_generation_service")

@workflow(name="joke_creation")
def create_joke():
    completion = openai.ChatCompletion.create(
        model="gpt-3.5-turbo",
        messages=[{"role": "user", "content": "Tell me a joke about opentelemetry"}],
    )

    return completion.choices[0].message.content

--- METRICS ---