opentelemetry-instrumentation-openai-agents
OpenTelemetry OpenAI Agents instrumentation
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-agentsuv
uv add opentelemetry-instrumentation-openai-agentspoetry
poetry add opentelemetry-instrumentation-openai-agentsInstalling 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
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
microsoft-agents-a365-observability-coreProvides OpenTelemetry-based telemetry,…
permissive · top 15,000 on PyPI
opentelemetry-instrumentation-crewaiAdds OpenTelemetry tracing to crewAI agentic…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-mcpAdds distributed tracing to MCP (Model Context…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-openaiCaptures traces of OpenAI API calls (prompts,…
permissive · top 5,000 on PyPI
opentelemetry-instrumentation-openai-agents-v2Automatically captures telemetry data from…
permissive · top 5,000 on PyPI
agentopsAgentOps provides observability and monitoring…
permissive · top 15,000 on PyPI
mlflow-tracingInstrument GenAI applications with distributed…
permissive · top 1,000 on PyPI
raindrop-aiInstrument LLM applications with event tracking…
permissive · top 15,000 on PyPI
judgevalJudgeval is an SDK for tracing and evaluating…
permissive · top 15,000 on PyPI
openai-agentsA framework for building multi-agent LLM…
permissive · top 1,000 on PyPI