diff --git a/litellm/integrations/langfuse/langfuse_otel.py b/litellm/integrations/langfuse/langfuse_otel.py index 276fd24cc32..55f723dd71d 100644 --- a/litellm/integrations/langfuse/langfuse_otel.py +++ b/litellm/integrations/langfuse/langfuse_otel.py @@ -25,8 +25,6 @@ else: LANGFUSE_CLOUD_EU_ENDPOINT = "https://cloud.langfuse.com/api/public/otel" LANGFUSE_CLOUD_US_ENDPOINT = "https://us.cloud.langfuse.com/api/public/otel" -LANGFUSE_OTEL_INGESTION_VERSION_HEADER = "x-langfuse-ingestion-version" -LANGFUSE_OTEL_INGESTION_VERSION = "4" class LangfuseOtelLogger(OpenTelemetry): @@ -375,7 +373,7 @@ class LangfuseOtelLogger(OpenTelemetry): def _build_langfuse_otel_headers(auth_header: str) -> dict[str, str]: return { "Authorization": auth_header, - LANGFUSE_OTEL_INGESTION_VERSION_HEADER: LANGFUSE_OTEL_INGESTION_VERSION, + "x-langfuse-ingestion-version": "4", } @staticmethod diff --git a/tests/test_service_logger_otel.py b/tests/test_service_logger_otel.py index 01e918d3f42..044d37d6781 100644 --- a/tests/test_service_logger_otel.py +++ b/tests/test_service_logger_otel.py @@ -8,11 +8,7 @@ from unittest.mock import patch, AsyncMock, MagicMock sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), "../.."))) import litellm -from litellm.integrations.langfuse.langfuse_otel import ( - LANGFUSE_OTEL_INGESTION_VERSION, - LANGFUSE_OTEL_INGESTION_VERSION_HEADER, - LangfuseOtelLogger, -) +from litellm.integrations.langfuse.langfuse_otel import LangfuseOtelLogger from litellm.integrations.opentelemetry import OpenTelemetry from litellm.types.services import ServiceTypes from litellm._service_logger import ServiceLogging @@ -124,8 +120,8 @@ class TestServiceLoggerOTEL(unittest.IsolatedAsyncioTestCase): headers = OpenTelemetry._get_headers_dictionary(logger.config.headers) self.assertEqual( - headers[LANGFUSE_OTEL_INGESTION_VERSION_HEADER], - LANGFUSE_OTEL_INGESTION_VERSION, + headers["x-langfuse-ingestion-version"], + "4", ) self.assertTrue(headers["Authorization"].startswith("Basic ")) @@ -146,8 +142,8 @@ class TestServiceLoggerOTEL(unittest.IsolatedAsyncioTestCase): self.assertIsNotNone(headers) self.assertEqual( - headers[LANGFUSE_OTEL_INGESTION_VERSION_HEADER], - LANGFUSE_OTEL_INGESTION_VERSION, + headers["x-langfuse-ingestion-version"], + "4", ) self.assertTrue(headers["Authorization"].startswith("Basic "))