Skip to content

Commit 4f19dca

Browse files
authored
Merge pull request #11 from UiPath/feature/add_tracing_2
tracing: wait for tracers
2 parents 424464b + 6835245 commit 4f19dca

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-llamaindex"
3-
version = "0.0.7"
3+
version = "0.0.8"
44
description = "UiPath LlamaIndex SDK"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.10"

src/uipath_llamaindex/_cli/cli_run.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from opentelemetry.instrumentation.llamaindex import LlamaIndexInstrumentor
99
from uipath._cli._runtime._contracts import UiPathTraceContext
1010
from uipath._cli.middlewares import MiddlewareResult
11-
from uipath.tracing import get_trace_provider
11+
from uipath.tracing import get_trace_provider, wait_for_tracers
1212

1313
from ._runtime._context import UiPathLlamaIndexRuntimeContext
1414
from ._runtime._exception import UiPathLlamaIndexRuntimeError
@@ -66,7 +66,10 @@ async def execute():
6666
async with UiPathLlamaIndexRuntime.from_context(context) as runtime:
6767
await runtime.execute()
6868

69-
asyncio.run(execute())
69+
try:
70+
asyncio.run(execute())
71+
finally:
72+
wait_for_tracers()
7073

7174
return MiddlewareResult(should_continue=False, error_message=None)
7275

0 commit comments

Comments
 (0)