[bot] OpenAI Realtime API (WebSocket) not instrumented
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- java
- Ambito
- api, observability
Direzione di ricerca
Inizia nel modulo openai_2_15_0 esaminando come TracingHttpClient avvolge HttpClient e come client.beta().realtime() stabilisce la connessione WebSocket. Individua un hook stabile di WebSocket o RealtimeClient, quindi determina come acquisire gli eventi e i delta della sessione. Il lavoro è completato quando le sessioni Realtime emettono uno span con il JSON di input/output e le metriche dei token disponibili, oppure quando la limitazione è documentata se non esiste alcun hook stabile.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Gap description
The openai-java SDK v2.15.0+ exposes a WebSocket-based Realtime API under client.beta().realtime(). The current instrumentation in openai_2_15_0 works by wrapping the SDK's HttpClient interface (execute / executeAsync), which only intercepts HTTP/HTTPS requests. WebSocket connections are established through a separate code path and are never passed through TracingHttpClient, so no span is created for any Realtime API session.
Affected surface
| SDK | API surface | Transport |
|---|---|---|
com.openai:openai-java:2.15.0+ |
client.beta().realtime() |
WebSocket (WSS) |
Why it matters
Realtime API sessions carry voice and text generation work that is billable and latency-sensitive — exactly the kind of LLM execution Braintrust is designed to observe. Without instrumentation, users see a complete blind spot for this API even when all other OpenAI calls are traced.
Analogous gap already tracked
Issue #120 tracks the same problem for the Google GenAI Live (streaming) API, which also uses a persistent bidirectional connection that bypasses the HTTP-layer hook.
Suggested approach
- Identify the WebSocket-abstraction interface in
openai-java(likelyWebSocketor aRealtimeClient). - Use ByteBuddy to intercept session open/message/close events, or wrap the WebSocket factory the same way
TracingHttpClientwrapsHttpClient. - Accumulate audio/text deltas and emit a span on session close with
braintrust.input_json/braintrust.output_jsonand token metrics where available.
Notes
- This gap exists only in the
openai_2_15_0module; no other provider currently wraps a WebSocket transport. - If the upstream SDK does not yet expose a stable hook point, a note in the docs would at minimum set user expectations.
- Lingua principale
- Java
- Stelle
- 21
- Fork
- 5
- Merge medio
- 2g 7h
- PR unite (30g)
- 8
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di braintrustdata/braintrust-sdk-java
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
Tutte le issue di braintrustdata/braintrust-sdk-java
Issue simili
-
executions.Query — startDate and timeRange filters are sent with inverted comparison operators Apertaarea/plugin
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
kestra-io/plugin-kestra#190 ·
-
litertlm-android AAR ships no consumer ProGuard rules → "mid == null" SIGABRT in minified apps Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
google-ai-edge/LiteRT-LM#3739 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
integra-team-red/meet-map#249 ·
-
[Studio][Bug] Cancelled create-user dialog keeps the password and admin switch for the next attempt Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
apache/rocketmq-dashboard#5064 ·