$npx skillfedfor your agent

openinference-instrumentation-openai

OpenInference OpenAI Instrumentation

Worth itPyPI MonitoringReleased Aug 20262.2M downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — openinference_instrumentation_openai-0.1.54-py3-none-any.whl
v0.1.54 · released 2026-08-07 · Python <3.15,>=3.10 · 7 runtime deps: openinference-instrumentation, openinference-semantic-conventions, opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions, typing-extensions, wrapt

Yes. This is a lightweight, actively maintained instrumentation library with no known vulnerabilities, permissive licensing, and low install friction. Install it if you use OpenAI's Python SDK and want to observe LLM calls via OpenTelemetry—it requires minimal setup and integrates cleanly with existing observability stacks.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires OPENAI_API_KEY environment variable to authenticate with OpenAI API; an OpenTelemetry collector must be running at the configured endpoint to receive traces.
  • Low friction installation with a pure Python wheel.
  • Active maintenance—released 7 days ago with a stable codebase (1147 GitHub stars).

License · maintenance · safety

Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions.

last release 2026-08-07 (7 days) · last repo commit 2026-08-14 · 1,147 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 2,199,804 downloads/mo, #3,214 on PyPI

Verify before relying

from openinference.instrumentation.openai import OpenAIInstrumentor
from opentelemetry.sdk import trace as trace_sdk
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.trace.export import SimpleSpanProcessor

tracer_provider = trace_sdk.TracerProvider()
tracer_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter("http://127.0.0.1:6006/v1/traces")))
OpenAIInstrumentor().instrument(tracer_provider=tracer_provider)
  • Whether instrumentation overhead is negligible for high-throughput production workloads.
  • Compatibility with OpenAI SDK versions prior to 1.26 for non-streaming use cases.
  • Support for async OpenAI client methods beyond the synchronous example shown.
Same gist for agents: .md · .json

What it is and what it does

This package wraps OpenAI Python SDK calls with OpenTelemetry instrumentation, capturing detailed traces of each API interaction without requiring code changes to your OpenAI calls. The traces are emitted in OpenTelemetry format and can be sent to any compatible collector for visualization and analysis.

It works by installing an OpenAIInstrumentor that hooks into the SDK at runtime. You configure a tracer provider with span processors and call instrument() once; thereafter, all OpenAI client calls automatically generate spans. The package depends on opentelemetry-api, opentelemetry-instrumentation, and openinference-semantic-conventions to standardize span attributes.

Use it for

  • Debug LLM application behavior by viewing detailed traces of each OpenAI API call.
  • Monitor token usage and latency across production OpenAI calls for cost and performance analysis.
  • Correlate OpenAI calls with upstream application logic using OpenTelemetry's distributed tracing context.
  • Audit and log all LLM interactions for compliance or troubleshooting without modifying application code.
  • Integrate LLM observability into existing OpenTelemetry infrastructure.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

This is a lightweight, actively maintained instrumentation library with no known vulnerabilities, permissive licensing, and low install friction. Install it if you use OpenAI's Python SDK and want to observe LLM calls via OpenTelemetry—it requires minimal setup and integrates cleanly with existing observability stacks.

Install

openinference-instrumentation-openai on PyPI

Before you install

Low friction installation with a pure Python wheel. Active maintenance—released 7 days ago with a stable codebase (1147 GitHub stars). Supports current Python versions (3.10–3.14).

Requires OPENAI_API_KEY environment variable to authenticate with OpenAI API; an OpenTelemetry collector must be running at the configured endpoint to receive traces.

License in practice

Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions.

Quickstart

from openinference.instrumentation.openai import OpenAIInstrumentor
from opentelemetry.sdk import trace as trace_sdk
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.trace.export import SimpleSpanProcessor

tracer_provider = trace_sdk.TracerProvider()
tracer_provider.add_span_processor(SimpleSpanProcessor(OTLPSpanExporter("http://127.0.0.1:6006/v1/traces")))
OpenAIInstrumentor().instrument(tracer_provider=tracer_provider)

Verify before relying

  • Whether instrumentation overhead is negligible for high-throughput production workloads.
  • Compatibility with OpenAI SDK versions prior to 1.26 for non-streaming use cases.
  • Support for async OpenAI client methods beyond the synchronous example shown.

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release <3.15,>=3.10
Install frictionLow. Pure-Python wheel
Runtime dependencies
7 packages
openinference-instrumentationopeninference-semantic-conventionsopentelemetry-apiopentelemetry-instrumentationopentelemetry-semantic-conventionstyping-extensionswrapt
MaintenanceActively maintained 7 days since the last release
Last repo commit
First released
Downloads2,199,804 / month, #3,214 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14

Evidence: openinference_instrumentation_openai-0.1.54-py3-none-any.whl

Tags

Capabilities
openai tracing instrumentationllm observability opentelemetryopenai api monitoring tracesopentelemetry openai integrationai call tracing and debuggingopenai span collectionllm request tracking
Topics
llm-observabilityopentelemetrytracing

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “openai api monitoring traces”

Give your agent the search over MCP, or paste the wish link into any chat.

More Monitoring packages

tqdm Worth it
PyPI · Libraries · released Jul 2026

Wraps any iterable to display a real-time progress bar in the terminal or Jupyter notebook, showing iteration count, elapsed time, and estimated time remaining.

copyleftpure Python · 3.8+
648.6Mdownloads / mo
opentelemetry-semantic-conventions Worth it
PyPI · Monitoring · released Jul 2026

Provides generated Python code for OpenTelemetry semantic conventions, enabling standardized attribute naming and constant definitions for instrumentation and telemetry collection.

Install it if you are using OpenTelemetry and want to follow semantic conventions correctly.

Apache-2.0pure Python · 3.10+
542.9Mdownloads / mo
opentelemetry-sdk Worth it
PyPI · Monitoring · released Jul 2026

Provides the reference implementation of the OpenTelemetry API for collecting and exporting traces, metrics, and logs from Python applications.

Apache-2.0pure Python · 3.10+
521.8Mdownloads / mo
opentelemetry-api With conditions
PyPI · Monitoring · released Jul 2026

Provides the abstract API and interfaces for OpenTelemetry instrumentation in Python, defining how to emit traces, metrics, and logs without tying code to a specific SDK implementation.

Apache-2.0pure Python · 3.10+
463.8Mdownloads / mo
opentelemetry-exporter-otlp-proto-http Worth it
PyPI · Monitoring · released Jul 2026

Exports OpenTelemetry observability data to an OpenTelemetry Collector using Protobuf-encoded messages over HTTP.

Install it if you are using OpenTelemetry in Python and need to send data to a Collector over HTTP.

Apache-2.0pure Python · 3.10+
409.9Mdownloads / mo
opentelemetry-instrumentation Worth it
PyPI · Monitoring · released Jul 2026

Provides automatic instrumentation commands and programmatic APIs to inject distributed tracing into Python applications without code changes, detecting and instrumenting packages used by your program.

Install it if you need distributed tracing without code changes and have compatible instrumented packages in your environment.

Apache-2.0pure Python · 3.10+
393.5Mdownloads / mo

See also langwatch · openinference-instrumentation · openinference-instrumentation-agno · openinference-instrumentation-google-genai · openinference-instrumentation-langchain · openinference-instrumentation-mcp · openinference-instrumentation-openai-agents · openinference-instrumentation-portkey · openinference-instrumentation-claude-agent-sdk · openinference-semantic-conventions