File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,12 @@ def combined_processor(event_info: FinishEventInfo):
221221 prompt_trace = prompt_trace
222222 )
223223
224+ temp_cli = None
225+ with _client_lock :
226+ temp_cli = _default_client
227+ if temp_cli is None :
228+ set_default_client (self )
229+
224230 def _create_default_header_injector (self ) -> Callable [[], Dict [str , str ]]:
225231 def default_header_injector () -> Dict [str , str ]:
226232 try :
Original file line number Diff line number Diff line change 55import os
66import time
77
8+ import cozeloop
9+
810from cozeloop import new_client
911from cozeloop .logger import set_log_level
1012
@@ -105,7 +107,7 @@ def do_simple_demo():
105107 # Warning! In general, this method is not needed to be call, as spans will be automatically reported in batches.
106108 # Note that flush will block and wait for the report to complete, and it may cause frequent reporting,
107109 # affecting performance.
108- client .flush ()
110+ cozeloop .flush ()
109111
110112 # -- close trace, do flush and close client
111113 # Warning! Once Close is executed, the client will become unavailable and a new client needs
You can’t perform that action at this time.
0 commit comments