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

ProviderPyPi Package Name
OpenAIopentelemetry-instrumentation-openai
Anthropicopentelemetry-instrumentation-anthropic
Bedrockopentelemetry-instrumentation-bedrock
Cohereopentelemetry-instrumentation-cohere

Vector DBs

Vector DBPyPi Package Name
Chromaopentelemetry-instrumentation-chromadb
Pineconeopentelemetry-instrumentation-pinecone

LLM Frameworks

FrameworkPyPi Package Name
Haystackopentelemetry-instrumentation-haystack
Langchainopentelemetry-instrumentation-langchain
LlamaIndexopentelemetry-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:

Python
from opentelemetry.instrumentation.openai import OpenAIInstrumentor

OpenAIInstrumentor().instrument()

If you’re setting OpenTelemetry’s TracerProvider manually, make sure to do this before calling instrument().