Async functions are traced as sync functions by resource_override.
For example, here's an incorrect version:
@traced(name="contextgrounding_search", run_type="uipath")
@resource_override(resource_type="index")
async def ...
When the function is invoked, the true responses are not traced. Instead, Coroutine objects are traced. This is because resource_override annotation does something to make the async function behave like sync.
However, if I flip the implementation, such as
@resource_override(resource_type="index")
@traced(name="contextgrounding_search", run_type="uipath")
async def ...
then, the true responses are traced. This is because the traced annotation preserves the type of function.
Please fix the resource_override. Alternatively, in the short term, please flip the order of invocation everywhere so that all async functions are traced correctly.
Async functions are traced as sync functions by
resource_override.For example, here's an incorrect version:
When the function is invoked, the true responses are not traced. Instead,
Coroutineobjects are traced. This is becauseresource_overrideannotation does something to make the async function behave like sync.However, if I flip the implementation, such as
then, the true responses are traced. This is because the traced annotation preserves the type of function.
Please fix the
resource_override. Alternatively, in the short term, please flip the order of invocation everywhere so that all async functions are traced correctly.