File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -364,7 +364,9 @@ def _prepare_call(
364364 # Create wrapper trace if generation is top-level
365365 # Do not add wrapper trace to stack, as it does not have a corresponding end that will pop it off again
366366 trace = self .client_instance .trace (
367- id = id , name = name , start_time = start_time
367+ id = _root_trace_id_context .get () or id ,
368+ name = name ,
369+ start_time = start_time ,
368370 )
369371 self ._set_root_trace_id (trace .id )
370372
Original file line number Diff line number Diff line change 1- import pytest
21import threading
32from unittest .mock import patch
3+
4+ import pytest
5+
46from langfuse .utils .langfuse_singleton import LangfuseSingleton
57
68
@@ -64,4 +66,4 @@ def test_reset_functionality(mock_langfuse):
6466
6567 assert instance ._langfuse is None
6668
67- mock_langfuse .return_value .flush .assert_called_once ()
69+ mock_langfuse .return_value .shutdown .assert_called_once ()
You can’t perform that action at this time.
0 commit comments