The fastest, litest AI Gateway. Rust core with Python SDK. Call 100+ LLM APIs in OpenAI (or native) format with cost tracking, guardrails, load balancing, and logging [Bedrock, Azure, OpenAI, Anthropic, OpenAI, VertexAI, vLLM, Nvidia NIM]
Python ai-gatewayanthropicazure-openaibedrockgatewaylangchainlitellmllmllm-gatewayllmopsmcp-gatewayopenaiopenai-proxyrustrust-aivertex-ai
fix arize logging
Ishaan Jafff4b7b49e9a50
diff --git a/litellm/litellm_core_utils/litellm_logging.py b/litellm/litellm_core_utils/litellm_logging.pyindex 0945c45491d..dded8232f01 100644--- a/litellm/litellm_core_utils/litellm_logging.py+++ b/litellm/litellm_core_utils/litellm_logging.py@@ -29,6 +29,7 @@ from litellm.batches.batch_utils import _handle_completed_batchfrom litellm.caching.caching import DualCache, InMemoryCachefrom litellm.caching.caching_handler import LLMCachingHandlerfrom litellm.cost_calculator import _select_model_name_for_cost_calc+from litellm.integrations.arize.arize import ArizeLoggerfrom litellm.integrations.custom_guardrail import CustomGuardrailfrom litellm.integrations.custom_logger import CustomLoggerfrom litellm.integrations.mlflow import MlflowLogger@@ -2658,11 +2659,11 @@ def _init_custom_logger_compatible_class( # noqa: PLR0915)for callback in _in_memory_loggers:if (- isinstance(callback, OpenTelemetry)+ isinstance(callback, ArizeLogger)and callback.callback_name == "arize"):return callback # type: ignore- _otel_logger = OpenTelemetry(config=otel_config, callback_name="arize")+ _otel_logger = ArizeLogger(config=otel_config, callback_name="arize")_in_memory_loggers.append(_otel_logger)return _otel_logger # type: ignoreelif logging_integration == "arize_phoenix":@@ -2897,15 +2898,13 @@ def get_custom_logger_compatible_class( # noqa: PLR0915if isinstance(callback, OpenTelemetry):return callbackelif logging_integration == "arize":- from litellm.integrations.opentelemetry import OpenTelemetry-if "ARIZE_SPACE_KEY" not in os.environ:raise ValueError("ARIZE_SPACE_KEY not found in environment variables")if "ARIZE_API_KEY" not in os.environ:raise ValueError("ARIZE_API_KEY not found in environment variables")for callback in _in_memory_loggers:if (- isinstance(callback, OpenTelemetry)+ isinstance(callback, ArizeLogger)and callback.callback_name == "arize"):return callback