diff --git a/langfuse/_client/client.py b/langfuse/_client/client.py index 55a9667e3..ae5eba235 100644 --- a/langfuse/_client/client.py +++ b/langfuse/_client/client.py @@ -1664,7 +1664,7 @@ def update_current_trace( current_otel_span = self._get_current_otel_span() - if current_otel_span is not None: + if current_otel_span is not None and current_otel_span.is_recording(): existing_observation_type = current_otel_span.attributes.get( # type: ignore[attr-defined] LangfuseOtelSpanAttributes.OBSERVATION_TYPE, "span" )