skillfed

opentelemetry-instrumentation-openai-agents

OpenTelemetry OpenAI Agents instrumentation

opentelemetry-instrumentation-openai-agents v0.62.3 2.5M downloads/30d#3,051 on PyPI7,377
Permissive license Apache-2.0 Active released

What it is and what it does

This package is an OpenTelemetry instrumentation plugin that automatically captures traces from OpenAI Agents workflows. When enabled, it records agent reasoning steps, tool invocations, and decision-making as spans that flow into your observability backend, giving you visibility into how agents behave without modifying your agent code.

It ships with privacy controls: by default it logs prompts, completions, and embeddings to span attributes for debugging, but you can disable this via the TRACELOOP_TRACE_CONTENT environment variable if your data is sensitive. The package depends on the core OpenTelemetry API and instrumentation framework, plus AI-specific semantic conventions, and installs with low friction as a pure Python wheel.

Use it for:

  • Debug agent behavior by inspecting tool calls, reasoning steps, and LLM interactions in your observability platform.
  • Monitor production agent workflows to detect failures, latency spikes, or unexpected tool usage patterns.
  • Correlate agent traces with upstream requests and downstream services using OpenTelemetry's distributed tracing.
  • Evaluate agent quality by analyzing prompts and completions in traces without modifying agent code.
  • Reduce trace data size by disabling content logging in privacy-sensitive environments.

Worth the install?

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

Adds distributed tracing to OpenAI Agents workflows, capturing agent reasoning, tool calls, and decision steps as OpenTelemetry spans for observability and debugging.

Yes, if you run OpenAI Agents in production or development and use OpenTelemetry for observability. The package is actively maintained, has no known vulnerabilities, installs cleanly, and solves a real problem—agent workflows are otherwise a black box. The privacy controls are essential if you handle sensitive user data. Install it if you already have an OpenTelemetry backend; skip it if you have no observability infrastructure.

Install

opentelemetry-instrumentation-openai-agents on PyPI

pip

pip install opentelemetry-instrumentation-openai-agents

uv

uv add opentelemetry-instrumentation-openai-agents

poetry

poetry add opentelemetry-instrumentation-openai-agents

Installing opentelemetry-instrumentation-openai-agents

Before you install

Low friction: pure Python wheel with four runtime dependencies on established OpenTelemetry packages. Actively maintained with a release 4 days old and no known vulnerabilities.

License in practice

Apache-2.0 permissive license allows use in most commercial and open-source projects without significant restriction.

Quickstart

pip install opentelemetry-instrumentation-openai-agents

from opentelemetry.instrumentation.openai_agents import OpenAIAgentsInstrumentor

OpenAIAgentsInstrumentor().instrument()

Requires Python 3.10 or later; requires an OpenTelemetry tracer backend already configured to receive spans.

Verify before relying

  • Whether this instrumentation works with all OpenAI Agents framework versions or has specific version constraints.
  • Performance overhead of instrumentation on agent execution latency and span volume.
  • Whether TRACELOOP_TRACE_CONTENT=false fully redacts sensitive data or only disables logging to span attributes.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (<4,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 4 — opentelemetry-api, opentelemetry-instrumentation, opentelemetry-semantic-conventions-ai, opentelemetry-semantic-conventions
Maintenance actively maintained — 4 days since the last release
Last repo commit
First released
Downloads 2,468,996/month — #3,051 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-0.62.3-py3-none-any.whl

Tags

openai agents tracingopentelemetry instrumentationagentic workflow observabilityllm agent monitoringdistributed tracing for agentsopenai agents debuggingspan instrumentation
observabilityopenai-agentstracing

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

microsoft-agents-a365-observability-core

Provides OpenTelemetry-based telemetry,…

permissive · top 15,000 on PyPI

opentelemetry-instrumentation-crewai

Adds OpenTelemetry tracing to crewAI agentic…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-mcp

Adds distributed tracing to MCP (Model Context…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-openai

Captures traces of OpenAI API calls (prompts,…

permissive · top 5,000 on PyPI

opentelemetry-instrumentation-openai-agents-v2

Automatically captures telemetry data from…

permissive · top 5,000 on PyPI

agentops

AgentOps provides observability and monitoring…

permissive · top 15,000 on PyPI

mlflow-tracing

Instrument GenAI applications with distributed…

permissive · top 1,000 on PyPI

raindrop-ai

Instrument LLM applications with event tracking…

permissive · top 15,000 on PyPI

judgeval

Judgeval is an SDK for tracing and evaluating…

permissive · top 15,000 on PyPI

openai-agents

A framework for building multi-agent LLM…

permissive · top 1,000 on PyPI

Further reading