File tree Expand file tree Collapse file tree
src/uipath_llamaindex/_cli 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.6 "
3+ version = " 0.0.7 "
44description = " UiPath LlamaIndex SDK"
55readme = { file = " README.md" , content-type = " text/markdown" }
66requires-python = " >=3.10"
77dependencies = [
88 " llama-index>=0.12.36" ,
9+ " opentelemetry-instrumentation-llamaindex>=0.40.7" ,
910 " uipath>=2.0.56" ,
1011]
1112classifiers = [
Original file line number Diff line number Diff line change 11import asyncio
22import logging
3+ from contextlib import suppress
34from os import environ as env
45from typing import Optional
56
67from dotenv import load_dotenv
8+ from opentelemetry .instrumentation .llamaindex import LlamaIndexInstrumentor
79from uipath ._cli ._runtime ._contracts import UiPathTraceContext
810from uipath ._cli .middlewares import MiddlewareResult
11+ from uipath .tracing import get_trace_provider
912
1013from ._runtime ._context import UiPathLlamaIndexRuntimeContext
1114from ._runtime ._exception import UiPathLlamaIndexRuntimeError
@@ -30,6 +33,10 @@ def llamaindex_run_middleware(
3033 try :
3134
3235 async def execute ():
36+
37+ with suppress (Exception ):
38+ LlamaIndexInstrumentor ().instrument (tracer_provider = get_trace_provider ())
39+
3340 context = UiPathLlamaIndexRuntimeContext .from_config (
3441 env .get ("UIPATH_CONFIG_PATH" , "uipath.json" )
3542 )
You can’t perform that action at this time.
0 commit comments