skillfed

opentelemetry-instrumentation-openai-agents-v2

OpenTelemetry OpenAI Agents instrumentation (barebones)

opentelemetry-instrumentation-openai-agents-v2 v0.1.0 2.9M downloads/30d#2,839 on PyPI1,086
Permissive license Apache-2.0 Active released

What it is and what it does

This package is an OpenTelemetry instrumentation for OpenAI Agents v2 applications. It automatically intercepts calls to the OpenAI Agents v2 library and emits telemetry data—traces and metrics—without requiring you to modify your application code. The instrumentation integrates with the OpenTelemetry API and semantic conventions, allowing you to export telemetry to any backend that accepts OpenTelemetry data (Jaeger, Datadog, New Relic, etc.).

The package is part of the OpenTelemetry Python contrib repository and is currently in alpha status. It depends on opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions, and opentelemetry-util-genai. Installation is straightforward, and the instrumentation is activated by calling the instrument() method. Because it is alpha, the API and captured signals may change; production use should be evaluated carefully.

Use it for:

  • Enable distributed tracing across OpenAI Agents v2 applications to track request flow and latency.
  • Collect metrics on OpenAI Agents v2 API calls for monitoring and alerting in observability platforms.
  • Debug OpenAI Agents v2 behavior by examining detailed traces of internal operations and dependencies.
  • Correlate OpenAI Agents v2 telemetry with other services in a microservices architecture.
  • Audit and log interactions with OpenAI Agents v2 for compliance and troubleshooting.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Automatically captures telemetry data from OpenAI Agents v2 applications, integrating with OpenTelemetry to emit traces and metrics without requiring manual instrumentation.

Yes, if you are already using OpenTelemetry and need observability into OpenAI Agents v2 applications. The low install friction and permissive license make adoption straightforward. However, the alpha status means the instrumentation is still evolving; verify that it captures the telemetry signals you need and test thoroughly before relying on it in production. No known vulnerabilities.

Install

opentelemetry-instrumentation-openai-agents-v2 on PyPI

pip

pip install opentelemetry-instrumentation-openai-agents-v2

uv

uv add opentelemetry-instrumentation-openai-agents-v2

poetry

poetry add opentelemetry-instrumentation-openai-agents-v2

Installing opentelemetry-instrumentation-openai-agents-v2

Before you install

Low install friction with a pure-Python wheel. The package is actively maintained within the OpenTelemetry Python contrib repository and carries alpha status, meaning it is still evolving; use in production environments should be approached with caution.

License in practice

Licensed under Apache-2.0 (permissive), allowing use in most commercial and open-source projects without significant restrictions.

Quickstart

pip install opentelemetry-instrumentation-openai-agents-v2

from opentelemetry.instrumentation.openai_agents_v2 import OpenAIAgentsInstrumentor

OpenAIAgentsInstrumentor().instrument()

Requires Python 3.9 or later. An OpenTelemetry SDK and exporter must be configured separately to actually emit telemetry data.

Verify before relying

  • Whether this instrumentation supports all versions of OpenAI Agents v2 or only specific releases.
  • What specific telemetry signals (traces, metrics, logs) are captured and their semantic convention status.
  • Performance overhead when instrumentation is active in production workloads.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.9)
Install friction low — pure-Python wheel
Runtime dependencies 4 — opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions, opentelemetry-util-genai
Maintenance actively maintained — 303 days since the last release
Last repo commit
First released
Downloads 2,890,832/month — #2,839 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: opentelemetry_instrumentation_openai_agents_v2-0.1.0-py3-none-any.whl

Development Status :: 3 - AlphaIntended 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.9

Tags

opentelemetry instrumentation openai agentsauto-instrumentation openai agents v2otel tracing openai agentsopenai agents telemetrydistributed tracing openaiobservability openai agentsopentelemetry genai instrumentation
observabilityopentelemetrygenai-instrumentation

More Monitoring packages

tqdm

Wraps any iterable to display a real-time…

copyleft · top 100 on PyPI

opentelemetry-semantic-conventions

Provides generated Python code for…

permissive · top 100 on PyPI

opentelemetry-sdk

Provides the reference implementation of the…

permissive · top 100 on PyPI

opentelemetry-api

Provides the abstract API and interfaces for…

permissive · top 100 on PyPI

opentelemetry-exporter-otlp-proto-http

Exports OpenTelemetry observability data to an…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation

Provides automatic instrumentation commands and…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation-openai-v2

Automatically traces and logs OpenAI API calls…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-openai-agents

Adds distributed tracing to OpenAI Agents…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-fastapi

Automatically instruments FastAPI applications…

permissive · top 1,000 on PyPI

opentelemetry-distro

Provides a Python distribution package for…

permissive · top 1,000 on PyPI

opentelemetry-instrumentation-starlette

Adds automatic tracing and observability…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-openai

Captures traces of OpenAI API calls (prompts,…

permissive · top 5,000 on PyPI

opentelemetry-semantic-conventions-ai

Provides OpenTelemetry semantic conventions and…

permissive · top 1,000 on PyPI

iterative-telemetry

Sends anonymized telemetry data from Iterative…

permissive · top 5,000 on PyPI