Skip to main content

OpenAI Agents OpenTelemetry Integration

Overview

This integration provides support for using OpenTelemetry with the OpenAI Agents framework. It enables tracing and monitoring of applications built with OpenAI Agents.

Installation

  1. Install traceAI OpenAI Agents
pip install traceAI-openai-agents

Set Environment Variables

Set up your environment variables to authenticate with FutureAGI

import os

os.environ["FI_API_KEY"] = FI_API_KEY
os.environ["FI_SECRET_KEY"] = FI_SECRET_KEY

Quickstart

Register Tracer Provider

Set up the trace provider to establish the observability pipeline. The trace provider:

from fi_instrumentation import register
from fi_instrumentation.fi_types import ProjectType

trace_provider = register(
    project_type=ProjectType.OBSERVE,
    project_name="openai_agents_app"
)

Configure OpenAI Agents Instrumentation

Instrument the OpenAI Agents client to enable telemetry collection. This step ensures that all interactions with the OpenAI Agents SDK are tracked and monitored.

from traceai_openai_agents import OpenAIAgentsInstrumentor

OpenAIAgentsInstrumentor().instrument(tracer_provider=trace_provider)

Create OpenAI Agents Components

Set up your OpenAI Agents client with built-in observability.

from agents import Agent, Runner

agent = Agent(name="Assistant", instructions="You are a helpful assistant")
result = Runner.run_sync(agent, "Write a haiku about recursion in programming.")

print(result.final_output)

Metadata

Release files for traceAI-openai-agents 0.1.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for traceAI-openai-agents 0.1.6
File Size Uploaded
traceai_openai_agents-0.1.6.tar.gz 8.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for traceAI-openai-agents 0.1.6
File Interpreter ABI Platform
traceai_openai_agents-0.1.6-py3-none-any.whl Python 3 none any Details

Total release size: 17.7 kB

Release files / traceai_openai_agents-0.1.6.tar.gz

Download URL traceai_openai_agents-0.1.6.tar.gz
Size 8.4 kB
Tags Source
SHA-256 checksum
How to use checksums
da43179bb2334c57355b5846a69e10873f7bb0f4787495fd34a46d4c9b0c2adc
BLAKE2b-256 checksum
How to use checksums
df04a06587800da3a5d4233e5a660c27d07e0e579bf9c90ec5e9b25c863a15a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / traceai_openai_agents-0.1.6-py3-none-any.whl

Download URL traceai_openai_agents-0.1.6-py3-none-any.whl
Size 9.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b2edfd701f8908807a70dc1590fa1663ea4cbacc13e7b69334fd1e63505aa164
BLAKE2b-256 checksum
How to use checksums
a597464dcf5ab0fa92f3faec268b9a833f93aa5fa92f839623f141fc25912a51
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.1.6 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

3 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page