File tree Expand file tree Collapse file tree
src/uipath_llamaindex/_cli/_runtime Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11[project ]
22name = " uipath-llamaindex"
3- version = " 0.0.11 "
3+ version = " 0.0.12 "
44description = " UiPath LlamaIndex SDK"
55readme = { file = " README.md" , content-type = " text/markdown" }
66requires-python = " >=3.10"
Original file line number Diff line number Diff 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."""
You can’t perform that action at this time.
0 commit comments