Closed otwieracz closed 3 weeks ago
Thank you @otwieracz. We'll look into it.
cc @Yun-Kim
I've updated the title to reflect most recent findings. This issue is not related to LangFuse in any way, but instead DataDog instrumentation changes the behaviour of AsyncOpenAI
client.
asyncio.TimeoutError
exception is correctly propagated
asyncio.TimeoutError
is consumed and None
is returned - which is not a valid response from
None
is not a valid instance of ChatCompletion
. This breaks OpenAI's typing contract:
Summary of problem
When instrumented with DataDog's
patch_all()
orddtrace-run
, LangFuse wrapper code throws unexpected exception when awaited withasyncio.wait_for
:Which version of dd-trace-py are you using?
Which version of pip are you using?
Which libraries and their versions are you using?
How can we reproduce your problem?
What is the result that you get?
When run with DataDog instrumentation
What is the result that you expected?
When run without instrumentations: