Skip to content

Commit e15d443

Browse files
committed
remove async support from StreamWrapper until further notice
1 parent bb97ec9 commit e15d443

File tree

1 file changed

+0
-19
lines changed
  • instrumentation/opentelemetry-instrumentation-openai/src/opentelemetry/instrumentation/openai

1 file changed

+0
-19
lines changed

Diff for: instrumentation/opentelemetry-instrumentation-openai/src/opentelemetry/instrumentation/openai/patch.py

-19
Original file line numberDiff line numberDiff line change
@@ -366,13 +366,6 @@ def __enter__(self):
366366
def __exit__(self, exc_type, exc_val, exc_tb):
367367
self.cleanup()
368368

369-
async def __aenter__(self):
370-
self.setup()
371-
return self
372-
373-
async def __aexit__(self, exc_type, exc_val, exc_tb):
374-
self.cleanup()
375-
376369
def __iter__(self):
377370
return self
378371

@@ -385,18 +378,6 @@ def __next__(self):
385378
self.cleanup()
386379
raise
387380

388-
def __aiter__(self):
389-
return self
390-
391-
async def __anext__(self):
392-
try:
393-
chunk = await self.stream.__anext__()
394-
self.process_chunk(chunk)
395-
return chunk
396-
except StopAsyncIteration:
397-
self.cleanup()
398-
raise StopAsyncIteration
399-
400381
def process_chunk(self, chunk):
401382
if hasattr(chunk, "model") and chunk.model is not None:
402383
set_span_attribute(

0 commit comments

Comments
 (0)