From 66d8f4ffd126bff668434b314892a99fe854a034 Mon Sep 17 00:00:00 2001 From: Ashwin Bharambe Date: Thu, 5 Dec 2024 21:51:47 -0800 Subject: [PATCH] Move the telemetry util import to be more lazy --- llama_stack/distribution/tracing.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llama_stack/distribution/tracing.py b/llama_stack/distribution/tracing.py index ea663ec89..ff4fe2483 100644 --- a/llama_stack/distribution/tracing.py +++ b/llama_stack/distribution/tracing.py @@ -12,8 +12,6 @@ from typing import Any, AsyncGenerator, Callable, Type, TypeVar from pydantic import BaseModel -from llama_stack.providers.utils.telemetry import tracing - T = TypeVar("T") @@ -41,6 +39,8 @@ def trace_protocol(cls: Type[T]) -> Type[T]: """ def trace_method(method: Callable) -> Callable: + from llama_stack.providers.utils.telemetry import tracing + is_async = asyncio.iscoroutinefunction(method) is_async_gen = inspect.isasyncgenfunction(method)