open-telemetry / open-telemetry/opentelemetry-python-contrib

Realtime support for OpenAI Agents SDK

Open
#4,470 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
Python
Stars
1.1k
Forks
1.1k
Avg merge
4d 15h
Merged PRs (30d)
16

Description

What problem do you want to solve?

There is currently no OpenTelemetry instrumentation for OpenAI's RealtimeAgent for the openai-agents-sdk. The existing opentelemetry-instrumentation-openai-v2 covers the REST-based Chat Completions API, but the Realtime API has a fundamentally different event-driven lifecycle (persistent sessions, streamed audio deltas, server-side VAD, real-time function calling) that the current instrumentation cannot capture.

Without instrumentation, developers building real-time voice agents have no standardized way to observe session latency, token consumption, tool execution, or error rates — all of which are critical for production reliability.

Describe the solution you'd like

I'd like suggest to extend the opentelemetry-instrumentation-openai-v2 package to also cover the RealtimeAgent use-cases. One way would be to provides a bare-minimum, semantic-convention-compliant listener for the OpenAI Realtime API, which would result in a trace similar to the below example trace:

Image
Describe alternatives you've considered

No response

Additional Context

No response

Would you like to implement a fix?

Yes

Tip

React with 👍 to help prioritize this issue. Please use comments to provide useful context, avoiding +1 or me too, to help us triage it. Learn more here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the opentelemetry-instrumentation-openai-v2 package and its existing REST-based Chat Completions coverage. Compare that instrumentation with the OpenAI RealtimeAgent lifecycle described here, including persistent sessions, streamed audio deltas, server-side VAD, and real-time function calling. Done means a minimal semantic-convention-compliant listener that exposes session latency, token consumption, tool execution, and error rates.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
ai, observability-sre
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.