Skip to content

Commit c0292ec

Browse files
committed
fix(client): parse env vars for debug and tracing enabled case insensitive
1 parent eba5f7f commit c0292ec

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

langfuse/_client/client.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,14 +187,16 @@ def __init__(
187187

188188
self._tracing_enabled = (
189189
tracing_enabled
190-
and os.environ.get(LANGFUSE_TRACING_ENABLED, "True") != "False"
190+
and os.environ.get(LANGFUSE_TRACING_ENABLED, "true").lower() != "false"
191191
)
192192
if not self._tracing_enabled:
193193
langfuse_logger.info(
194194
"Configuration: Langfuse tracing is explicitly disabled. No data will be sent to the Langfuse API."
195195
)
196196

197-
debug = debug if debug else (os.getenv(LANGFUSE_DEBUG, "False") == "True")
197+
debug = (
198+
debug if debug else (os.getenv(LANGFUSE_DEBUG, "false").lower() == "true")
199+
)
198200
if debug:
199201
logging.basicConfig(
200202
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"

0 commit comments

Comments
 (0)