File tree Expand file tree Collapse file tree 3 files changed +8
-5
lines changed
Expand file tree Collapse file tree 3 files changed +8
-5
lines changed Original file line number Diff line number Diff line change 11""".. include:: ../README.md"""
22
3+ from ._client import client as _client_module
34from ._client .attributes import LangfuseOtelSpanAttributes
45from ._client .get_client import get_client
5- from ._client import client as _client
66from ._client .observe import observe
77from ._client .span import LangfuseEvent , LangfuseGeneration , LangfuseSpan
88
9- Langfuse = _client .Langfuse
9+ Langfuse = _client_module .Langfuse
1010
1111__all__ = [
1212 "Langfuse" ,
Original file line number Diff line number Diff 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"
Original file line number Diff line number Diff line change @@ -95,7 +95,8 @@ def mock_init(self, **kwargs):
9595 )
9696
9797 monkeypatch .setattr (
98- "langfuse._client.span_processor.LangfuseSpanProcessor.__init__" , mock_init
98+ "langfuse._client.span_processor.LangfuseSpanProcessor.__init__" ,
99+ mock_init ,
99100 )
100101
101102 @pytest .fixture
You can’t perform that action at this time.
0 commit comments