Skip to content

Fix OpenTelemetry exporter examples in the openai_agents README - #1850

Open
DABH wants to merge 1 commit into
mainfrom
openai-agents-readme-otel-exporters
Open

Fix OpenTelemetry exporter examples in the openai_agents README#1850
DABH wants to merge 1 commit into
mainfrom
openai-agents-readme-otel-exporters

Conversation

@DABH

@DABH DABH commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

The "Example: Multiple Exporters" snippet in the OpenAI Agents README called create_tracer_provider(exporters=...), but create_tracer_provider has no exporters parameter. It also imported ConsoleSpanExporter from opentelemetry.exporter.console, which does not exist, and the dependency list told readers to pip install opentelemetry-exporter-console, which is not a package. All three fail on copy-paste.

The example now creates the provider and adds one BatchSpanProcessor per exporter, imports ConsoleSpanExporter from opentelemetry.sdk.trace.export, and the dependency list notes that the console exporter ships with opentelemetry-sdk.

Docs-only change; no code or tests affected.

@DABH
DABH requested review from a team as code owners September 11, 2026 05:11
pip install opentelemetry-exporter-<your-system>
```

`ConsoleSpanExporter` (development/debugging) ships with `opentelemetry-sdk`, so it needs no extra package.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Do we need this comment? The code snippet below shows this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants