Skip to content

Commit 089244b

Browse files
RunnanJiaclaude
andcommitted
feat(platform): include jobKey in LLM Gateway trace baggage
build_trace_context_headers emits folderKey/agentId/processKey but omits jobKey, even though UiPathConfig.job_key is available. LLM Gateway now builds the model-call span from this baggage, so without jobKey the span cannot be attributed to the originating job. Callers currently work around this by hand-injecting jobKey via extra_baggage; emitting it natively fixes it once for every caller. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent aa5bb7e commit 089244b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

packages/uipath-platform/src/uipath/platform/chat/llm_trace_context.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ def build_trace_context_headers(
4444
baggage_parts.append(f"agentId={agent_id}")
4545
if process_key := UiPathConfig.process_key:
4646
baggage_parts.append(f"processKey={process_key}")
47+
if job_key := UiPathConfig.job_key:
48+
baggage_parts.append(f"jobKey={job_key}")
4749
if baggage_parts:
4850
headers["x-uipath-tracebaggage"] = ",".join(baggage_parts)
4951

0 commit comments

Comments
 (0)