--- id: opentelemetry-instrumentation-openai-agents-v2 version: "0.1.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # opentelemetry-instrumentation-openai-agents-v2 — OpenTelemetry OpenAI Agents instrumentation (barebones) License: permissive · Maintenance: active · Downloads: 2.9M/mo ## 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 above — 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 pip install opentelemetry-instrumentation-openai-agents-v2 uv add opentelemetry-instrumentation-openai-agents-v2 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_current - Install friction: low - Maintenance: active - Downloads: 2.9M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags opentelemetry instrumentation openai agents, auto-instrumentation openai agents v2, otel tracing openai agents, openai agents telemetry, distributed tracing openai, observability openai agents, opentelemetry genai instrumentation, observability, opentelemetry, genai-instrumentation [View on SkillFed](https://skillfed.io/packages/opentelemetry-instrumentation-openai-agents-v2) · [View on PyPI](https://pypi.org/project/opentelemetry-instrumentation-openai-agents-v2/)