Based on feedback from #82, follow up and a better long term solution is to add instrumentation support for the LegacyAPIResponse.parse method, instead of instrument the parse method on the StreamWrapper itself.
This will avoid returning the wrapper for the with_raw_response API calls and aligns more with the flow within the library itself and reduces abstraction leakage on the instrumented StreamWrapper.
Acceptance Criteria:
Based on feedback from #82, follow up and a better long term solution is to add instrumentation support for the
LegacyAPIResponse.parsemethod, instead of instrument theparsemethod on theStreamWrapperitself.This will avoid returning the wrapper for the
with_raw_responseAPI calls and aligns more with the flow within the library itself and reduces abstraction leakage on the instrumented StreamWrapper.Acceptance Criteria:
LegacyAPIResponse.parseinstrumentationparseinstrumentation added as part of openai: Fix missing parse attribute on StreamWrapper #82