open-telemetry / open-telemetry/opentelemetry-python-contrib
Realtime support for OpenAI Agents SDK
Nobody has claimed this yet.
- 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:
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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