Technical Documentation: traceloop/openllmetry
โน๏ธ Provenance: Multi-Tier Ingestion ยท CodeWiki Reference
Overview (`README.md`)
[**Get started ยป**](https://traceloop.com/docs/openllmetry/getting-started-python)
[](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:
pip install traceloop-sdkThen, to start instrumenting your code, just add this line to your code:
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:
Traceloop.init(disable_batch=True)โซ Supported (and tested) destinations
- โ Traceloop
- โ Axiom
- โ Azure Application Insights
- โ Braintrust
- โ Dash0
- โ Datadog
- โ Dynatrace
- โ Google Cloud
- โ Grafana
- โ Highlight
- โ Honeycomb
- โ HyperDX
- โ IBM Instana
- โ KloudMate
- โ Laminar
- โ New Relic
- โ OpenTelemetry Collector
- โ Oracle Cloud
- โ Scorecard
- โ Service Now Cloud Observability
- โ SigNoz
- โ Sentry
- โ Splunk
- โ Tencent Cloud
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.
- โ Aleph Alpha
- โ Anthropic
- โ Bedrock (AWS)
- โ Cohere
- โ Google Generative AI (Gemini)
- โ Groq
- โ HuggingFace
- โ IBM Watsonx AI
- โ Mistral AI
- โ Ollama
- โ OpenAI / Azure OpenAI
- โ Replicate
- โ SageMaker (AWS)
- โ Together AI
- โ Vertex AI (GCP)
- โ WRITER
Vector DBs
Frameworks
- โ Agno
- โ AWS Strands (built-in OTEL support)
- โ CrewAI
- โ Haystack
- โ LangChain
- โ Langflow
- โ LangGraph
- โ LiteLLM
- โ LlamaIndex
- โ OpenAI Agents
Protocol
- โ MCP
๐ 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:
- Book a free pairing session with one of our teammates!
- Join our Slack, and ask us any questions there.
๐ 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
pip install opentelemetry-instrumentation-agnoUsage
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
Links
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
pip install opentelemetry-instrumentation-alephalphaExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`packages/opentelemetry-instrumentation-anthropic/README.md`)
OpenTelemetry Anthropic Instrumentation
This library allows tracing Anthropic prompts and completions sent with the official Anthropic library.
Installation
pip install opentelemetry-instrumentation-anthropicExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`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
pip install opentelemetry-instrumentation-bedrockExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`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
pip install opentelemetry-instrumentation-chromadbExample usage
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
pip install opentelemetry-instrumentation-cohereExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`packages/opentelemetry-instrumentation-crewai/README.md`)
OpenTelemetry CrewAI Instrumentation
This library allows tracing agentic workflows implemented with crewAI framework crewAI library.
Installation
pip install opentelemetry-instrumentation-crewaiExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`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
pip install opentelemetry-instrumentation-google-generativeaiExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`packages/opentelemetry-instrumentation-groq/README.md`)
OpenTelemetry Groq Instrumentation
This library allows tracing Groq prompts and completions sent with the official Groq SDK.
Installation
pip install opentelemetry-instrumentation-groqExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`packages/opentelemetry-instrumentation-haystack/README.md`)
OpenTelemetry Haystack Instrumentation
This library allows tracing complete LLM applications built with Haystack.
Installation
pip install opentelemetry-instrumentation-haystackExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`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
pip install opentelemetry-instrumentation-lancedbExample usage
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
pip install opentelemetry-instrumentation-langchainExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`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
pip install opentelemetry-instrumentation-litellmExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`packages/opentelemetry-instrumentation-llamaindex/README.md`)
OpenTelemetry LlamaIndex Instrumentation
This library allows tracing complete LLM applications built with LlamaIndex.
Installation
pip install opentelemetry-instrumentation-llamaindexExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`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
pip install opentelemetry-instrumentation-marqoExample usage
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
pip install opentelemetry-instrumentation-mcpExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`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
pip install opentelemetry-instrumentation-milvusExample usage
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
pip install opentelemetry-instrumentation-mistralaiExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`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
pip install opentelemetry-instrumentation-ollamaExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`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
pip install opentelemetry-instrumentation-openai-agentsExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`packages/opentelemetry-instrumentation-openai/README.md`)
OpenTelemetry OpenAI Instrumentation
This library allows tracing OpenAI prompts and completions sent with the official OpenAI library.
Installation
pip install opentelemetry-instrumentation-openaiExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`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
pip install opentelemetry-instrumentation-pineconeExample usage
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
pip install opentelemetry-instrumentation-qdrantExample usage
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
pip install opentelemetry-instrumentation-replicateExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`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
pip install opentelemetry-instrumentation-sagemakerExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`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
pip install opentelemetry-instrumentation-togetherExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`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
pip install opentelemetry-instrumentation-transformersExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`packages/opentelemetry-instrumentation-vertexai/README.md`)
OpenTelemetry VertexAI Instrumentation
This library allows tracing VertexAI prompts and completions sent with the official VertexAI library.
Installation
pip install opentelemetry-instrumentation-vertexaiExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`packages/opentelemetry-instrumentation-voyageai/README.md`)
OpenTelemetry Voyage AI Instrumentation
This library allows tracing Voyage AI API calls with OpenTelemetry.
Installation
pip install opentelemetry-instrumentation-voyageaiUsage
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 namegen_ai.usage.input_tokens: Token count from the responsegen_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
pip install opentelemetry-instrumentation-watsonxExample usage
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.
TRACELOOP_TRACE_CONTENT=falseSSL Issue
In case of SSL handshake issues (or similar ones) as follows:
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:
OTEL_EXPORTER_OTLP_INSECURE=trueOverview (`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
pip install opentelemetry-instrumentation-weaviateExample usage
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
pip install opentelemetry-instrumentation-writerExample usage
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.
TRACELOOP_TRACE_CONTENT=falseOverview (`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.
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 ---
- Files Extracted: 35
- Estimated Token Budget: ~11877 tokens
- Canonical Reference: https://codewiki.google/github.com/traceloop/openllmetry