elastic / elastic/elastic-otel-python-instrumentations

openai: Instrument LegacyAPIResponse.parse

Open
#83 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
0
Forks
8
PR merge metrics
No merged PRs in 30d

Description

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:
- Implement `LegacyAPIResponse.parse` instrumentation
- Remove `parse` instrumentation added as part of #82
- Ensure the existing tests are passsing.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.