Skip to content

Commit 44caef2

Browse files
committed
fix: update 0.0.12
1 parent facbc6a commit 44caef2

2 files changed

Lines changed: 9 additions & 7 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.11"
3+
version = "0.0.12"
44
description = "UiPath LlamaIndex SDK"
55
readme = { file = "README.md", content-type = "text/markdown" }
66
requires-python = ">=3.10"

src/uipath_llamaindex/_cli/_runtime/_runtime.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,15 @@ async def execute(self) -> Optional[UiPathRuntimeResult]:
4343
"""
4444
await self.validate()
4545

46+
self.trace_provider = TracerProvider()
47+
4648
with suppress(Exception):
47-
trace.set_tracer_provider(TracerProvider())
48-
trace.get_tracer_provider().add_span_processor(BatchSpanProcessor(LlamaIndexExporter())) # type: ignore
49+
trace.set_tracer_provider(self.trace_provider)
50+
self.trace_provider.add_span_processor(
51+
BatchSpanProcessor(LlamaIndexExporter())
52+
) # type: ignore
4953

50-
LlamaIndexInstrumentor().instrument(
51-
tracer_provider=trace.get_tracer_provider()
52-
)
54+
LlamaIndexInstrumentor().instrument(tracer_provider=self.trace_provider)
5355

5456
try:
5557
start_event_class = self.context.workflow._start_event_class
@@ -80,7 +82,7 @@ async def execute(self) -> Optional[UiPathRuntimeResult]:
8082
UiPathErrorCategory.USER,
8183
) from e
8284
finally:
83-
trace.get_tracer_provider().shutdown()
85+
self.trace_provider.shutdown()
8486

8587
async def validate(self) -> None:
8688
"""Validate runtime inputs and load Llama agent configuration."""

0 commit comments

Comments
 (0)