Feature: Instrument OpenAI's new Responses API #2782
- [ ] I have added tests that cover my changes.
- [ ] If adding a new instrumentation or changing an existing one, I've added screenshots from some observability platform showing the change.
- [x] PR name follows conventional commits format:
feat(instrumentation): ...orfix(instrumentation): .... - [ ] (If applicable) I have updated the documentation accordingly.
[!IMPORTANT] Add
responses_retrieve_wrapperfor OpenAI response retrieval and enhance tracing inassistant_wrappers.py.
- Behavior:
- Add
responses_retrieve_wrapperto handleResponses.retrievein__init__.pyandassistant_wrappers.py.- Update
messages_list_wrapperto includeLLM_SYSTEMandLLM_USAGE_PROMPT_TOKENSattributes.- Modify
runs_create_wrapperto storerun_idinrunsdictionary.- Instrumentation:
- Add span attributes for response ID and content in
responses_retrieve_wrapper.- Update
messages_list_wrapperto handle message roles and content more precisely.- Misc:
- Rename index variables in
messages_list_wrapperfor clarity.This description was created by
for c8858fa584a2eb3bb109300044d7d03bdd50aa71. It will automatically update as commits are pushed.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Hey @tongyu0924 are you working on this still or we can pick it up and continue? (cc @dinmukhamedm)
Hey @tongyu0924 are you working on this still or we can pick it up and continue? (cc @dinmukhamedm)
Thanks for checking @nirga ! I haven’t had time to continue – feel free to pick it up and go ahead.
Achieved partially in #3052