From 89501a57dccc1c4e2dab84be443e4c926bf882e7 Mon Sep 17 00:00:00 2001 From: Hassieb Pakzad <68423100+hassiebp@users.noreply.github.com> Date: Tue, 12 Aug 2025 10:44:53 +0200 Subject: [PATCH] fix(client): add warning message if OTEL_SDK_DISABLED --- langfuse/_client/client.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/langfuse/_client/client.py b/langfuse/_client/client.py index d205e5d51..6aba529fc 100644 --- a/langfuse/_client/client.py +++ b/langfuse/_client/client.py @@ -221,6 +221,11 @@ def __init__( self._otel_tracer = otel_trace_api.NoOpTracer() return + if os.environ.get("OTEL_SDK_DISABLED", "false").lower() == "true": + langfuse_logger.warning( + "OTEL_SDK_DISABLED is set. Langfuse tracing will be disabled and no traces will appear in the UI." + ) + # Initialize api and tracer if requirements are met self._resources = LangfuseResourceManager( public_key=public_key,