From 61ff712a0873d1f450c0f7f5d8dc23fba2465626 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Mon, 17 Jun 2024 19:33:10 -0700 Subject: [PATCH] fix deps --- docs/my-website/docs/observability/logfire_integration.md | 8 ++++++-- litellm/litellm_core_utils/litellm_logging.py | 5 ++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/my-website/docs/observability/logfire_integration.md b/docs/my-website/docs/observability/logfire_integration.md index 55c15295a..7b826e0f9 100644 --- a/docs/my-website/docs/observability/logfire_integration.md +++ b/docs/my-website/docs/observability/logfire_integration.md @@ -14,10 +14,14 @@ join our [discord](https://discord.gg/wuPM9dRgDw) ## Pre-Requisites -Ensure you have run `pip install logfire` for this integration +Ensure you have installed the following packages to use this integration ```shell -pip install logfire litellm +pip install litellm + +pip install opentelemetry-api==1.25.0 +pip install opentelemetry-sdk==1.25.0 +pip install opentelemetry-exporter-otlp==1.25.0 ``` ## Quick Start diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.py index b72098fbe..aceb834f8 100644 --- a/litellm/litellm_core_utils/litellm_logging.py +++ b/litellm/litellm_core_utils/litellm_logging.py @@ -64,7 +64,6 @@ from ..integrations.litedebugger import LiteDebugger from ..integrations.logfire_logger import LogfireLevel, LogfireLogger from ..integrations.lunary import LunaryLogger from ..integrations.openmeter import OpenMeterLogger -from ..integrations.opentelemetry import OpenTelemetry, OpenTelemetryConfig from ..integrations.prometheus import PrometheusLogger from ..integrations.prometheus_services import PrometheusServicesLogger from ..integrations.prompt_layer import PromptLayerLogger @@ -1761,6 +1760,10 @@ def _init_custom_logger_compatible_class( elif logging_integration == "logfire": if "LOGFIRE_TOKEN" not in os.environ: raise ValueError("LOGFIRE_TOKEN not found in environment variables") + from litellm.integrations.opentelemetry import ( + OpenTelemetry, + OpenTelemetryConfig, + ) otel_config = OpenTelemetryConfig( exporter="otlp_http",