fix: Fix http empty headers error (#1710)

This commit is contained in:
Fangyin Cheng
2024-07-11 19:39:02 +08:00
committed by GitHub
parent 8c4c546cce
commit 125db534cb
3 changed files with 14 additions and 9 deletions

View File

@@ -161,5 +161,6 @@ class RemoteModelWorker(ModelWorker):
def _get_trace_headers(self):
span_id = root_tracer.get_current_span_id()
headers = self.headers.copy()
headers.update({DBGPT_TRACER_SPAN_ID: span_id})
if span_id:
headers.update({DBGPT_TRACER_SPAN_ID: span_id})
return headers