1919from cozeloop .internal .httpclient import Auth
2020from cozeloop .internal .prompt import PromptProvider
2121from cozeloop .internal .trace import TraceProvider
22- from cozeloop .internal .trace .model .model import FinishEventInfo , TagTruncateConf
22+ from cozeloop .internal .trace .model .model import FinishEventInfo , TagTruncateConf , QueueConf
2323from cozeloop .internal .trace .trace import default_finish_event_processor
2424from cozeloop .span import SpanContext , Span
2525
@@ -71,6 +71,7 @@ def new_client(
7171 trace_finish_event_processor : Optional [Callable [[FinishEventInfo ], None ]] = None ,
7272 tag_truncate_conf : Optional [TagTruncateConf ] = None ,
7373 api_base_path : Optional [APIBasePath ] = None ,
74+ queue_conf : Optional [QueueConf ] = None ,
7475) -> Client :
7576 cache_key = _generate_cache_key ( # all args are used to generate cache key
7677 api_base_url ,
@@ -89,6 +90,7 @@ def new_client(
8990 trace_finish_event_processor ,
9091 tag_truncate_conf ,
9192 api_base_path ,
93+ queue_conf ,
9294 )
9395
9496 with _cache_lock :
@@ -113,6 +115,7 @@ def new_client(
113115 trace_finish_event_processor = trace_finish_event_processor ,
114116 tag_truncate_conf = tag_truncate_conf ,
115117 api_base_path = api_base_path ,
118+ queue_conf = queue_conf ,
116119 )
117120 _client_cache [cache_key ] = client
118121 return client
@@ -143,6 +146,7 @@ def __init__(
143146 trace_finish_event_processor : Optional [Callable [[FinishEventInfo ], None ]] = None ,
144147 tag_truncate_conf : Optional [TagTruncateConf ] = None ,
145148 api_base_path : Optional [APIBasePath ] = None ,
149+ queue_conf : Optional [QueueConf ] = None ,
146150 ):
147151 workspace_id = self ._get_from_env (workspace_id , ENV_WORKSPACE_ID )
148152 api_base_url = self ._get_from_env (api_base_url , ENV_API_BASE_URL )
@@ -201,6 +205,7 @@ def combined_processor(event_info: FinishEventInfo):
201205 tag_truncate_conf = tag_truncate_conf ,
202206 span_upload_path = span_upload_path ,
203207 file_upload_path = file_upload_path ,
208+ queue_conf = queue_conf ,
204209 )
205210 self ._prompt_provider = PromptProvider (
206211 workspace_id = workspace_id ,
0 commit comments