Skip to main content
OpenInference provides auto-instrumentation packages for popular AI/ML frameworks and LLM providers.

Available Instrumentations

Installation

Install any instrumentation package using pip:
For example:

Basic Usage Pattern

All instrumentations follow a similar pattern:

Example: OpenAI

Example: LangChain

Example: LlamaIndex

Features

All instrumentations provide:
  • Automatic span creation - Traces are created without code changes
  • OpenInference semantic conventions - Standardized attributes
  • Context propagation - Session, user, metadata, tags
  • TraceConfig support - Privacy and payload controls
  • Suppression support - Use suppress_tracing() to pause tracing
  • OpenTelemetry compatible - Works with any OTel collector

Testing

Instrumentations use pytest with VCR cassettes for testing:

Contributing

See the development guide for creating new instrumentations.

Resources