Skip to content

Commit 7156579

Browse files
authored
Merge pull request #12 from UiPath/feature/add_tracing_3
tracer: fix tracerprovider
2 parents 4f19dca + 105ad7a commit 7156579

2 files changed

Lines changed: 4 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.8"
3+
version = "0.0.9"
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: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
from typing import Optional
66

77
from dotenv import load_dotenv
8+
from opentelemetry import trace
89
from opentelemetry.instrumentation.llamaindex import LlamaIndexInstrumentor
910
from uipath._cli._runtime._contracts import UiPathTraceContext
1011
from uipath._cli.middlewares import MiddlewareResult
11-
from uipath.tracing import get_trace_provider, wait_for_tracers
12+
from uipath.tracing import wait_for_tracers
1213

1314
from ._runtime._context import UiPathLlamaIndexRuntimeContext
1415
from ._runtime._exception import UiPathLlamaIndexRuntimeError
@@ -35,7 +36,7 @@ def llamaindex_run_middleware(
3536
async def execute():
3637

3738
with suppress(Exception):
38-
LlamaIndexInstrumentor().instrument(tracer_provider=get_trace_provider())
39+
LlamaIndexInstrumentor().instrument(tracer_provider=trace.get_tracer_provider())
3940

4041
context = UiPathLlamaIndexRuntimeContext.from_config(
4142
env.get("UIPATH_CONFIG_PATH", "uipath.json")

0 commit comments

Comments
 (0)