Skip to main content
OpenInference provides a comprehensive set of JavaScript/TypeScript packages for instrumenting AI/ML applications with OpenTelemetry.

Instrumentation Packages

These packages provide automatic instrumentation for popular AI SDKs and frameworks:

Core Packages

These packages provide foundational functionality for building instrumentations and working with OpenInference:

Installation

All packages are available via npm and can be installed using your preferred package manager:

Common Features

All OpenInference JavaScript instrumentations provide:
  • Automatic Tracing: Capture traces without modifying application code
  • OpenTelemetry Compatible: Works with standard OpenTelemetry infrastructure
  • Context Propagation: Automatically propagate session ID, user ID, metadata, and tags
  • Data Masking: Support for hiding sensitive inputs/outputs via trace configuration
  • Custom Tracer Providers: Ability to use non-global tracer providers
  • TypeScript Support: Full TypeScript type definitions included

Getting Started

Most instrumentations follow a similar pattern:
  1. Install the instrumentation package
  2. Create a tracer provider
  3. Register the instrumentation
  4. Use your AI SDK normally
Example:

Resources