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 svc logger (#7727)
Ishaan Jafffeee37e37feb
diff --git a/litellm/_service_logger.py b/litellm/_service_logger.pyindex 5cba897cf31..0b4f22e210b 100644--- a/litellm/_service_logger.py+++ b/litellm/_service_logger.py@@ -8,14 +8,13 @@ from litellm.proxy._types import UserAPIKeyAuthfrom .integrations.custom_logger import CustomLoggerfrom .integrations.datadog.datadog import DataDogLogger+from .integrations.opentelemetry import OpenTelemetryfrom .integrations.prometheus_services import PrometheusServicesLoggerfrom .types.services import ServiceLoggerPayload, ServiceTypesif TYPE_CHECKING:from opentelemetry.trace import Span as _Span- from litellm.integrations.opentelemetry import OpenTelemetry-Span = _SpanOTELClass = OpenTelemetryelse:@@ -116,8 +115,6 @@ class ServiceLogging(CustomLogger):"""- For counting if the redis, postgres call is successful"""- from litellm.integrations.opentelemetry import OpenTelemetry-if self.mock_testing:self.mock_testing_async_success_hook += 1@@ -190,7 +187,6 @@ class ServiceLogging(CustomLogger):initializes otel_logger if it is None or no attribute exists on ServiceLogging Object"""- from litellm.integrations.opentelemetry import OpenTelemetryfrom litellm.proxy.proxy_server import open_telemetry_loggerif not hasattr(self, "otel_logger"):@@ -218,8 +214,6 @@ class ServiceLogging(CustomLogger):"""- For counting if the redis, postgres call is unsuccessful"""- from litellm.integrations.opentelemetry import OpenTelemetry-if self.mock_testing:self.mock_testing_async_failure_hook += 1