All the instrumentations are provided as standard OpenTelemetry instrumentations so you can use them directly if you’re
already using OpenTelemetry.
Installation
Install the appropriate packages for the modules you want to use.
LLM Foundation Models
| Provider | PyPi Package Name |
|---|
| OpenAI | opentelemetry-instrumentation-openai |
| Anthropic | opentelemetry-instrumentation-anthropic |
| Bedrock | opentelemetry-instrumentation-bedrock |
| Cohere | opentelemetry-instrumentation-cohere |
Vector DBs
| Vector DB | PyPi Package Name |
|---|
| Chroma | opentelemetry-instrumentation-chromadb |
| Pinecone | opentelemetry-instrumentation-pinecone |
LLM Frameworks
| Framework | PyPi Package Name |
|---|
| Haystack | opentelemetry-instrumentation-haystack |
| Langchain | opentelemetry-instrumentation-langchain |
| LlamaIndex | opentelemetry-instrumentation-llamaindex |
Usage
Instantiate the instrumentations you want to use and call instrument() to register them with OpenTelemetry.
For example, to use the OpenAI instrumentation:
from opentelemetry.instrumentation.openai import OpenAIInstrumentor
OpenAIInstrumentor().instrument()
If you’re setting OpenTelemetry’s TracerProvider manually, make sure to do
this before calling instrument().