File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1639,6 +1639,11 @@ def get_current_trace_id(self) -> Optional[str]:
16391639 external_system.process(data, trace_id=trace_id)
16401640 ```
16411641 """
1642+ if not self ._tracing_enabled :
1643+ langfuse_logger .debug (
1644+ "Operation skipped: get_current_trace_id - Tracing is disabled or client is in no-op mode."
1645+ )
1646+ return
16421647 current_otel_span = self ._get_current_otel_span ()
16431648
16441649 return self ._get_otel_trace_id (current_otel_span ) if current_otel_span else None
@@ -1666,6 +1671,11 @@ def get_current_observation_id(self) -> Optional[str]:
16661671 # Process the query...
16671672 ```
16681673 """
1674+ if not self ._tracing_enabled :
1675+ langfuse_logger .debug (
1676+ "Operation skipped: get_current_observation_id - Tracing is disabled or client is in no-op mode."
1677+ )
1678+ return
16691679 current_otel_span = self ._get_current_otel_span ()
16701680
16711681 return self ._get_otel_span_id (current_otel_span ) if current_otel_span else None
You can’t perform that action at this time.
0 commit comments